2 # YAZ proxy start/stop init.d script.
9 PATH=/m1/voyager/yaz/bin:/bin:/usr/bin
12 # Proxy CWD is here. Should be writable by it.
13 DIR=/m1/voyager/${DB}db/local/yaz
15 DAEMON=/m1/voyager/yaz/bin/yazproxy
17 # Proxy PIDFILE. Must be writable by it.
18 PIDFILE="yazproxy.pid"
23 # Run as this user. Set to empty to keep uid as is
26 # Extra args . Config file _WITH_ option
29 if test -n "RUNAS"; then
30 ARGS="-u $RUNAS $ARGS"
33 # Increase number of sockets, if needed
36 # Name, Description (not essential)
40 test -d $DIR || exit 0
41 test -f $DAEMON || exit 0
47 printf "%s" "Starting $DESC: "
49 $DAEMON -l $LOGFILE -p $PIDFILE $ARGS @:$PORT &
53 printf "%s" "Stopping $DESC: "
55 if test -f $PIDFILE; then
60 echo "No PID $PIDFILE"
65 if test -f $PIDFILE; then
66 kill -HUP `cat $PIDFILE`
70 printf "%s" "Restarting $DESC: "
72 if test -f $PIDFILE; then
78 $DAEMON -l $LOGFILE -p $PIDFILE $ARGS @:$PORT &
83 # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
84 echo "Usage: $N {start|stop|restart|force-reload}" >&2