2 # $Id: helka.sh,v 1.1 2004-10-12 19:20:04 adam Exp $
3 # YAZ proxy start/stop init.d script.
10 PATH=/m1/voyager/yaz/bin:/bin:/usr/bin
13 # Proxy CWD is here. Should be writable by it.
14 DIR=/m1/voyager/${DB}db/local/yaz
16 DAEMON=/m1/voyager/yaz/bin/yazproxy
18 # Proxy PIDFILE. Must be writable by it.
19 PIDFILE="yazproxy.pid"
24 # Run as this user. Set to empty to keep uid as is
27 # Extra args . Config file _WITH_ option
30 if test -n "RUNAS"; then
31 ARGS="-u $RUNAS $ARGS"
34 # Increase number of sockets, if needed
37 # Name, Description (not essential)
41 test -d $DIR || exit 0
42 test -f $DAEMON || exit 0
48 printf "%s" "Starting $DESC: "
50 $DAEMON -l $LOGFILE -p $PIDFILE $ARGS @:$PORT &
54 printf "%s" "Stopping $DESC: "
56 if test -f $PIDFILE; then
61 echo "No PID $PIDFILE"
66 if test -f $PIDFILE; then
67 kill -HUP `cat $PIDFILE`
71 printf "%s" "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