]>
Commit | Line | Data |
---|---|---|
d6df53bf | 1 | #!@PYTHON@ |
940227cb | 2 | |
d69bd13a | 3 | import asyncio |
c5ddbd67 | 4 | import sys |
a2e77efa | 5 | import tornado.options |
940227cb | 6 | |
c5ddbd67 | 7 | import ipfire |
940227cb | 8 | |
d69bd13a MT |
9 | async def main(): |
10 | backend = ipfire.Backend("@configsdir@/@PACKAGE_NAME@.conf") | |
3c4f2edc | 11 | |
c5ddbd67 MT |
12 | if len(sys.argv) < 2: |
13 | sys.stderr.write("Argument needed\n") | |
14 | sys.exit(1) | |
3c4f2edc | 15 | |
a2e77efa MT |
16 | # Parse command line arguments |
17 | args = tornado.options.parse_command_line() | |
3c4f2edc | 18 | |
c5ddbd67 | 19 | # Run the task |
d69bd13a | 20 | await backend.run_task(*args) |
940227cb | 21 | |
d69bd13a | 22 | asyncio.run(main()) |