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
16 LOGFILE=/var/log/proxy.log
18 if test `whoami` != $RUNAS; then
25 # Proxy CWD is here. Should be writable by it.
28 DAEMON=/usr/local/bin/yaz-proxy
29 # Proxy PIDFILE. Must be writable by it.
30 PIDFILE=$DIR/proxy.pid
33 # Extra args . Config file _WITH_ option
36 # Name, Description (not essential)
40 test -d $DIR || exit 0
41 test -f $DAEMON || exit 0
47 echo -n "Starting $DESC: "
49 $DAEMON -l $LOGFILE -p $PIDFILE $ARGS @:$PORT &
53 echo -n "Stopping $DESC: "
55 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
74 $DAEMON -l $LOGFILE -p $PIDFILE $ARGS @:$PORT &
79 # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
80 echo "Usage: $N {start|stop|restart|force-reload}" >&2