# HG changeset patch # User jfp <jf.pieronne@laposte.net> # Date 1685435662 -7200 # Tue May 30 10:34:22 2023 +0200 # Node ID b9f3f5f114f9d2271677704b1a37135da5234038 # Parent c4309c21038eefdc8031168d9c2241db0b30c6c2 Add --nodaemon (or -n) argument to start supervidord in foreground diff --git a/supervisord.py b/supervisord.py --- a/supervisord.py +++ b/supervisord.py @@ -919,7 +919,13 @@ required=False, type=str, default='', - help='password for supervisord', + help='Password for supervisord', + ) + parser.add_argument( + '-n', + '--nodaemon', + action='store_true', + help='Run supervisord in the foreground', ) args = parser.parse_args() supervisorctl_pwd = args.password @@ -928,7 +934,7 @@ config.read_file(args.configuration) args.configuration.close() - nodaemon = config['supervisord'].getboolean('nodaemon', False) + nodaemon = config['supervisord'].getboolean('nodaemon', False) or args.nodaemon if not nodaemon and not is_deamon(): usrdaemon = config['supervisord'].get('user', 'system') stdout_file = config['supervisord'].get('stdout_file', 'NLA0:')