mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-23 22:47:03 +01:00
prevent hanging shutdows (#3510)
* prevent hanging shutdows * also timeout stopping bitcoind
This commit is contained in:
parent
59c2e4d8bf
commit
5184044faf
1 changed files with 16 additions and 16 deletions
|
@ -28,28 +28,28 @@ sleep 3
|
|||
|
||||
# stopping electRS (if installed)
|
||||
echo "stop electrs - please wait .."
|
||||
sudo systemctl stop electrs 2>/dev/null
|
||||
sudo timeout 120 systemctl stop electrs 2>/dev/null
|
||||
|
||||
# stopping LNDg (if installed)
|
||||
isInstalled=$(sudo ls /etc/systemd/system/jobs-lndg.service 2>/dev/null | grep -c 'jobs-lndg.service')
|
||||
if ! [ ${isInstalled} -eq 0 ]; then
|
||||
echo "stop LNDg - please wait .."
|
||||
sudo systemctl stop gunicorn.service 2>/dev/null
|
||||
sudo systemctl stop jobs-lndg.timer 2>/dev/null
|
||||
sudo systemctl stop jobs-lndg.service 2>/dev/null
|
||||
sudo systemctl stop rebalancer-lndg.timer 2>/dev/null
|
||||
sudo systemctl stop rebalancer-lndg.service 2>/dev/null
|
||||
sudo systemctl stop htlc-stream-lndg.service 2>/dev/null
|
||||
sudo timeout 120 systemctl stop gunicorn.service 2>/dev/null
|
||||
sudo timeout 120 systemctl stop jobs-lndg.timer 2>/dev/null
|
||||
sudo timeout 120 systemctl stop jobs-lndg.service 2>/dev/null
|
||||
sudo timeout 120 systemctl stop rebalancer-lndg.timer 2>/dev/null
|
||||
sudo timeout 120 systemctl stop rebalancer-lndg.service 2>/dev/null
|
||||
sudo timeout 120 systemctl stop htlc-stream-lndg.service 2>/dev/null
|
||||
fi
|
||||
|
||||
# stopping lightning
|
||||
echo "stop lightning - please wait .."
|
||||
sudo systemctl stop lnd 2>/dev/null
|
||||
sudo systemctl stop lightningd 2>/dev/null
|
||||
sudo systemctl stop tlnd 2>/dev/null
|
||||
sudo systemctl stop tlightningd 2>/dev/null
|
||||
sudo systemctl stop slnd 2>/dev/null
|
||||
sudo systemctl stop slightningd 2>/dev/null
|
||||
sudo timeout 120 systemctl stop lnd 2>/dev/null
|
||||
sudo timeout 120 systemctl stop lightningd 2>/dev/null
|
||||
sudo timeout 120 systemctl stop tlnd 2>/dev/null
|
||||
sudo timeout 120 systemctl stop tlightningd 2>/dev/null
|
||||
sudo timeout 120 systemctl stop slnd 2>/dev/null
|
||||
sudo timeout 120 systemctl stop slightningd 2>/dev/null
|
||||
|
||||
if [ "${network}" != "" ]; then
|
||||
|
||||
|
@ -59,9 +59,9 @@ if [ "${network}" != "" ]; then
|
|||
|
||||
# stopping bitcoind (thru systemd)
|
||||
echo "stop ${network}d (2) - please wait .."
|
||||
sudo systemctl stop ${network}d 2>/dev/null
|
||||
sudo systemctl stop t${network}d 2>/dev/null
|
||||
sudo systemctl stop s${network}d 2>/dev/null
|
||||
sudo timeout 120 systemctl stop ${network}d 2>/dev/null
|
||||
sudo timeout 120 systemctl stop t${network}d 2>/dev/null
|
||||
sudo timeout 120 systemctl stop s${network}d 2>/dev/null
|
||||
sleep 3
|
||||
else
|
||||
echo "skipping stopping layer1 (network=='' in cache)"
|
||||
|
|
Loading…
Add table
Reference in a new issue