move run_once to allow access to help -h

This commit is contained in:
robin 2022-05-15 13:16:11 +02:00
parent 965176ad78
commit b6c0f3bfef
1 changed files with 1 additions and 1 deletions

View File

@ -86,11 +86,11 @@ def main():
f.write('%s\n' %lines)
f.close()
def startup():
f_run_once.run_once()
parser = argparse.ArgumentParser(description = "Mastodon robot posting RSS-Feeds")
parser.add_argument('--daemon', dest='daemon', action='store_true', help='run in daemon mode and repeat after a delay')
parser.add_argument('--delay', dest='daemon_delay', action='store', type=int, help='number of seconds to wait for next run default=3600')
args = parser.parse_args()
f_run_once.run_once()
run_as_daemon = False
if args.daemon or args.daemon_delay:
run_as_daemon = True