diff options
Diffstat (limited to 'rc.d/init.d/functions')
-rw-r--r-- | rc.d/init.d/functions | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions index 8e5800b6..558aaee0 100644 --- a/rc.d/init.d/functions +++ b/rc.d/init.d/functions @@ -390,7 +390,14 @@ status() { if [ "$_use_systemctl" = "1" ]; then systemctl status ${0##*/}.service - return $? + ret=$? + # LSB daemons that dies abnormally in systemd looks alive in systemd's eyes due to RemainAfterExit=yes + # lets adjust the reality a little bit + if systemctl show -p ActiveState ${0##*/}.service | grep -q '=active$' && \ + systemctl show -p SubState ${0##*/}.service | grep -q '=exited$' ; then + ret=3 + fi + return $ret fi # First try "pidof" |