mirror of https://github.com/Icinga/icinga2.git
Make sure that the restart action doesn't fail when the PID file isn't there.
This commit is contained in:
parent
a514d0d97f
commit
8d4e7bc002
|
@ -75,7 +75,11 @@ stop() {
|
||||||
printf "Stopping Icinga 2: "
|
printf "Stopping Icinga 2: "
|
||||||
if [ ! -e $ICINGA2_PID_FILE ]; then
|
if [ ! -e $ICINGA2_PID_FILE ]; then
|
||||||
echo "The PID file '$ICINGA2_PID_FILE' does not exist."
|
echo "The PID file '$ICINGA2_PID_FILE' does not exist."
|
||||||
exit 1
|
if [ "x$1" = "xnofail" ]; then
|
||||||
|
return
|
||||||
|
else
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pid=`cat $ICINGA2_PID_FILE`
|
pid=`cat $ICINGA2_PID_FILE`
|
||||||
|
@ -145,10 +149,10 @@ case "$1" in
|
||||||
stop
|
stop
|
||||||
;;
|
;;
|
||||||
status)
|
status)
|
||||||
status FOO
|
status
|
||||||
;;
|
;;
|
||||||
restart|condrestart)
|
restart|condrestart)
|
||||||
stop
|
stop nofail
|
||||||
start
|
start
|
||||||
;;
|
;;
|
||||||
reload)
|
reload)
|
||||||
|
|
Loading…
Reference in New Issue