From 3ce6d1f9db661a999ceedf6116f6d11a7750e61b Mon Sep 17 00:00:00 2001 From: Hendrik Jäger Date: Sun, 22 May 2022 21:55:57 +0200 Subject: fix: status command in init-script was broken --- files/etc/init.d/s6 | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'files/etc') 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}" -- cgit v1.2.3