diff --git a/sh/runscript.sh.in b/sh/runscript.sh.in index fe30a03..fcadd17 100644 --- a/sh/runscript.sh.in +++ b/sh/runscript.sh.in @@ -148,6 +148,10 @@ start() service_inactive && _inactive=true mark_service_inactive fi + if [ -n "$pidfile" ] && \ + ! start-stop-daemon --test --quiet --stop --pidfile "$pidfile"; then + rm -f ${pidfile} + fi eval start-stop-daemon --start \ --exec $command \ ${procname:+--name} $procname \