mynode/rootfs/standard/usr/bin/mynode_stop_critical_services.sh

41 lines
722 B
Bash
Raw Normal View History

2019-12-19 03:45:44 +00:00
#!/bin/bash
2020-05-09 17:23:47 +00:00
# Message
echo "Stopping myNode services..."
2020-04-23 02:59:37 +00:00
# Mark we are shutting down
touch /tmp/shutting_down
2023-02-21 03:20:04 +00:00
# Stop dynamic apps
date
mynode-manage-apps stop
2020-04-23 02:59:37 +00:00
2019-12-19 03:45:44 +00:00
# Stop additional services
2021-02-13 06:07:49 +00:00
date
2020-10-30 03:19:07 +00:00
systemctl stop glances lndhub netdata rtl webssh2 whirlpool dojo
2021-02-13 06:07:49 +00:00
date
systemctl stop btcpayserver btcrpcexplorer specter caravan lnbits
2021-02-13 06:07:49 +00:00
date
2023-02-21 03:20:04 +00:00
systemctl stop thunderhub mempool
2021-02-13 06:07:49 +00:00
date
2019-12-19 03:45:44 +00:00
# Manually stop services (backup)
if [ "$(systemctl is-active docker)" = "active" ]; then
/mnt/hdd/mynode/dojo/docker/my-dojo/dojo.sh stop || true
fi
2019-12-19 03:45:44 +00:00
# Stop core services
2021-02-13 06:07:49 +00:00
date
systemctl stop electrs loop pool lnd quicksync
2021-02-18 03:22:05 +00:00
date
killall bitcoind || true
systemctl stop bitcoin
2021-02-13 06:07:49 +00:00
date
2019-12-19 03:45:44 +00:00
2020-10-30 03:19:07 +00:00
# Sync filesystem
sync
2021-02-13 06:07:49 +00:00
echo "Done stopping services."