diff options
author | Hendrik Jäger <gitcommit@henk.geekmail.org> | 2022-05-22 21:55:57 +0200 |
---|---|---|
committer | Hendrik Jäger <gitcommit@henk.geekmail.org> | 2022-07-25 23:53:04 +0200 |
commit | 3ce6d1f9db661a999ceedf6116f6d11a7750e61b (patch) | |
tree | c3928abd4861303cc0bbb3b92abf9527657be4a9 /files/etc/init.d | |
parent | cdf99a6c762c799eb1c71385391813f804096328 (diff) |
fix: status command in init-script was broken
Diffstat (limited to 'files/etc/init.d')
-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}" |