]> arthur.barton.de Git - netatalk.git/commitdiff
Add graceful option
authorFrank Lahm <franklahm@googlemail.com>
Wed, 28 Mar 2012 12:36:34 +0000 (14:36 +0200)
committerFrank Lahm <franklahm@googlemail.com>
Wed, 28 Mar 2012 12:36:34 +0000 (14:36 +0200)
distrib/initscripts/rc.redhat.tmpl

index b2a8cd5a8efc382543c0630c17239a51cecfb9be..643448ae688869d8cb44b0b1f6fb59e708fc5881 100644 (file)
@@ -51,6 +51,15 @@ netatalk_stop() {
     fi
 }
 
+# code to cause apfd and cnid_metad to restart
+netatalk_graceful() {
+    if [ -x ${NETATALK_SBIN}/netatalk ]; then
+        echo -n $"Restarting cnid_metad and afpd: "
+        killproc  netatalk -QUIT
+        RETVAL=$?
+        echo
+    fi
+}
 
 case "$1" in
     'start')
@@ -68,8 +77,11 @@ case "$1" in
         status netatalk
         RETVAL=$?
         ;;
+    'graceful')
+        netatalk_graceful
+        ;;
     *)
-        echo "Usage: $0 {start|stop|restart|reload|status}"
+        echo "Usage: $0 {start|stop|restart|reload|status|graceful}"
         exit 2
 esac