diff --git a/bash_functions.sh b/bash_functions.sh index 831f516..674dac9 100644 --- a/bash_functions.sh +++ b/bash_functions.sh @@ -118,6 +118,17 @@ setup_dnsmasq_hostnames() { fi } +setup_lighttpd_bind() { + if [[ "$IMAGE" == 'debian' ]] ; then + # if using '--net=host' only bind lighttpd on $ServerIP + if grep -q "docker" /proc/net/dev ; then #docker (docker0 by default) should only be present on the host system + if ! grep -q "server.bind" /etc/lighttpd/lighttpd.conf ; then # if the declaration is already there, don't add it again + sed -i -E "s/server\.port\s+\=\s+80/server.bind\t\t = \"${ServerIP}\"\nserver.port\t\t = 80/" /etc/lighttpd/lighttpd.conf + fi + fi + fi +} + setup_php_env() { case $IMAGE in "debian") setup_php_env_debian ;; diff --git a/install.sh b/install.sh index e28b31b..e3211ab 100755 --- a/install.sh +++ b/install.sh @@ -1,8 +1,8 @@ #!/bin/bash -ex mkdir -p /etc/pihole/ -export CORE_TAG='v3.1' +export CORE_TAG='v3.1.4' export WEB_TAG='v3.1' -export FTL_TAG='v2.9.4' +export FTL_TAG='v2.10' # Make pihole scripts fail searching for `systemctl`, # which fails pretty miserably in docker compared to `service` diff --git a/start.sh b/start.sh index c078095..b5b70b1 100755 --- a/start.sh +++ b/start.sh @@ -25,6 +25,7 @@ setup_dnsmasq setup_php_env setup_dnsmasq_hostnames "$ServerIP" "$ServerIPv6" "$HOSTNAME" setup_ipv4_ipv6 +setup_lighttpd_bind "$ServerIP" "$IMAGE" test_configs test_framework_stubbing echo "::: Docker start setup complete - beginning s6 services"