diff --git a/Dockerfile.py b/Dockerfile.py index 60d1d14..37a3f5c 100755 --- a/Dockerfile.py +++ b/Dockerfile.py @@ -27,7 +27,7 @@ THIS_DIR = os.path.dirname(os.path.abspath(__file__)) base_vars = { 'name': 'diginc/pi-hole', 'maintainer' : 'adam@diginc.us', - 's6_version' : 'v1.21.2.1', + 's6_version' : 'v1.21.2.2', } os_base_vars = { diff --git a/Dockerfile_debian_aarch64 b/Dockerfile_debian_aarch64 index a37cd6d..d0a1481 100644 --- a/Dockerfile_debian_aarch64 +++ b/Dockerfile_debian_aarch64 @@ -11,7 +11,7 @@ ENV PATH /opt/pihole:${PATH} COPY install.sh /usr/local/bin/docker-install.sh ENV setupVars /etc/pihole/setupVars.conf ENV PIHOLE_INSTALL /tmp/ph_install.sh -ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/download/v1.21.2.1/s6-overlay-aarch64.tar.gz +ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/download/v1.21.2.2/s6-overlay-aarch64.tar.gz RUN apt-get update && \ apt-get install -y wget curl net-tools cron && \ diff --git a/Dockerfile_debian_amd64 b/Dockerfile_debian_amd64 index 18fc956..7917738 100644 --- a/Dockerfile_debian_amd64 +++ b/Dockerfile_debian_amd64 @@ -11,7 +11,7 @@ ENV PATH /opt/pihole:${PATH} COPY install.sh /usr/local/bin/docker-install.sh ENV setupVars /etc/pihole/setupVars.conf ENV PIHOLE_INSTALL /tmp/ph_install.sh -ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/download/v1.21.2.1/s6-overlay-amd64.tar.gz +ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/download/v1.21.2.2/s6-overlay-amd64.tar.gz RUN apt-get update && \ apt-get install -y wget curl net-tools cron && \ diff --git a/Dockerfile_debian_armhf b/Dockerfile_debian_armhf index 55d2640..507e0d0 100644 --- a/Dockerfile_debian_armhf +++ b/Dockerfile_debian_armhf @@ -11,7 +11,7 @@ ENV PATH /opt/pihole:${PATH} COPY install.sh /usr/local/bin/docker-install.sh ENV setupVars /etc/pihole/setupVars.conf ENV PIHOLE_INSTALL /tmp/ph_install.sh -ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/download/v1.21.2.1/s6-overlay-armhf.tar.gz +ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/download/v1.21.2.2/s6-overlay-armhf.tar.gz RUN apt-get update && \ apt-get install -y wget curl net-tools cron && \ diff --git a/bash_functions.sh b/bash_functions.sh index 7f39158..51a41a3 100644 --- a/bash_functions.sh +++ b/bash_functions.sh @@ -27,9 +27,9 @@ validate_env() { # Optional IPv6 is a valid address if [[ -n "$ServerIPv6" ]] ; then if [[ "$ServerIPv6" == 'kernel' ]] ; then - echo "WARNING: You passed in IPv6 with a value of 'kernel', this maybe beacuse you do not have IPv6 enabled on your network" + echo "ERROR: You passed in IPv6 with a value of 'kernel', this maybe beacuse you do not have IPv6 enabled on your network" unset ServerIPv6 - return + exit 1 fi if nc -w 1 -z "$ServerIPv6" 53 2>&1 | grep -q "$nc_error" || ! ip route get "$ServerIPv6" > /dev/null ; then echo "ERROR: ServerIPv6 Environment variable ($ServerIPv6) doesn't appear to be a valid IPv6 address" @@ -91,7 +91,7 @@ setup_dnsmasq() { setup_dnsmasq_dns "$DNS1" "$DNS2" setup_dnsmasq_interface "$INTERFACE" ProcessDNSSettings - dnsmasq -7 /etc/dnsmasq.d --interface="${INTERFACE:-eth0}" + # dnsmasq -7 /etc/dnsmasq.d --interface="${INTERFACE:-eth0}" } setup_dnsmasq_hostnames() { diff --git a/s6/debian-root/etc/cont-init.d/20-start.sh b/s6/debian-root/etc/cont-init.d/20-start.sh index ba1614d..3f85e7e 100644 --- a/s6/debian-root/etc/cont-init.d/20-start.sh +++ b/s6/debian-root/etc/cont-init.d/20-start.sh @@ -1,5 +1,5 @@ #!/usr/bin/with-contenv bash -set -e +set bashCmd='bash -e' if [ "${PH_VERBOSE:-0}" -gt 0 ] ; then @@ -8,3 +8,7 @@ if [ "${PH_VERBOSE:-0}" -gt 0 ] ; then fi $bashCmd /start.sh + +dnsmasq -7 /etc/dnsmasq.d +gravity.sh +kill -9 $(pgrep dnsmasq) || true diff --git a/start.sh b/start.sh index 9a3cae6..89b9ad6 100755 --- a/start.sh +++ b/start.sh @@ -34,7 +34,4 @@ test_framework_stubbing [ -f /.piholeFirstBoot ] && rm /.piholeFirstBoot -gravity.sh -killall -9 dnsmasq - -echo "::: Docker start setup complete - beginning s6 services" +echo "::: Docker start setup complete" diff --git a/test/test_start.py b/test/test_start.py index 50ccc73..a5ef6a0 100644 --- a/test/test_start.py +++ b/test/test_start.py @@ -24,7 +24,7 @@ def test_ServerIP_missing_triggers_start_error(Docker): @pytest.mark.parametrize('args,error_msg,expect_rc', [ ('-e ServerIP="1.2.3.z"', "ServerIP Environment variable (1.2.3.z) doesn't appear to be a valid IPv4 address",1), ('-e ServerIP="1.2.3.4" -e ServerIPv6="1234:1234:1234:ZZZZ"', "Environment variable (1234:1234:1234:ZZZZ) doesn't appear to be a valid IPv6 address",1), - ('-e ServerIP="1.2.3.4" -e ServerIPv6="kernel"', "WARNING: You passed in IPv6 with a value of 'kernel'",0), + ('-e ServerIP="1.2.3.4" -e ServerIPv6="kernel"', "ERROR: You passed in IPv6 with a value of 'kernel'",1), ]) def test_ServerIP_invalid_IPs_triggers_exit_error(Docker, error_msg, expect_rc): ''' When args to docker are empty start.sh exits saying ServerIP is required '''