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"
20 # Proxy PIDFILE. Must be writable by it.
21 PIDFILE="/var/run/yaz-proxy.pid"
24 LOGFILE=/var/log/yaz-proxy.log
29 # Run as this user. Set to empty to keep uid as is
32 # Extra args . Config file _WITH_ option
35 if test -n "RUNAS"; then
36 ARGS="-u $RUNAS $ARGS"
39 # Name, Description (not essential)
43 test -d $DIR || exit 0
44 test -f $DAEMON || exit 0
50 echo -n "Starting $DESC: "
52 $DAEMON -l $LOGFILE -p $PIDFILE $ARGS @:$PORT &
56 echo -n "Stopping $DESC: "
58 if test -f $PIDFILE; then
63 echo "No PID $PIDFILE"
67 if test -f $PIDFILE; then
68 kill -HUP `cat $PIDFILE`
72 echo -n "Restarting $DESC: "
73 if test -f $PIDFILE; then
79 $DAEMON -l $LOGFILE -p $PIDFILE $ARGS @:$PORT &
84 # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
85 echo "Usage: $N {start|stop|restart|force-reload}" >&2