#4492 fix electrs recover on min-build

This commit is contained in:
rootzoll 2024-03-21 13:41:33 +01:00
parent 5d2b4c84fc
commit ff23ede250

View File

@ -314,16 +314,6 @@ fi
if [ "$1" = "1" ] || [ "$1" = "on" ]; then
echo "# ACTIVATING ELECTRS"
# check and create storage dir
if ! sudo ls /mnt/hdd/app-storage/electrs 2>/dev/null; then
sudo mkdir /mnt/hdd/app-storage/electrs
echo
echo "# The electrs database will be built in /mnt/hdd/app-storage/electrs/db. Takes ~18 hours and ~50Gb diskspace"
echo
fi
# always fix user id
sudo chown -R electrs:electrs /mnt/hdd/app-storage/electrs
isInstalled=$(sudo ls /etc/systemd/system/electrs.service 2>/dev/null | grep -c 'electrs.service')
if [ ${isInstalled} -eq 0 ]; then
@ -342,6 +332,16 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
fi
fi
# check and create storage dir
if ! sudo ls /mnt/hdd/app-storage/electrs 2>/dev/null; then
sudo mkdir /mnt/hdd/app-storage/electrs
echo
echo "# The electrs database will be built in /mnt/hdd/app-storage/electrs/db. Takes ~18 hours and ~50Gb diskspace"
echo
fi
# always fix user id
sudo chown -R electrs:electrs /mnt/hdd/app-storage/electrs
echo
echo "# Getting RPC credentials from the bitcoin.conf"
# read PASSWORD_B