Skip to content
Permalink
Browse files

Merge pull request #7183 from hlsolutions/bugfix/systemv-returncode

Fix System-V return codes according to LSB
  • Loading branch information...
dnsmichi committed Jun 6, 2019
2 parents b727959 + a761ada commit f8a82b5e28c6cd5849968d41deb5c4ef664b09e7
Showing with 4 additions and 3 deletions.
  1. +4 −3 etc/initsystem/icinga2.init.d.cmake
@@ -138,15 +138,15 @@ status() {

if [ ! -e $ICINGA2_PID_FILE ]; then
echo "Not running"
exit 7
exit 3
fi

pid=`cat $ICINGA2_PID_FILE`
if icinga2 internal signal -s SIGCHLD -p $pid >/dev/null 2>&1; then
echo "Running"
else
echo "Not running"
exit 7
exit 3
fi
}

@@ -168,7 +168,8 @@ case "$1" in
start
;;
condrestart)
status > /dev/null 2>&1 || exit 0
STATUS=$(status > /dev/null 2>&1)
if [ $? != 0 ]; then exit 0; fi
checkconfig restart fail
stop nofail
start

0 comments on commit f8a82b5

Please sign in to comment.
You can’t perform that action at this time.