From 954eb362a0a15d4884e2335f115756490b4ce639 Mon Sep 17 00:00:00 2001 From: openoms Date: Sun, 3 Feb 2019 20:50:03 +0000 Subject: [PATCH] add 5 sec wait before checking publicIP in bootstrap + automatic install tweaks --- dietpi/boot/Automation_Custom_PreScript.sh | 4 ++++ home.admin/_bootstrap.sh | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/dietpi/boot/Automation_Custom_PreScript.sh b/dietpi/boot/Automation_Custom_PreScript.sh index 95b41a6..68597d4 100644 --- a/dietpi/boot/Automation_Custom_PreScript.sh +++ b/dietpi/boot/Automation_Custom_PreScript.sh @@ -1 +1,5 @@ +#as described in https://github.com/Fourdee/DietPi/issues/2488 +mkdir -p /etc/profile.d +> /etc/profile.d/dietpi-debug.sh dietpi-update +rm /etc/profile.d/dietpi-debug.sh \ No newline at end of file diff --git a/home.admin/_bootstrap.sh b/home.admin/_bootstrap.sh index 3f34727..0c764a3 100644 --- a/home.admin/_bootstrap.sh +++ b/home.admin/_bootstrap.sh @@ -1,6 +1,6 @@ #!/bin/bash -# This script runs on every start calles by boostrap.service +# This script runs on every start called by boostrap.service # It makes sure that the system is configured like the # default values or as in the config. # For more details see background_raspiblitzSettings.md @@ -279,6 +279,8 @@ if [ ${configExists} -eq 1 ]; then source ${configFile} # update public IP on boot + # wait otherwise looking for publicIP fails + sleep 5 freshPublicIP=$(curl -s http://v4.ipv6-test.com/api/myip.php) if [ ${#freshPublicIP} -eq 0 ]; then echo "WARNING: Was not able to determine external IP on startup." >> $logFile