mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2024-11-20 10:12:06 +01:00
mempool: start only if the setup is ready (#1944)
This commit is contained in:
parent
390cb70d0e
commit
54ab479635
@ -423,7 +423,7 @@ if [ "${mempoolExplorer}" != "${choice}" ]; then
|
|||||||
errorOnInstall=$?
|
errorOnInstall=$?
|
||||||
if [ "${choice}" = "on" ]; then
|
if [ "${choice}" = "on" ]; then
|
||||||
if [ ${errorOnInstall} -eq 0 ]; then
|
if [ ${errorOnInstall} -eq 0 ]; then
|
||||||
sudo sytemctl start mempool
|
sudo systemctl start mempool
|
||||||
whiptail --title " Installed Mempool Space " --msgbox "\
|
whiptail --title " Installed Mempool Space " --msgbox "\
|
||||||
The txindex may need to be created before Mempool can be active.\n
|
The txindex may need to be created before Mempool can be active.\n
|
||||||
This can take ~7 hours on a RPi4 with SSD. Monitor the progress on the LCD.\n
|
This can take ~7 hours on a RPi4 with SSD. Monitor the progress on the LCD.\n
|
||||||
|
@ -2,11 +2,14 @@
|
|||||||
|
|
||||||
# https://github.com/mempool/mempool
|
# https://github.com/mempool/mempool
|
||||||
|
|
||||||
|
pinnedVersion="v2.0.1"
|
||||||
|
|
||||||
# command info
|
# command info
|
||||||
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||||
echo "# small config script to switch Mempool on or off"
|
echo "# small config script to switch Mempool on or off"
|
||||||
echo "# bonus.mempool.sh [status|on|off]"
|
echo "# installs the $pinnedVersion by default"
|
||||||
exit 1
|
echo "# bonus.mempool.sh [status|on|off]"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
source /mnt/hdd/raspiblitz.conf
|
source /mnt/hdd/raspiblitz.conf
|
||||||
@ -116,7 +119,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
|||||||
cd /home/mempool
|
cd /home/mempool
|
||||||
sudo -u mempool git clone https://github.com/mempool/mempool.git
|
sudo -u mempool git clone https://github.com/mempool/mempool.git
|
||||||
cd mempool
|
cd mempool
|
||||||
sudo -u mempool git reset --hard v2.0.1
|
sudo -u mempool git reset --hard $pinnedVersion
|
||||||
|
|
||||||
# modify an
|
# modify an
|
||||||
#echo "# try to suppress question on statistics report .."
|
#echo "# try to suppress question on statistics report .."
|
||||||
@ -258,7 +261,14 @@ EOF
|
|||||||
echo "# mempool already installed."
|
echo "# mempool already installed."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sudo systemctl start mempool
|
# start the service if ready
|
||||||
|
source /home/admin/raspiblitz.info
|
||||||
|
if [ "${state}" == "ready" ]; then
|
||||||
|
echo "# OK - the mempool.service is enabled, system is on ready so starting service"
|
||||||
|
sudo systemctl start mempool
|
||||||
|
else
|
||||||
|
echo "# OK - the mempool.service is enabled, to start manually use: sudo systemctl start mempool"
|
||||||
|
fi
|
||||||
|
|
||||||
# setting value in raspi blitz config
|
# setting value in raspi blitz config
|
||||||
sudo sed -i "s/^mempoolExplorer=.*/mempoolExplorer=on/g" /mnt/hdd/raspiblitz.conf
|
sudo sed -i "s/^mempoolExplorer=.*/mempoolExplorer=on/g" /mnt/hdd/raspiblitz.conf
|
||||||
|
Loading…
Reference in New Issue
Block a user