diff options
-rw-r--r-- | files/etc/init.d/s6 | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/files/etc/init.d/s6 b/files/etc/init.d/s6 index 371e53e..29bf0e2 100644 --- a/files/etc/init.d/s6 +++ b/files/etc/init.d/s6 @@ -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}" |