mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-24 22:58:43 +01:00
checking bitcoin running by systemctl
This commit is contained in:
parent
b871cd9ed7
commit
35c04f0a4c
2 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@ if [ ${mountOK} -eq 1 ]; then
|
|||
echo "*** Prepare ${network} ***"
|
||||
sudo killall -u bitcoin
|
||||
sleep 5
|
||||
sudo rm -r /home/bitcoin/.${network}
|
||||
sudo rm -r /home/bitcoin/.${network} 2>/dev/null
|
||||
sleep 2
|
||||
if [ -d /home/bitcoin/.${network} ]; then
|
||||
echo "FAIL - /home/bitcoin/.${network} exists and cannot be removed!"
|
||||
|
|
|
@ -9,7 +9,7 @@ chain=$(${network}-cli -datadir=/home/bitcoin/.${network} getblockchaininfo | jq
|
|||
|
||||
# verify that bitcoin is running
|
||||
echo "*** Checking ${network} ***"
|
||||
bitcoinRunning=$(sudo -u bitcoin ${network}-cli getblockchaininfo | grep -c blocks)
|
||||
bitcoinRunning=$(systemctl status ${network}d.service 2>/dev/null | grep -c running)
|
||||
if [ ${bitcoinRunning} -eq 0 ]; then
|
||||
# HDD is not available yet
|
||||
echo "FAIL - ${network}d is not running"
|
||||
|
|
Loading…
Add table
Reference in a new issue