3
0
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:
Ken Spencer 2016-10-15 16:43:14 -04:00
parent aaadb63137
commit a30942669a

4
pylink
View File

@ -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: