--- ggrelay-1.4/scripts/ggrelay.orig 2005-01-19 23:58:47.000000000 +0100 +++ ggrelay-1.4/scripts/ggrelay 2005-01-20 06:32:28.000000000 +0100 @@ -3,6 +3,8 @@ # chkconfig: - 90 25 # description: Gadu-Gadu relaying agent (proxy) daemon +[ -f /etc/sysconfig/ggrelay ] || exit 0 + # Source function library. . /etc/rc.d/init.d/functions @@ -43,22 +45,27 @@ } start() { - echo -n $"Starting ggrelay: " - prepare_parms - daemon ggrelay $GGRELAY_PARMS - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ggrelay + if [ ! -f /var/lock/subsys/ggrelay ]; then + msg_starting "GGrelay" + prepare_parms + daemon ggrelay $GGRELAY_PARMS + RETVAL=$? + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ggrelay + else + msg_already_running "GGrelay" + fi } stop() { - echo -n $"Stopping ggrelay: " - killproc ggrelay - RETVAL=$? - echo - if [ $RETVAL -eq 0 ]; then - rm -f /var/lock/subsys/ggrelay - fi + if [ -f /var/lock/subsys/ggrelay ]; then + msg_stopping "GGrelay" + busy + killproc ggrelay + rm -f /var/lock/subsys/ggrelay > /dev/null 2>&1 + ok + else + msg_not_running "GGrelay" + fi } # See how we were called.