From 231fd13429c664c1304dd692ccfea6be6a520595 Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 16 Dec 2016 20:55:09 -0800 Subject: [PATCH] launcher: disable pid check by default I'm postponing this until PyLink 2.0 to make migration from 1.0.x to 1.1 less of a nuisance. Closes #364. --- pylink | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pylink b/pylink index b6aa935..1543dd7 100755 --- a/pylink +++ b/pylink @@ -21,7 +21,7 @@ if __name__ == '__main__': parser = argparse.ArgumentParser(description='Starts an instance of PyLink IRC Services.') parser.add_argument('config', help='specifies the path to the config file (defaults to pylink.yml)', nargs='?', default='pylink.yml') parser.add_argument("-v", "--version", help="displays the program version and exits", action='store_true') - parser.add_argument("-c", "--no-check-pid", help="disables PID file checking", action='store_true') + parser.add_argument("-c", "--check-pid", help="enables PID file checking", action='store_true') parser.add_argument("-n", "--no-pid", help="skips generating PID files", action='store_true') args = parser.parse_args() @@ -44,9 +44,9 @@ if __name__ == '__main__': elif os.name == 'posix': sys.stdout.write("\x1b]2;PyLink %s\x07" % __version__) - # Check for a pid file, unless told not to, - # this stops instance overlap, which wrecks clientbots - if not args.no_check_pid: + # Check for a pid file. This stops instance overlap and user mistakes, which are especially an + # issue for clientbot... + if args.check_pid: config = conf.confname if os.path.exists("%s.pid" % config): log.error("PID file exists; aborting! If PyLink didn't shut down cleanly last time it "