X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=distrib%2Finitscripts%2Frc.redhat.tmpl;h=0721d9f64a9c2c9e8e113c53c6633066c08f1cab;hb=a91e49a8d841b066e948a49439fcb3f3dbba4bde;hp=b2a8cd5a8efc382543c0630c17239a51cecfb9be;hpb=a0e6244c0526e79d3455ffee71bb9d36b49df4a6;p=netatalk.git diff --git a/distrib/initscripts/rc.redhat.tmpl b/distrib/initscripts/rc.redhat.tmpl index b2a8cd5a..0721d9f6 100644 --- a/distrib/initscripts/rc.redhat.tmpl +++ b/distrib/initscripts/rc.redhat.tmpl @@ -21,7 +21,7 @@ RETVAL=1 netatalk_startup() { # Check that networking is up. if [ ${NETWORKING} = "no" ]; then - echo "[Network isn't started]"; + echo "[Network isn't started]"; exit 1; fi @@ -51,6 +51,21 @@ netatalk_stop() { fi } +# restart code +netatalk_restart() { + netatalk_stop + netatalk_startup +} + +# reload config files +netatalk_reload() { + if [ -x ${NETATALK_SBIN}/netatalk ]; then + echo -n $"Reloading $prog: " + killproc netatalk -HUP + RETVAL=$? + echo + fi +} case "$1" in 'start') @@ -59,17 +74,21 @@ case "$1" in 'stop') netatalk_stop ;; - 'restart'|'reload') - $0 stop - $0 start - RETVAL=$? + 'restart') + netatalk_restart + ;; + 'reload'|'graceful') + netatalk_reload ;; 'status') status netatalk RETVAL=$? ;; + 'condrestart') + [ -f /var/lock/subsys/netatalk ] && netatalk_restart || : + ;; *) - echo "Usage: $0 {start|stop|restart|reload|status}" + echo "Usage: $0 {start|stop|restart|reload|status|condrestart}" exit 2 esac