Add CLI command to stop dynamic apps

This commit is contained in:
Taylor Helsper 2023-02-20 21:20:04 -06:00
parent 44dbaf0bd8
commit fe3b7f2a8f
2 changed files with 13 additions and 1 deletions

View File

@ -6,6 +6,9 @@ echo "Stopping myNode services..."
# Mark we are shutting down # Mark we are shutting down
touch /tmp/shutting_down touch /tmp/shutting_down
# Stop dynamic apps
date
mynode-manage-apps stop
# Stop additional services # Stop additional services
date date
@ -13,7 +16,7 @@ systemctl stop glances lndhub netdata rtl webssh2 whirlpool dojo
date date
systemctl stop btcpayserver btcrpcexplorer specter caravan lnbits systemctl stop btcpayserver btcrpcexplorer specter caravan lnbits
date date
systemctl stop thunderhub mempool systemctl stop thunderhub mempool
date date

View File

@ -934,6 +934,15 @@ def list_dynamic_apps():
for app_name in app_names: for app_name in app_names:
print(" {}".format(app_name)) print(" {}".format(app_name))
def stop_dynamic_apps(app_names):
dynamic_app_names = get_dynamic_app_names()
for app_name in app_names:
for dynamic_app_name in dynamic_app_names:
if app_name == "all" or app_name == dynamic_app_name:
app_data = get_application( dynamic_app_name )
if app_data["can_enable_disable"]:
stop_service(dynamic_app_name)
# Typically, the mynode_uninstall_app.sh runs first and calls mynode-manage-apps uninstall to run this # Typically, the mynode_uninstall_app.sh runs first and calls mynode-manage-apps uninstall to run this
# Prior to running, service should have been stopped and disabled # Prior to running, service should have been stopped and disabled