mirror of
https://github.com/pi-hole/docker-pi-hole.git
synced 2024-06-23 16:06:41 +02:00
Merge pull request #95 from wtreur/dev
Ensured setupVars.conf is always present when changing settings from start.sh
This commit is contained in:
commit
bdc439f84c
|
@ -1,5 +1,9 @@
|
||||||
. /opt/pihole/webpage.sh
|
. /opt/pihole/webpage.sh
|
||||||
|
|
||||||
|
prepare_setup_vars() {
|
||||||
|
touch $setupVars
|
||||||
|
}
|
||||||
|
|
||||||
validate_env() {
|
validate_env() {
|
||||||
if [ -z "$ServerIP" ] ; then
|
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"
|
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"
|
||||||
|
|
1
start.sh
1
start.sh
|
@ -17,6 +17,7 @@ export IPv6
|
||||||
|
|
||||||
echo " ::: Starting docker specific setup for docker diginc/pi-hole"
|
echo " ::: Starting docker specific setup for docker diginc/pi-hole"
|
||||||
validate_env
|
validate_env
|
||||||
|
prepare_setup_vars
|
||||||
change_setting "IPV4_ADDRESS" "$ServerIP"
|
change_setting "IPV4_ADDRESS" "$ServerIP"
|
||||||
change_setting "IPV6_ADDRESS" "$ServerIPv6"
|
change_setting "IPV6_ADDRESS" "$ServerIPv6"
|
||||||
setup_dnsmasq_dns "$DNS1" "$DNS2"
|
setup_dnsmasq_dns "$DNS1" "$DNS2"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user