Don't start Radicale when PID file exists (fixes #890)
This commit is contained in:
parent
83baebd750
commit
9d193b6b30
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user