diff --git a/rootfs/standard/usr/bin/mynode_stop_critical_services.sh b/rootfs/standard/usr/bin/mynode_stop_critical_services.sh index 85a738b3..c3bfea31 100755 --- a/rootfs/standard/usr/bin/mynode_stop_critical_services.sh +++ b/rootfs/standard/usr/bin/mynode_stop_critical_services.sh @@ -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 diff --git a/rootfs/standard/var/pynode/application_info.py b/rootfs/standard/var/pynode/application_info.py index 625bef02..b29d95da 100644 --- a/rootfs/standard/var/pynode/application_info.py +++ b/rootfs/standard/var/pynode/application_info.py @@ -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