move run_once to allow access to help -h
This commit is contained in:
parent
965176ad78
commit
b6c0f3bfef
2
main.py
2
main.py
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue