mynode/rootfs/standard/usr/bin/mynode-manage-apps
2022-03-25 22:42:55 -05:00

34 lines
804 B
Python
Executable File

#!/usr/local/bin/python3
from argparse import ArgumentParser
from application_info import *
import logging
from systemd import journal
import os
log = logging.getLogger('mynode_manage_apps')
log.addHandler(journal.JournaldLogHandler())
log.setLevel(logging.INFO)
set_logger(log)
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":
print("createbasefolders - not needed?")
elif args.action == "init":
init_dynamic_apps()
else:
print("UNKNOWN BASE ACTION")
if __name__ == '__main__':
main()