mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 01:09:22 +01:00
pylink: Stop daemon if pid file exists and we're checking
This commit is contained in:
parent
aaadb63137
commit
a30942669a
4
pylink
4
pylink
@ -41,8 +41,8 @@ if __name__ == '__main__':
|
||||
if not args.no_checkpid:
|
||||
config = conf.confname
|
||||
if os.path.exists("%s.pid" % config):
|
||||
log.error("PID file exists!")
|
||||
|
||||
log.error("PID file exists!.. EXITING")
|
||||
sys.exit()
|
||||
# Write a PID file unless specifically told not to.
|
||||
if not args.no_pid:
|
||||
with open('%s.pid' % conf.confname, 'w') as f:
|
||||
|
Loading…
Reference in New Issue
Block a user