mynode/rootfs/standard/usr/bin/mynode-manage-apps

34 lines
804 B
Plaintext
Raw Normal View History

2022-03-20 02:53:50 +00:00
#!/usr/local/bin/python3
from argparse import ArgumentParser
from application_info import *
2022-03-26 03:42:55 +00:00
import logging
from systemd import journal
2022-03-22 04:36:54 +00:00
import os
2022-03-26 03:42:55 +00:00
log = logging.getLogger('mynode_manage_apps')
log.addHandler(journal.JournaldLogHandler())
log.setLevel(logging.INFO)
set_logger(log)
2022-03-20 02:53:50 +00:00
def main():
parser = ArgumentParser(prog='mynode-manage-apps')
action_choices = (
'init',
'createfolders',
)
parser.add_argument('action', help='action to manage mynode application', nargs='?', choices=action_choices)
args = parser.parse_args()
if args.action == "createbasefolders":
2022-03-22 04:36:54 +00:00
print("createbasefolders - not needed?")
2022-03-20 02:53:50 +00:00
elif args.action == "init":
init_dynamic_apps()
2022-03-20 02:53:50 +00:00
else:
print("UNKNOWN BASE ACTION")
if __name__ == '__main__':
main()