]> git.netwichtig.de Git - user/henk/code/puppet/modules/s6.git/blobdiff - files/etc/init.d/s6
fix: status command in init-script was broken
[user/henk/code/puppet/modules/s6.git] / files / etc / init.d / s6
index 371e53ef313f488b2bc9c36ca0c7803625690cac..29bf0e2d2689d5d71370e1245fd71e3cdeba0666 100644 (file)
@@ -63,7 +63,22 @@ case "$1" in
                $0 start
                ;;
        status)
-               status_of_proc ${DAEMON} s6 && exit 0 || exit $?
+               /usr/bin/s6-svscanctl "${SCANDIR}"
+               exitcode=$?
+               case "$exitcode" in
+                       0)
+                               log_success_msg "$NAME is running"
+                               return ${exitcode}
+                               ;;
+                       100)
+                               log_failure_msg "$NAME is not running"
+                               return ${exitcode}
+                               ;;
+                       *)
+                               log_failure_msg "$NAME has some problem, exit code was ${exitcode}"
+                               return ${exitcode}
+                               ;;
+               esac
                ;;
        *)
                echo "Usage: ${SCRIPTNAME} {start|stop|restart|force-reload|status}"