diff --git a/home.admin/config.scripts/bonus.electrs.sh b/home.admin/config.scripts/bonus.electrs.sh index 27fd799e4..1bca344fc 100755 --- a/home.admin/config.scripts/bonus.electrs.sh +++ b/home.admin/config.scripts/bonus.electrs.sh @@ -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