diff --git a/pkgs/servers/server-scripts/generic/functions b/pkgs/servers/server-scripts/generic/functions index 48c6a4d0d7b9..42b13704ae44 100644 --- a/pkgs/servers/server-scripts/generic/functions +++ b/pkgs/servers/server-scripts/generic/functions @@ -42,14 +42,20 @@ start() { # launch all preferred dependencies #start_softdeps # launch our own program + startService + # if successful, then register + register } stop() { + echo "stopping $prog" # are we running? If so, then stop, otherwise, do nothing... - if test -a $STATDIR/$prog = 0; then + if ! test -a $STATEDIR/$prog; then exit 0 fi # stop our own program + stopService + unregister } register() { @@ -62,7 +68,7 @@ unregister() { status() { # are we running? If so, report - if test -a $STATDIR/$prog; then + if test -a $STATEDIR/$prog; then echo "running" else echo "stopped" diff --git a/pkgs/servers/syslog-script/syslog b/pkgs/servers/syslog-script/syslog index 3ec29884c1d5..d6291271f48a 100755 --- a/pkgs/servers/syslog-script/syslog +++ b/pkgs/servers/syslog-script/syslog @@ -27,6 +27,8 @@ startService() stopService() { echo -n "Stopping $prog:" + kill `cat /var/run/syslogd.pid` + kill `cat /var/run/klogd.pid` } reloadService()