Skip to content

Commit

Permalink
Merge pull request #1302 from pi-hole/dev
Browse files Browse the repository at this point in the history
Dev-> Master
  • Loading branch information
PromoFaux authored Jan 23, 2023
2 parents 4256d62 + ad6b8a6 commit 36d0161
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
13 changes: 4 additions & 9 deletions src/s6/debian-root/usr/local/bin/bash_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -107,22 +107,17 @@ ensure_basic_configuration() {
cp -f "${setupVars}" "${setupVars}.update.bak"
fi

# Remove any existing macvendor.db and replace it with a symblink to the one moved to the root directory (see install.sh)
if [[ -f "/etc/pihole/macvendor.db" ]]; then
rm /etc/pihole/macvendor.db
# If FTLCONF_MACVENDORDB is not set
if [[ -z "${FTLCONF_MACVENDORDB:-}" ]]; then
# User is not passing in a custom location - so force FTL to use the file we moved to / during the build
changeFTLsetting "MACVENDORDB" "/macvendor.db"
fi
ln -s /macvendor.db /etc/pihole/macvendor.db

# When fresh empty directory volumes are used then we need to create this file
if [ ! -f /etc/dnsmasq.d/01-pihole.conf ] ; then
cp /etc/.pihole/advanced/01-pihole.conf /etc/dnsmasq.d/
fi;

# Ensure that /run/lighttpd exists for the php socket, and is owned by www-data.
# Without this, the web interface will return a 503. Not sure how this used to work, as this was always the directory that was used in previous versions of the image.
mkdir -p /run/lighttpd
chown www-data:www-data /run/lighttpd

# setup_or_skip_gravity
}

Expand Down
4 changes: 2 additions & 2 deletions src/s6/debian-root/usr/local/bin/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@ sed -i $'s/)\s*uninstallFunc/) unsupportedFunc/g' /usr/local/bin/pihole
# pihole -r / pihole reconfigure
sed -i $'s/)\s*reconfigurePiholeFunc/) unsupportedFunc/g' /usr/local/bin/pihole

# Move macvendor.db to root dir and symlink it back into /etc/pihole. See https://github.com/pi-hole/docker-pi-hole/issues/1137
# Move macvendor.db to root dir See https://github.com/pi-hole/docker-pi-hole/issues/1137
# During startup we will change FTL's configuration to point to this file instead of /etc/pihole/macvendor.db
# If user goes on to bind monunt this directory to their host, then we can easily ensure macvendor.db is the latest
# (it is otherwise only updated when FTL is updated, which doesn't happen as part of the normal course of running this image)
mv /etc/pihole/macvendor.db /macvendor.db
ln -s /macvendor.db /etc/pihole/macvendor.db

if [ ! -f /.piholeFirstBoot ]; then
touch /.piholeFirstBoot
Expand Down

0 comments on commit 36d0161

Please sign in to comment.