3 # skeleton example file to build /etc/init.d/ scripts.
4 # This file should be used to construct scripts for /etc/init.d.
6 # Written by Miquel van Smoorenburg <miquels@cistron.nl>.
7 # Modified for Debian GNU/Linux
8 # by Ian Murdock <imurdock@gnu.ai.mit.edu>.
10 # Version: @(#)skeleton 1.8 03-Mar-1998 miquels@cistron.nl
12 PATH=/usr/local/bin:/bin:/usr/bin
15 # Proxy CWD is here. Should be writable by it.
18 DAEMON=/usr/local/bin/yaz-proxy
19 # Proxy PIDFILE. Must be writable by it.
20 PIDFILE=$DIR/yaz-proxy.pid
22 LOGFILE=/var/log/yaz-proxy.log
25 # Run as this user. Set to empty to keep uid as is
28 # Extra args . Config file _WITH_ option
31 if test -n "RUNAS"; then
32 ARGS="-u $RUNAS $ARGS"
35 # Name, Description (not essential)
39 test -d $DIR || exit 0
40 test -f $DAEMON || exit 0
46 echo -n "Starting $DESC: "
48 $DAEMON -l $LOGFILE -p $PIDFILE $ARGS @:$PORT &
52 echo -n "Stopping $DESC: "
54 if test -f $PIDFILE; then
59 echo "No PID $PIDFILE"
63 if test -f $PIDFILE; then
64 kill -INT `cat $PIDFILE`
68 echo -n "Restarting $DESC: "
69 if test -f $PIDFILE; then
75 $DAEMON -l $LOGFILE -p $PIDFILE $ARGS @:$PORT &
80 # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
81 echo "Usage: $N {start|stop|restart|force-reload}" >&2