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,8 +75,12 @@ stop() {
|
|||
printf "Stopping Icinga 2: "
|
||||
if [ ! -e $ICINGA2_PID_FILE ]; then
|
||||
echo "The PID file '$ICINGA2_PID_FILE' does not exist."
|
||||
if [ "x$1" = "xnofail" ]; then
|
||||
return
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
pid=`cat $ICINGA2_PID_FILE`
|
||||
|
||||
|
@ -145,10 +149,10 @@ case "$1" in
|
|||
stop
|
||||
;;
|
||||
status)
|
||||
status FOO
|
||||
status
|
||||
;;
|
||||
restart|condrestart)
|
||||
stop
|
||||
stop nofail
|
||||
start
|
||||
;;
|
||||
reload)
|
||||
|
|
Loading…
Reference in New Issue