2 # $Id: debian.init.d,v 1.1 2004-01-18 21:11:11 adam Exp $
3 # Debian sample start/stop script for YAZ Generic Frontend Server
7 DAEMON=/usr/local/bin/yaz-ztest
9 PIDFILE=/var/run/yaz-ztest.pid
10 LOGFILE=/var/log/yaz-ztest.log
13 test -x $DAEMON || exit 0
17 echo -n "Starting YAZ server: "
18 start-stop-daemon --start --pidfile $PIDFILE \
20 -u $RUNAS -l $LOGFILE -D -p $PIDFILE @:210
25 echo -n "Stopping YAZ server: "
26 start-stop-daemon --stop --pidfile $PIDFILE \
27 --oknodo --retry 30 --exec $DAEMON
31 echo -n "Restarting YAZ server: "
32 start-stop-daemon --stop --pidfile $PIDFILE \
33 --oknodo --retry 30 --exec $DAEMON
34 start-stop-daemon --start --pidfile $PIDFILE d \
36 -u $RUNAS -l $LOGFILE -D -p $PIDFILE @:210
40 echo "Reloading $NAME configuration files"
41 start-stop-daemon --stop --pidfile $PIDFILE \
42 --signal 1 --exec $DAEMON
45 echo "Usage: /etc/init.d/$NAME {start|stop|restart|reload}"