Browse Source

fixed getpublicip script

#146
rootzoll 6 years ago
parent
commit
7f7e9d63d1
  1. 3
      build.sdcard/raspbianStretchDesktop.sh
  2. 4
      home.admin/00infoLCD.sh
  3. 2
      home.admin/60finishHDD.sh
  4. 1
      home.admin/70initLND.sh

3
build.sdcard/raspbianStretchDesktop.sh

@ -191,7 +191,6 @@ olaoluwaPGP="65317176B6857F98834EDBE8964EA263DD637C21"
# setup public ip service
cat > ./getpublicip.sh <<EOF
getPubliIPScript='' read -r -d '' String <<"EOF"
#!/bin/bash
# RaspiBolt LND Mainnet: script to get public ip address
# /usr/local/bin/getpublicip.sh
@ -199,7 +198,7 @@ getPubliIPScript='' read -r -d '' String <<"EOF"
echo 'getpublicip.sh started, writing public IP address every 10 minutes into /run/publicip'
while [ 0 ];
do
printf "PUBLICIP=$(curl -vv ipinfo.io/ip 2> /run/publicip.log)\n" > /run/publicip;
printf "PUBLICIP=\$(curl -vv ipinfo.io/ip 2> /run/publicip.log)\n" > /run/publicip;
sleep 600
done;
EOF

4
home.admin/00infoLCD.sh

@ -13,7 +13,7 @@ if [ "$USER" = "pi" ]; then
fi
# load network
network=`sudo cat /home/admin/.network`
network=`sudo cat /home/admin/.network 2>/dev/null`
### USER PI AUTOSTART (LCD Display)
localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
@ -30,7 +30,7 @@ if [ "$USER" = "pi" ]; then
do
# refresh network
network=`sudo cat /home/admin/.network`
network=`sudo cat /home/admin/.network 2>/dev/null`
# get the setup state
setupStepExists=$(sudo -u admin ls -la /home/admin/.setup 2>/dev/null | grep -c .setup)

2
home.admin/60finishHDD.sh

@ -40,6 +40,8 @@ if [ ${mountOK} -eq 1 ]; then
echo "*** Start ${network} ***"
echo "This can take a while .."
sudo cp /home/admin/assets/${network}d.service /etc/systemd/system/${network}d.service
sudo chmod +x /etc/systemd/system/${network}d.service
sudo systemctl daemon-reload
sudo systemctl enable ${network}d.service
sudo systemctl start ${network}d.service
echo "Giving ${network}d service 180 seconds to init - please wait ..."

1
home.admin/70initLND.sh

@ -69,6 +69,7 @@ if [ ${lndRunning} -eq 0 ]; then
sed -i "5s/.*/Wants=${network}d.service/" ./assets/lnd.service
sed -i "6s/.*/After=${network}d.service/" ./assets/lnd.service
sudo cp /home/admin/assets/lnd.service /etc/systemd/system/lnd.service
sudo chmod +x /etc/systemd/system/lnd.service
sudo systemctl enable lnd
sudo systemctl start lnd
echo "Started LND .. waiting 30 seconds for init ..."

Loading…
Cancel
Save