mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-12-27 23:14:04 +00:00
Add CLI command to stop dynamic apps
This commit is contained in:
parent
44dbaf0bd8
commit
fe3b7f2a8f
|
@ -6,6 +6,9 @@ echo "Stopping myNode services..."
|
|||
# Mark we are shutting down
|
||||
touch /tmp/shutting_down
|
||||
|
||||
# Stop dynamic apps
|
||||
date
|
||||
mynode-manage-apps stop
|
||||
|
||||
# Stop additional services
|
||||
date
|
||||
|
@ -13,7 +16,7 @@ systemctl stop glances lndhub netdata rtl webssh2 whirlpool dojo
|
|||
date
|
||||
systemctl stop btcpayserver btcrpcexplorer specter caravan lnbits
|
||||
date
|
||||
systemctl stop thunderhub mempool
|
||||
systemctl stop thunderhub mempool
|
||||
date
|
||||
|
||||
|
||||
|
|
|
@ -934,6 +934,15 @@ def list_dynamic_apps():
|
|||
for app_name in app_names:
|
||||
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
|
||||
# Prior to running, service should have been stopped and disabled
|
||||
|
|
Loading…
Reference in New Issue
Block a user