def main():
args = get_options()
config = ConfigParser.ConfigParser()
config.read(args.conffile)
if config.has_option('default', 'pidfile'):
pid_fn = os.path.expanduser(config.get('default', 'pidfile'))
else:
pid_fn = '/var/run/germqtt.pid'
if args.foreground:
_main(args, config)
else:
pid = pid_file_module.TimeoutPIDLockFile(pid_fn, 10)
with daemon.DaemonContext(pidfile=pid):
_main(args, config)
评论列表
文章目录