Don't start Radicale when PID file exists (fixes #890)

This commit is contained in:
Guillaume Ayoub 2012-08-03 00:29:06 +02:00
parent 83baebd750
commit 9d193b6b30

View File

@ -91,6 +91,8 @@ def run():
# Fork if Radicale is launched as daemon # Fork if Radicale is launched as daemon
if options.daemon: if options.daemon:
if options.pid and os.path.exists(options.pid):
raise OSError("PID file exists: %s" % options.pid)
pid = os.fork() pid = os.fork()
if pid: if pid:
try: try: