mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-25 19:21:57 +02:00
checking bitcoin running by systemctl
This commit is contained in:
@@ -17,7 +17,7 @@ if [ ${mountOK} -eq 1 ]; then
|
|||||||
echo "*** Prepare ${network} ***"
|
echo "*** Prepare ${network} ***"
|
||||||
sudo killall -u bitcoin
|
sudo killall -u bitcoin
|
||||||
sleep 5
|
sleep 5
|
||||||
sudo rm -r /home/bitcoin/.${network}
|
sudo rm -r /home/bitcoin/.${network} 2>/dev/null
|
||||||
sleep 2
|
sleep 2
|
||||||
if [ -d /home/bitcoin/.${network} ]; then
|
if [ -d /home/bitcoin/.${network} ]; then
|
||||||
echo "FAIL - /home/bitcoin/.${network} exists and cannot be removed!"
|
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
|
# verify that bitcoin is running
|
||||||
echo "*** Checking ${network} ***"
|
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
|
if [ ${bitcoinRunning} -eq 0 ]; then
|
||||||
# HDD is not available yet
|
# HDD is not available yet
|
||||||
echo "FAIL - ${network}d is not running"
|
echo "FAIL - ${network}d is not running"
|
||||||
|
Reference in New Issue
Block a user