mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
Fix System-V return codes according to LSB
- "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
This commit is contained in:
parent
66df1e9542
commit
a761adad8a
@ -138,7 +138,7 @@ status() {
|
|||||||
|
|
||||||
if [ ! -e $ICINGA2_PID_FILE ]; then
|
if [ ! -e $ICINGA2_PID_FILE ]; then
|
||||||
echo "Not running"
|
echo "Not running"
|
||||||
exit 7
|
exit 3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pid=`cat $ICINGA2_PID_FILE`
|
pid=`cat $ICINGA2_PID_FILE`
|
||||||
@ -146,7 +146,7 @@ status() {
|
|||||||
echo "Running"
|
echo "Running"
|
||||||
else
|
else
|
||||||
echo "Not running"
|
echo "Not running"
|
||||||
exit 7
|
exit 3
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,7 +168,8 @@ case "$1" in
|
|||||||
start
|
start
|
||||||
;;
|
;;
|
||||||
condrestart)
|
condrestart)
|
||||||
status > /dev/null 2>&1 || exit 0
|
STATUS=$(status > /dev/null 2>&1)
|
||||||
|
if [ $? != 0 ]; then exit 0; fi
|
||||||
checkconfig restart fail
|
checkconfig restart fail
|
||||||
stop nofail
|
stop nofail
|
||||||
start
|
start
|
||||||
|
Loading…
x
Reference in New Issue
Block a user