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

38 lines
681 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
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
2020-10-30 03:19:07 +00:00
systemctl stop btcpayserver btc_rpc_explorer specter caravan lnbits
2021-02-13 06:07:49 +00:00
date
2020-11-08 21:33:25 +00:00
systemctl stop thunderhub mempoolspace
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
2021-03-31 03:09:55 +00:00
systemctl stop electrs loopd poold lnd quicksync
2021-02-18 03:22:05 +00:00
date
killall bitcoind || true
systemctl stop bitcoind
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."