mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-28 12:36:27 +02:00
#1259 preventing restart when docker is installed
This commit is contained in:
@@ -148,7 +148,7 @@ fi
|
|||||||
|
|
||||||
# get IP address & port
|
# get IP address & port
|
||||||
networkInfo=$(${network}-cli -datadir=${bitcoin_dir} getnetworkinfo 2>/dev/null)
|
networkInfo=$(${network}-cli -datadir=${bitcoin_dir} getnetworkinfo 2>/dev/null)
|
||||||
local_ip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
local_ip=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | grep 'eth0\|wlan0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||||
public_ip="${publicIP}"
|
public_ip="${publicIP}"
|
||||||
public_port="$(echo ${networkInfo} | jq -r '.localaddresses [0] .port')"
|
public_port="$(echo ${networkInfo} | jq -r '.localaddresses [0] .port')"
|
||||||
if [ "${public_port}" = "null" ]; then
|
if [ "${public_port}" = "null" ]; then
|
||||||
|
@@ -83,7 +83,7 @@ while :
|
|||||||
###########################
|
###########################
|
||||||
|
|
||||||
# get the local network IP to be displayed on the lCD
|
# get the local network IP to be displayed on the lCD
|
||||||
localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
localip=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | grep 'eth0\|wlan0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||||
|
|
||||||
# waiting for IP in general
|
# waiting for IP in general
|
||||||
if [ ${#localip} -eq 0 ]; then
|
if [ ${#localip} -eq 0 ]; then
|
||||||
|
@@ -12,7 +12,7 @@ source ${infoFile}
|
|||||||
source ${configFile}
|
source ${configFile}
|
||||||
|
|
||||||
# get the local network IP to be displayed on the lCD
|
# get the local network IP to be displayed on the lCD
|
||||||
localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
localip=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | grep 'eth0\|wlan0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||||
|
|
||||||
# BASIC MENU INFO
|
# BASIC MENU INFO
|
||||||
HEIGHT=17
|
HEIGHT=17
|
||||||
|
@@ -108,7 +108,7 @@ else
|
|||||||
freshPublicIP=""
|
freshPublicIP=""
|
||||||
fi
|
fi
|
||||||
if [ ${#freshPublicIP} -eq 0 ]; then
|
if [ ${#freshPublicIP} -eq 0 ]; then
|
||||||
localIP=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
localIP=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | grep 'eth0\|wlan0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||||
echo "# WARNING: No publicIP information at all yet - working with placeholder : ${localIP}"
|
echo "# WARNING: No publicIP information at all yet - working with placeholder : ${localIP}"
|
||||||
freshPublicIP="${localIP}"
|
freshPublicIP="${localIP}"
|
||||||
fi
|
fi
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
source /home/admin/raspiblitz.info
|
source /home/admin/raspiblitz.info
|
||||||
|
|
||||||
# get local ip
|
# get local ip
|
||||||
localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
localip=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | grep 'eth0\|wlan0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||||
|
|
||||||
# Basic Options
|
# Basic Options
|
||||||
OPTIONS=(WINDOWS "Windows" \
|
OPTIONS=(WINDOWS "Windows" \
|
||||||
|
@@ -55,7 +55,7 @@ copyHost()
|
|||||||
echo "# get IP of RaspiBlitz to copy to ..."
|
echo "# get IP of RaspiBlitz to copy to ..."
|
||||||
targetIP=$(whiptail --inputbox "\nPlease enter the LOCAL IP of the\nRaspiBlitz to copy Blockchain to:" 10 38 "" --title " Target IP " --backtitle "RaspiBlitz - Copy Blockchain" 3>&1 1>&2 2>&3)
|
targetIP=$(whiptail --inputbox "\nPlease enter the LOCAL IP of the\nRaspiBlitz to copy Blockchain to:" 10 38 "" --title " Target IP " --backtitle "RaspiBlitz - Copy Blockchain" 3>&1 1>&2 2>&3)
|
||||||
targetIP=$(echo "${targetIP[0]}")
|
targetIP=$(echo "${targetIP[0]}")
|
||||||
localIP=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
localIP=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | grep 'eth0\|wlan0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||||
if [ ${#targetIP} -eq 0 ]; then
|
if [ ${#targetIP} -eq 0 ]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
@@ -51,7 +51,7 @@ do
|
|||||||
echo "*** RECHECK DHCP-SERVER ***"
|
echo "*** RECHECK DHCP-SERVER ***"
|
||||||
|
|
||||||
# get the local network IP
|
# get the local network IP
|
||||||
localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
localip=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | grep 'eth0\|wlan0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||||
echo "localip(${localip})"
|
echo "localip(${localip})"
|
||||||
|
|
||||||
# detect a missing DHCP config
|
# detect a missing DHCP config
|
||||||
|
@@ -194,7 +194,7 @@ fi
|
|||||||
gotLocalIP=0
|
gotLocalIP=0
|
||||||
until [ ${gotLocalIP} -eq 1 ]
|
until [ ${gotLocalIP} -eq 1 ]
|
||||||
do
|
do
|
||||||
localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
localip=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | grep 'eth0\|wlan0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||||
if [ ${#localip} -eq 0 ]; then
|
if [ ${#localip} -eq 0 ]; then
|
||||||
# display user to connect LAN
|
# display user to connect LAN
|
||||||
sed -i "s/^state=.*/state=noIP/g" ${infoFile}
|
sed -i "s/^state=.*/state=noIP/g" ${infoFile}
|
||||||
@@ -395,7 +395,7 @@ if [ ${configExists} -eq 1 ]; then
|
|||||||
# prevent having no publicIP set at all and LND getting stuck
|
# prevent having no publicIP set at all and LND getting stuck
|
||||||
# https://github.com/rootzoll/raspiblitz/issues/312#issuecomment-462675101
|
# https://github.com/rootzoll/raspiblitz/issues/312#issuecomment-462675101
|
||||||
if [ ${#publicIP} -eq 0 ]; then
|
if [ ${#publicIP} -eq 0 ]; then
|
||||||
localIP=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
localIP=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | grep 'eth0\|wlan0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||||
echo "WARNING: No publicIP information at all - working with placeholder: ${localIP}" >> $logFile
|
echo "WARNING: No publicIP information at all - working with placeholder: ${localIP}" >> $logFile
|
||||||
freshPublicIP="${localIP}"
|
freshPublicIP="${localIP}"
|
||||||
fi
|
fi
|
||||||
|
@@ -29,7 +29,7 @@ isBTRFS=$(lsblk -o FSTYPE,MOUNTPOINT | grep /mnt/hdd | awk '$1=$1' | cut -d " "
|
|||||||
defaultZipPath="/mnt/hdd/temp"
|
defaultZipPath="/mnt/hdd/temp"
|
||||||
|
|
||||||
# SCP download and upload links
|
# SCP download and upload links
|
||||||
localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
localip=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | grep 'eth0\|wlan0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||||
scpDownload="scp -r 'bitcoin@${localip}:${defaultZipPath}/raspiblitz-*.tar.gz' ./"
|
scpDownload="scp -r 'bitcoin@${localip}:${defaultZipPath}/raspiblitz-*.tar.gz' ./"
|
||||||
scpUpload="scp -r './raspiblitz-*.tar.gz bitcoin@${localip}:${defaultZipPath}'"
|
scpUpload="scp -r './raspiblitz-*.tar.gz bitcoin@${localip}:${defaultZipPath}'"
|
||||||
|
|
||||||
|
@@ -17,7 +17,7 @@ sudo mkdir /mnt/hdd/temp 2>/dev/null
|
|||||||
sudo chmod 777 -R /mnt/hdd/temp 2>/dev/null
|
sudo chmod 777 -R /mnt/hdd/temp 2>/dev/null
|
||||||
|
|
||||||
# localIP
|
# localIP
|
||||||
localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
localip=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | grep 'eth0\|wlan0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||||
echo "localIP='${localip}'"
|
echo "localIP='${localip}'"
|
||||||
|
|
||||||
# temp - no measurement in a VM
|
# temp - no measurement in a VM
|
||||||
|
@@ -31,7 +31,7 @@ This can take multiple hours.
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# get network info
|
# get network info
|
||||||
localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
localip=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | grep 'eth0\|wlan0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||||
toraddress=$(sudo cat /mnt/hdd/tor/btc-rpc-explorer/hostname 2>/dev/null)
|
toraddress=$(sudo cat /mnt/hdd/tor/btc-rpc-explorer/hostname 2>/dev/null)
|
||||||
fingerprint=$(openssl x509 -in /mnt/hdd/app-data/nginx/tls.cert -fingerprint -noout | cut -d"=" -f2)
|
fingerprint=$(openssl x509 -in /mnt/hdd/app-data/nginx/tls.cert -fingerprint -noout | cut -d"=" -f2)
|
||||||
|
|
||||||
|
@@ -17,7 +17,7 @@ if [ "$1" = "status" ]; then
|
|||||||
if [ "${BTCPayServer}" = "on" ]; then
|
if [ "${BTCPayServer}" = "on" ]; then
|
||||||
echo "installed=1"
|
echo "installed=1"
|
||||||
|
|
||||||
localIP=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
localIP=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | grep 'eth0\|wlan0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||||
echo "localIP='${localIP}'"
|
echo "localIP='${localIP}'"
|
||||||
echo "httpsPort='23001'"
|
echo "httpsPort='23001'"
|
||||||
echo "publicIP='${publicIP}'"
|
echo "publicIP='${publicIP}'"
|
||||||
|
@@ -21,7 +21,7 @@ if [ "$1" = "menu" ]; then
|
|||||||
source <(sudo /home/admin/config.scripts/bonus.cryptoadvance-specter.sh status)
|
source <(sudo /home/admin/config.scripts/bonus.cryptoadvance-specter.sh status)
|
||||||
|
|
||||||
# get network info
|
# get network info
|
||||||
localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
localip=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | grep 'eth0\|wlan0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||||
toraddress=$(sudo cat /mnt/hdd/tor/cryptoadvance-specter/hostname 2>/dev/null)
|
toraddress=$(sudo cat /mnt/hdd/tor/cryptoadvance-specter/hostname 2>/dev/null)
|
||||||
fingerprint=$(openssl x509 -in /home/bitcoin/.specter/cert.pem -fingerprint -noout | cut -d"=" -f2)
|
fingerprint=$(openssl x509 -in /home/bitcoin/.specter/cert.pem -fingerprint -noout | cut -d"=" -f2)
|
||||||
|
|
||||||
|
@@ -64,7 +64,7 @@ if [ "$1" = "status" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# check local IPv4 port
|
# check local IPv4 port
|
||||||
localIP=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
localIP=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | grep 'eth0\|wlan0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||||
echo "localIP='${localIP}'"
|
echo "localIP='${localIP}'"
|
||||||
if [ "$2" = "showAddress" ]; then
|
if [ "$2" = "showAddress" ]; then
|
||||||
echo "publicIP='${publicIP}'"
|
echo "publicIP='${publicIP}'"
|
||||||
|
@@ -69,7 +69,7 @@ if [ "$1" = "status" ]; then
|
|||||||
if [ "${LNBits}" = "on" ]; then
|
if [ "${LNBits}" = "on" ]; then
|
||||||
echo "installed=1"
|
echo "installed=1"
|
||||||
|
|
||||||
localIP=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
localIP=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | grep 'eth0\|wlan0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||||
echo "localIP='${localIP}'"
|
echo "localIP='${localIP}'"
|
||||||
echo "httpsPort='5001'"
|
echo "httpsPort='5001'"
|
||||||
echo "publicIP='${publicIP}'"
|
echo "publicIP='${publicIP}'"
|
||||||
|
@@ -205,7 +205,7 @@ fi
|
|||||||
|
|
||||||
# get the local IP as default host
|
# get the local IP as default host
|
||||||
if [ ${#host} -eq 0 ]; then
|
if [ ${#host} -eq 0 ]; then
|
||||||
host=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
host=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | grep 'eth0\|wlan0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# change host to dynDNS if set
|
# change host to dynDNS if set
|
||||||
|
@@ -20,7 +20,7 @@ fi
|
|||||||
if [ "$1" = "menu" ]; then
|
if [ "$1" = "menu" ]; then
|
||||||
|
|
||||||
# get network info
|
# get network info
|
||||||
localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
localip=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | grep 'eth0\|wlan0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||||
toraddress=$(sudo cat /mnt/hdd/tor/RTL/hostname 2>/dev/null)
|
toraddress=$(sudo cat /mnt/hdd/tor/RTL/hostname 2>/dev/null)
|
||||||
fingerprint=$(openssl x509 -in /mnt/hdd/app-data/nginx/tls.cert -fingerprint -noout | cut -d"=" -f2)
|
fingerprint=$(openssl x509 -in /mnt/hdd/app-data/nginx/tls.cert -fingerprint -noout | cut -d"=" -f2)
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@ fi
|
|||||||
if [ "$1" = "menu" ]; then
|
if [ "$1" = "menu" ]; then
|
||||||
|
|
||||||
# get network info
|
# get network info
|
||||||
localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
localip=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | grep 'eth0\|wlan0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||||
toraddress=$(sudo cat /mnt/hdd/tor/thunderhub/hostname 2>/dev/null)
|
toraddress=$(sudo cat /mnt/hdd/tor/thunderhub/hostname 2>/dev/null)
|
||||||
fingerprint=$(openssl x509 -in /mnt/hdd/app-data/nginx/tls.cert -fingerprint -noout | cut -d"=" -f2)
|
fingerprint=$(openssl x509 -in /mnt/hdd/app-data/nginx/tls.cert -fingerprint -noout | cut -d"=" -f2)
|
||||||
|
|
||||||
|
@@ -75,7 +75,7 @@ elif [ "${exportType}" = "hexstring" ]; then
|
|||||||
###########################
|
###########################
|
||||||
elif [ "${exportType}" = "scp" ]; then
|
elif [ "${exportType}" = "scp" ]; then
|
||||||
|
|
||||||
local_ip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
local_ip=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | grep 'eth0\|wlan0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||||
clear
|
clear
|
||||||
echo "###### DOWNLOAD BY SCP ######"
|
echo "###### DOWNLOAD BY SCP ######"
|
||||||
echo "Copy, paste and execute these commands in your client terminal to download the files."
|
echo "Copy, paste and execute these commands in your client terminal to download the files."
|
||||||
@@ -99,7 +99,7 @@ elif [ "${exportType}" = "scp" ]; then
|
|||||||
###########################
|
###########################
|
||||||
elif [ "${exportType}" = "http" ]; then
|
elif [ "${exportType}" = "http" ]; then
|
||||||
|
|
||||||
local_ip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
local_ip=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | grep 'eth0\|wlan0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||||
randomPortNumber=$(shuf -i 20000-39999 -n 1)
|
randomPortNumber=$(shuf -i 20000-39999 -n 1)
|
||||||
sudo ufw allow from 192.168.0.0/16 to any port ${randomPortNumber} comment 'temp http server'
|
sudo ufw allow from 192.168.0.0/16 to any port ${randomPortNumber} comment 'temp http server'
|
||||||
clear
|
clear
|
||||||
|
@@ -16,7 +16,7 @@ if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
localip=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | grep 'eth0\|wlan0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||||
|
|
||||||
mode="$1"
|
mode="$1"
|
||||||
if [ ${mode} = "backup" ]; then
|
if [ ${mode} = "backup" ]; then
|
||||||
|
Reference in New Issue
Block a user