Init script: Check whether the PID file exists

fixes #7047
This commit is contained in:
Gunnar Beutner 2014-09-02 13:48:48 +02:00
parent dde00a3f16
commit 5ae1f4273c

View File

@ -65,7 +65,7 @@ stop() {
if [ "x$1" = "xnofail" ]; then
return
else
exit 1
exit 7
fi
fi
@ -94,6 +94,10 @@ stop() {
reload() {
printf "Reloading Icinga 2: "
if [ ! -e $ICINGA2_PID_FILE ]; then
exit 7
fi
pid=`cat $ICINGA2_PID_FILE`
if kill -HUP $pid >/dev/null 2>&1; then
echo "Done"
@ -131,6 +135,11 @@ checkconfig() {
status() {
printf "Icinga 2 status: "
if [ ! -e $ICINGA2_PID_FILE ]; then
echo "Not running"
exit 7
fi
pid=`cat $ICINGA2_PID_FILE`
if kill -CHLD $pid >/dev/null 2>&1; then
echo "Running"