Activate i2p more reliably (#4265)

* move the i2p setup after the last bitcoin.conf check
* redo config even if i2p is active
This commit is contained in:
openoms 2023-11-22 13:03:07 +01:00 committed by GitHub
parent 624f8ca1a7
commit 37c8f6f897
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 12 deletions

View file

@ -210,11 +210,6 @@ else
echo "Provisioning Bitcoin Core interims update - keep default" >> ${logFile}
fi
# I2P
echo "Start i2pd" >> ${logFile}
/home/admin/_cache.sh set message "i2pd setup"
/home/admin/config.scripts/blitz.i2pd.sh on >> ${logFile}
# LND INTERIMS UPDATE
if [ ${#lndInterimsUpdate} -gt 0 ]; then
/home/admin/_cache.sh set message "Provisioning LND update"
@ -811,6 +806,11 @@ if [ ${confExists} -eq 0 ]; then
chown bitcoin:bitcoin /mnt/hdd/bitcoin/bitcoin.conf
fi
# I2P
echo "Start i2pd" >> ${logFile}
/home/admin/_cache.sh set message "i2pd setup"
/home/admin/config.scripts/blitz.i2pd.sh on >> ${logFile}
# signal setup done
/home/admin/_cache.sh set message "Setup Done"

View file

@ -107,7 +107,6 @@ function bitcoinI2Pstatus {
echo
}
echo "# Running: 'blitz.i2pd.sh $*'"
source /mnt/hdd/raspiblitz.conf
@ -145,11 +144,10 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
if systemctl is-active --quiet i2pd.service; then
echo "# i2pd.service is already active."
exit 0
fi
else
echo "# sudo systemctl enable i2pd"
sudo systemctl enable i2pd
fi
echo "# i2pd config"
/home/admin/config.scripts/blitz.conf.sh set debug tor /mnt/hdd/bitcoin/bitcoin.conf noquotes
@ -159,7 +157,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
/home/admin/config.scripts/blitz.conf.sh set onlynet tor /mnt/hdd/bitcoin/bitcoin.conf noquotes
confAdd onlynet i2p /mnt/hdd/bitcoin/bitcoin.conf
PASSWORD_B=$(sudo cat /mnt/hdd/bitcoin/bitcoin.conf | grep rpcpassword | cut -c 13-)
cat << EOF | sudo tee /etc/i2pd/i2pd.conf
cat <<EOF | sudo tee /etc/i2pd/i2pd.conf
# i2pd settings for the RaspiBlitz
# for the defaults see:
# https://github.com/PurpleI2P/i2pd/blob/openssl/contrib/i2pd.conf
@ -212,6 +210,7 @@ EOF
# setting value in raspiblitz.conf
/home/admin/config.scripts/blitz.conf.sh set i2pd "on"
localip=$(hostname -I | awk '{print $1}')
echo "# Config: /etc/i2pd/i2pd.conf"
echo "# i2pd web console: ${localip}:7070"
echo "# Monitor i2p in bitcoind:"