diff --git a/alpine.docker b/alpine.docker index fb70104..a6bd120 100644 --- a/alpine.docker +++ b/alpine.docker @@ -20,6 +20,7 @@ ENTRYPOINT [ "/init" ] ADD s6/alpine-root / COPY s6/service /usr/local/bin/service +COPY pihole-FTL /usr/bin/pihole-FTL # Things installer did and fix alpine+nginx differences ENV WEBLOGDIR /var/log/nginx diff --git a/bash_functions.sh b/bash_functions.sh index 52e5bd1..116f77b 100644 --- a/bash_functions.sh +++ b/bash_functions.sh @@ -135,7 +135,11 @@ setup_web_password() { echo "Assigning random password: $WEBPASSWORD" fi; set -x - pihole -a -p "$WEBPASSWORD" + if [[ "$WEBPASSWORD" == "" ]] ; then + echo "" | pihole -a -p + else + pihole -a -p "$WEBPASSWORD" "$WEBPASSWORD" + fi { set +x; } 2>/dev/null } setup_ipv4_ipv6() { diff --git a/install.sh b/install.sh index b16ce65..2c3a147 100755 --- a/install.sh +++ b/install.sh @@ -1,7 +1,8 @@ #!/bin/bash -x mkdir -p /etc/pihole/ -export CORE_TAG='v2.13.2' -export WEB_TAG='v2.5.2' +export CORE_TAG='v3.0.1' +export WEB_TAG='v3.0.1' +export FTL_TAG='v2.6.2' # Make pihole scripts fail searching for `systemctl`, # which fails pretty miserably in docker compared to `service` @@ -21,6 +22,9 @@ if [[ "$IMAGE" == 'alpine' ]] ; then sed -i 's/www-data/nginx/g' "$PIHOLE_INSTALL" sed -i '/LIGHTTPD_CFG/d' "${PIHOLE_INSTALL}" sed -i '/etc\/cron.d\//d' "${PIHOLE_INSTALL}" + # For new FTL install lines + sed -i 's/sha1sum --status --quiet/sha1sum -s/g' "${PIHOLE_INSTALL}" + sed -i 's/install -T/install /g' "${PIHOLE_INSTALL}" LIGHTTPD_USER="nginx" # shellcheck disable=SC2034 LIGHTTPD_GROUP="nginx" # shellcheck disable=SC2034 LIGHTTPD_CFG="lighttpd.conf.debian" # shellcheck disable=SC2034 diff --git a/s6/alpine-root/etc/nginx/nginx.conf b/s6/alpine-root/etc/nginx/nginx.conf index a864c77..bf70045 100644 --- a/s6/alpine-root/etc/nginx/nginx.conf +++ b/s6/alpine-root/etc/nginx/nginx.conf @@ -18,7 +18,7 @@ http { index pihole/index.php index.php; error_page 404 =200 /pihole/index.php; - location ~ .php$ { + location ~ /(pihole|admin)/*.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_index index.php; diff --git a/s6/alpine-root/etc/services.d/cron/run b/s6/alpine-root/etc/services.d/cron/run index 410119d..9c1c4b6 100644 --- a/s6/alpine-root/etc/services.d/cron/run +++ b/s6/alpine-root/etc/services.d/cron/run @@ -2,6 +2,4 @@ s6-echo "Starting crond" exec -c -fdmove -c 2 1 - -/usr/sbin/crond -f -L /var/log/cron -l 0 -c /etc/crontabs +fdmove -c 2 1 /usr/sbin/crond -f -L /var/log/cron -l 0 -c /etc/crontabs diff --git a/s6/alpine-root/etc/services.d/php-fpm/run b/s6/alpine-root/etc/services.d/php-fpm/run index 7572f76..06a154f 100644 --- a/s6/alpine-root/etc/services.d/php-fpm/run +++ b/s6/alpine-root/etc/services.d/php-fpm/run @@ -2,4 +2,4 @@ s6-echo "Starting php-fpm" -php-fpm -d daemonize=no +php-fpm5 -d daemonize=no diff --git a/s6/debian-root/etc/services.d/cron/run b/s6/debian-root/etc/services.d/cron/run index b2ad9b7..df902ed 100644 --- a/s6/debian-root/etc/services.d/cron/run +++ b/s6/debian-root/etc/services.d/cron/run @@ -2,6 +2,4 @@ s6-echo "Starting crond" exec -c -fdmove -c 2 1 - -/usr/sbin/cron -f +fdmove -c 2 1 /usr/sbin/cron -f