diff options
author | Sam Pearson <sam@sgp.me.uk> | 2018-10-01 17:10:29 +0100 |
---|---|---|
committer | Sam Pearson <sam@sgp.me.uk> | 2018-10-02 08:39:21 +0100 |
commit | 27811a48bc63b05973f537ade7e09d5c10a2dde6 (patch) | |
tree | 76baa4e02d9358785a940b29e26544c0394cb0fa /conf | |
parent | 13b3db1370262b261f20ece57da5663eb9fe84a4 (diff) |
Add check for PIDFILE to init script stop action
The install script calls a service restart at build, this failed
if the stop action in the init script doesn't check for the
existence of the PIDFILE first, so check.
Diffstat (limited to 'conf')
-rwxr-xr-x | conf/sysvinit.example | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/conf/sysvinit.example b/conf/sysvinit.example index 3c457dd64..6b47c4371 100755 --- a/conf/sysvinit.example +++ b/conf/sysvinit.example @@ -30,7 +30,11 @@ start_daemon() { } stop_daemon() { - kill -TERM `cat $PIDFILE` + if [ -e "$PIDFILE" ]; then + kill -TERM `cat $PIDFILE` + else + echo "No $PIDFILE found, skipping KILL." + fi } case "$1" in |