X-Git-Url: http://git.indexdata.com/?p=yazproxy-moved-to-github.git;a=blobdiff_plain;f=etc%2Fyazproxyctl.sh;h=ff116e1b7eacd312fcdea15a9ba896c5abf4187f;hp=893423f57a4def6d778e0bff147bce61e6285045;hb=dab768cd2d16fc4edc3788f1503ac4847f9ce822;hpb=7767f42f8aa5359239cfe3dd99ee18b6fb23546f diff --git a/etc/yazproxyctl.sh b/etc/yazproxyctl.sh index 893423f..ff116e1 100755 --- a/etc/yazproxyctl.sh +++ b/etc/yazproxyctl.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: yazproxyctl.sh,v 1.1 2004-04-23 16:10:24 adam Exp $ +# $Id: yazproxyctl.sh,v 1.3 2006-04-04 20:52:04 adam Exp $ # YAZ proxy start/stop init.d script. # PATH=/usr/local/bin:/bin:/usr/bin @@ -25,7 +25,7 @@ RUNAS=nobody # Extra args . Config file _WITH_ option ARGS="-c config.xml" -if test -n "RUNAS"; then +if test -n "$RUNAS"; then ARGS="-u $RUNAS $ARGS" fi @@ -50,7 +50,7 @@ case "$1" in ;; stop) printf "%s" "Stopping $DESC: " - + cd $DIR if test -f $PIDFILE; then kill `cat $PIDFILE` rm -f $PIDFILE @@ -60,18 +60,23 @@ case "$1" in fi ;; reload) + printf "%s" "Reloading $DESC: " + cd $DIR if test -f $PIDFILE; then kill -HUP `cat $PIDFILE` + echo "$NAME." + else + echo "No PID $PIDFILE" fi - ;; + ;; restart|force-reload) printf "%s" "Restarting $DESC: " + cd $DIR if test -f $PIDFILE; then kill `cat $PIDFILE` rm -f $PIDFILE fi sleep 1 - cd $DIR $DAEMON -l $LOGFILE -p $PIDFILE $ARGS @:$PORT & echo "$NAME." ;;