v4.2.1 & more robust user root fix

Signed-off-by: Adam Hill <adam@diginc.us>
This commit is contained in:
Adam Hill 2019-02-03 18:30:42 -06:00
parent a522eae6e9
commit 0b8333f7bc
No known key found for this signature in database
GPG Key ID: 2193804FCA429855
7 changed files with 21 additions and 14 deletions

View File

@ -32,11 +32,11 @@ ENV S6_KEEP_ENV 1
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS 2
ENV FTL_CMD no-daemon
ENV VERSION v4.2
ENV VERSION v4.2.1
ENV ARCH aarch64
ENV PATH /opt/pihole:${PATH}
LABEL image="pihole/pihole:v4.2_aarch64"
LABEL image="pihole/pihole:v4.2.1_aarch64"
LABEL maintainer="adam@diginc.us"
LABEL url="https://www.github.com/pi-hole/docker-pi-hole"

View File

@ -32,11 +32,11 @@ ENV S6_KEEP_ENV 1
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS 2
ENV FTL_CMD no-daemon
ENV VERSION v4.2
ENV VERSION v4.2.1
ENV ARCH amd64
ENV PATH /opt/pihole:${PATH}
LABEL image="pihole/pihole:v4.2_amd64"
LABEL image="pihole/pihole:v4.2.1_amd64"
LABEL maintainer="adam@diginc.us"
LABEL url="https://www.github.com/pi-hole/docker-pi-hole"

View File

@ -32,11 +32,11 @@ ENV S6_KEEP_ENV 1
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS 2
ENV FTL_CMD no-daemon
ENV VERSION v4.2
ENV VERSION v4.2.1
ENV ARCH armel
ENV PATH /opt/pihole:${PATH}
LABEL image="pihole/pihole:v4.2_armel"
LABEL image="pihole/pihole:v4.2.1_armel"
LABEL maintainer="adam@diginc.us"
LABEL url="https://www.github.com/pi-hole/docker-pi-hole"

View File

@ -32,11 +32,11 @@ ENV S6_KEEP_ENV 1
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS 2
ENV FTL_CMD no-daemon
ENV VERSION v4.2
ENV VERSION v4.2.1
ENV ARCH armhf
ENV PATH /opt/pihole:${PATH}
LABEL image="pihole/pihole:v4.2_armhf"
LABEL image="pihole/pihole:v4.2.1_armhf"
LABEL maintainer="adam@diginc.us"
LABEL url="https://www.github.com/pi-hole/docker-pi-hole"

View File

@ -1 +1 @@
v4.2
v4.2.1

View File

@ -176,9 +176,17 @@ setup_dnsmasq() {
}
setup_dnsmasq_user() {
# Run FTL as root user to avoid SHM issues
FTL_USER="${1}"
sed -i '/^\s*user=/ c\user=root' /etc/dnsmasq.d/01-pihole.conf
# Run FTL as root user to avoid SHM permission issues
if grep -r -q '^\s*user=' /etc/dnsmasq.* ; then
# Change user that had been set previously to root
for f in $(grep -L '^\s*user=' /etc/dnsmasq.*); do
sed -i '/^\s*user=/ c\user=root' "${f}"
done
else
echo -e "\nuser=${FTL_USER}" >> /etc/dnsmasq.conf
fi
}
setup_dnsmasq_hostnames() {

View File

@ -4,7 +4,8 @@ mkdir -p /etc/pihole/
mkdir -p /var/run/pihole
# Production tags with valid web footers
export CORE_TAG="$(cat /etc/docker-pi-hole-version)"
export WEB_TAG="$(cat /etc/docker-pi-hole-version)"
# 4.2.1 -> 4.2 since no patch release for web
export WEB_TAG="${CORE_TAG/.1/}"
# Only use for pre-production / testing
export USE_CUSTOM_BRANCHES=false
@ -89,6 +90,4 @@ sed -i $'s/)\s*updatePiholeFunc/) unsupportedFunc/g' /usr/local/bin/pihole
touch /.piholeFirstBoot
# Fix dnsmasq in docker
#grep -q '^user=root' || echo -e '\nuser=root' >> /etc/dnsmasq.conf
echo 'Docker install successful'