mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-10-09 20:32:52 +02:00
moved publicIP to raspiconf file
This commit is contained in:
@@ -66,15 +66,6 @@ if [ ${afterSetupScriptExists} -eq 1 ]; then
|
|||||||
sleep 100
|
sleep 100
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
################################
|
|
||||||
# PUBLIC IP
|
|
||||||
# for LND on startup
|
|
||||||
################################
|
|
||||||
printf "PUBLICIP=$(curl -vv ipinfo.io/ip 2> /run/publicip.log)\n" > /run/publicip;
|
|
||||||
chmod 774 /run/publicip
|
|
||||||
|
|
||||||
|
|
||||||
################################
|
################################
|
||||||
# HDD CHECK & PRE-INIT
|
# HDD CHECK & PRE-INIT
|
||||||
################################
|
################################
|
||||||
@@ -221,14 +212,37 @@ if [ ${hddIsAutoMounted} -eq 0 ]; then
|
|||||||
sudo umount -l /mnt/hdd
|
sudo umount -l /mnt/hdd
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
fi # END - no automount
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
# UPDATE HDD CONFIG FILE (if exists)
|
||||||
|
#####################################
|
||||||
|
|
||||||
|
echo "Check if HDD contains configuration .." >> $logFile
|
||||||
|
configExists=$(ls ${configFile} | grep -c '.conf')
|
||||||
|
if [ ${configExists} -eq 1 ]; then
|
||||||
|
|
||||||
|
# load values
|
||||||
|
echo "load and update publicIP" >> $logFile
|
||||||
|
source ${configFile}
|
||||||
|
|
||||||
|
# update public IP on boot
|
||||||
|
freshPublicIP=$(curl -vv ipinfo.io/ip 2>/dev/null)
|
||||||
|
if [ ${#publicIP} -eq 0 ]; then
|
||||||
|
echo "create value (${freshPublicIP})" >> $logFile
|
||||||
|
echo "publicIP=${freshPublicIP}" >> $configFile
|
||||||
|
else
|
||||||
|
echo "update value (${freshPublicIP})" >> $logFile
|
||||||
|
sed -i "s/^publicIP=.*/publicIP=${freshPublicIP}/g" ${configFile}
|
||||||
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
################################
|
################################
|
||||||
# INFOFILE BASICS
|
# SD INFOFILE BASICS
|
||||||
################################
|
################################
|
||||||
|
|
||||||
# EXIT on BOOTSTRAP HERE AT THE MOMENT
|
|
||||||
echo "DONE BOOTSTRAP (before any configs etc)" >> $logFile
|
|
||||||
sed -i "s/^state=.*/state=ready/g" ${infoFile}
|
sed -i "s/^state=.*/state=ready/g" ${infoFile}
|
||||||
sed -i "s/^message=.*/message='waiting login'/g" ${infoFile}
|
sed -i "s/^message=.*/message='waiting login'/g" ${infoFile}
|
||||||
|
echo "DONE BOOTSTRAP" >> $logFile
|
||||||
exit 0
|
exit 0
|
@@ -9,7 +9,7 @@ After=bitcoind.service
|
|||||||
#OnFailure=systemd-sendmail@%n
|
#OnFailure=systemd-sendmail@%n
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
EnvironmentFile=/run/publicip
|
EnvironmentFile=/mnt/hdd/raspiblitz.conf
|
||||||
ExecStart=/usr/local/bin/lnd --externalip=${PUBLICIP}
|
ExecStart=/usr/local/bin/lnd --externalip=${PUBLICIP}
|
||||||
PIDFile=/home/bitcoin/.lnd/lnd.pid
|
PIDFile=/home/bitcoin/.lnd/lnd.pid
|
||||||
User=bitcoin
|
User=bitcoin
|
||||||
|
@@ -9,15 +9,8 @@ After=bitcoind.service
|
|||||||
#OnFailure=systemd-sendmail@%n
|
#OnFailure=systemd-sendmail@%n
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
# get var PUBIP from file
|
EnvironmentFile=/mnt/hdd/raspiblitz.conf
|
||||||
EnvironmentFile=/mnt/hdd/tor/v3Address
|
|
||||||
|
|
||||||
# TOR Hidden Service v2
|
|
||||||
ExecStart=/usr/local/bin/lnd --tor.active --tor.v2 --listen=127.0.0.1:9735
|
ExecStart=/usr/local/bin/lnd --tor.active --tor.v2 --listen=127.0.0.1:9735
|
||||||
|
|
||||||
# TOR Hidden Service v3
|
|
||||||
# ExecStart=/usr/local/bin/lnd --tor.active --tor.v3 --externalip=${V3ADDRESS} --listen=127.0.0.1:9735
|
|
||||||
|
|
||||||
PIDFile=/home/bitcoin/.lnd/lnd.pid
|
PIDFile=/home/bitcoin/.lnd/lnd.pid
|
||||||
User=bitcoin
|
User=bitcoin
|
||||||
Group=bitcoin
|
Group=bitcoin
|
||||||
|
Reference in New Issue
Block a user