mynode/rootfs/standard/usr/bin/mynode_stop_critical_services.sh
2023-02-20 21:20:04 -06:00

41 lines
722 B
Bash
Executable File

#!/bin/bash
# Message
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
systemctl stop glances lndhub netdata rtl webssh2 whirlpool dojo
date
systemctl stop btcpayserver btcrpcexplorer specter caravan lnbits
date
systemctl stop thunderhub mempool
date
# Manually stop services (backup)
if [ "$(systemctl is-active docker)" = "active" ]; then
/mnt/hdd/mynode/dojo/docker/my-dojo/dojo.sh stop || true
fi
# Stop core services
date
systemctl stop electrs loop pool lnd quicksync
date
killall bitcoind || true
systemctl stop bitcoin
date
# Sync filesystem
sync
echo "Done stopping services."