From 746399ce4b75056b2450bfb68207039ccd36af2c Mon Sep 17 00:00:00 2001 From: Walter Treur Date: Sat, 21 Jan 2017 16:02:08 -0500 Subject: [PATCH] Ensured setupVars.conf is always present when changing settings from start.sh --- bash_functions.sh | 4 ++++ start.sh | 1 + 2 files changed, 5 insertions(+) diff --git a/bash_functions.sh b/bash_functions.sh index 80c7f97..60469b1 100644 --- a/bash_functions.sh +++ b/bash_functions.sh @@ -1,5 +1,9 @@ . /opt/pihole/webpage.sh +prepare_setup_vars() { + touch $setupVars +} + validate_env() { if [ -z "$ServerIP" ] ; then echo "ERROR: To function correctly you must pass an environment variables of 'ServerIP' into the docker container with the IP of your docker host from which you are passing web (80) and dns (53) ports from" diff --git a/start.sh b/start.sh index c2af174..7ee7701 100755 --- a/start.sh +++ b/start.sh @@ -17,6 +17,7 @@ export IPv6 echo " ::: Starting docker specific setup for docker diginc/pi-hole" validate_env +prepare_setup_vars change_setting "IPV4_ADDRESS" "$ServerIP" change_setting "IPV6_ADDRESS" "$ServerIPv6" setup_dnsmasq_dns "$DNS1" "$DNS2"