Commit d9361b6e authored by Dimitris Aragriorgs's avatar Dimitris Aragriorgs
Browse files

Remove stale pid lock file

Signed-off-by: default avatarDimitris Aragriorgs <>
parent 4a3ed624
......@@ -31,6 +31,7 @@ import traceback
import subprocess
import daemon
import daemon.runner
import daemon.pidlockfile
import nfqueue
import pyinotify
......@@ -953,6 +954,12 @@ if __name__ == "__main__":
if opts.daemonize:
pidfile = daemon.pidlockfile.TimeoutPIDLockFile(
config["general"]["pidfile"], 10)
# Remove any stale PID files, left behind by previous invocations
if (daemon.runner.is_pidfile_stale(pidfile) or
pidfile.read_pid() is None):
logger.warning("Removing stale PID lock file %s", pidfile.path)
d = daemon.DaemonContext(pidfile=pidfile,,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment