- "status"-calls use different exit codes, refer to http://refspecs.linuxbase.org/LSB_3.0.0/LSB-PDA/LSB-PDA/iniscrptact.html
- the "status"-call in "condrestart" returned an error if the daemon was not running: this has been fixed
if [ ! -e $ICINGA2_PID_FILE ]; then
echo "Not running"
- exit 7
+ exit 3
fi
pid=`cat $ICINGA2_PID_FILE`
echo "Running"
else
echo "Not running"
- exit 7
+ exit 3
fi
}
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