1 Commits

Author SHA1 Message Date
Jay Larson
0ac62b6e9a Updated status_of_proc to properly deal with stopped process that uses pidfile 2018-10-07 16:11:58 -05:00
2 changed files with 8 additions and 7 deletions

View File

@@ -18,7 +18,7 @@ DESC = This package supplies the core required init scripts for startup
ARCHIVE := '' ARCHIVE := ''
SRCDIR := $(PWD)/SRC/initscripts SRCDIR := $(PWD)/SRC/initscripts
PATCHDIR := $(PWD)/SRC/patches PATCHDIR := $(PWD)/SRC/patches
VERSION := 1.11-0 VERSION := 1.12-0
include /usr/share/snap/Makefile.snaplinux include /usr/share/snap/Makefile.snaplinux

View File

@@ -213,25 +213,26 @@ status_of_proc() {
echo "$NAME is not running" && return 1 echo "$NAME is not running" && return 1
fi fi
else else
echo "Cannot read pid file ($pidfile)"
pid=$(pidofproc "$pathname") pid=$(pidofproc "$pathname")
if [ "$?" -eq 0 ]; then if [ "$?" -eq 0 ]; then
echo "Cannot read pid file ($pidfile)"
echo "$NAME running with PID: $pid" echo "$NAME running with PID: $pid"
return 4
else else
echo "$NAME is not running" echo "$NAME is not running"
return 3
fi fi
return 4
fi fi
else else
pid=$(pidofproc "$pathname") pid=$(pidofproc "$pathname")
if [ "$?" -eq 0 ]; then if [ "$?" -eq 0 ]; then
echo "$NAME running with PID: $pid" && return 0 echo "$NAME running with PID: $pid"
return 0
else else
echo "$NAME is not runing" && return 3 echo "$NAME is not runing"
return 3
fi fi
fi fi
} }