2 # Debian sample start/stop script for YAZ Generic Frontend Server
6 DAEMON=/usr/local/bin/yaz-ztest
8 PIDFILE=/var/run/yaz-ztest.pid
9 LOGFILE=/var/log/yaz-ztest.log
12 test -x $DAEMON || exit 0
16 echo -n "Starting YAZ server: "
17 start-stop-daemon --start --pidfile $PIDFILE \
19 -u $RUNAS -l $LOGFILE -D -p $PIDFILE @:210
24 echo -n "Stopping YAZ server: "
25 start-stop-daemon --stop --pidfile $PIDFILE \
26 --oknodo --retry 30 --exec $DAEMON
30 echo -n "Restarting YAZ server: "
31 start-stop-daemon --stop --pidfile $PIDFILE \
32 --oknodo --retry 30 --exec $DAEMON
33 start-stop-daemon --start --pidfile $PIDFILE d \
35 -u $RUNAS -l $LOGFILE -D -p $PIDFILE @:210
39 echo "Reloading $NAME configuration files"
40 start-stop-daemon --stop --pidfile $PIDFILE \
41 --signal 1 --exec $DAEMON
44 echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload}"