VERY rough starting point for a v6 container.

Lots of stuff removed/commented out just to make the container start - things will need revisiting once we are settled on how we will configure FTL from the CLI

Tests will fail for sure. Can't seem to make it work without host-mounting /etc/pihole at the moment

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
Adam Warner 2023-01-13 22:43:38 +00:00
parent ab4b7ffff6
commit 18609ec80e
No known key found for this signature in database
3 changed files with 24 additions and 16 deletions

View File

@ -34,7 +34,7 @@ setup_web_password
setup_web_theme
setup_web_temp_unit
setup_web_layout
setup_web_php_env
# setup_web_php_env
# lighttpd setup
# ===========================
@ -50,7 +50,7 @@ setup_blocklists
setup_FTL_upstream_DNS
[[ -n "${DHCP_ACTIVE}" && ${DHCP_ACTIVE} == "true" ]] && echo "Setting DHCP server" && setup_FTL_dhcp
apply_FTL_Configs_From_Env
setup_FTL_User
# setup_FTL_User
setup_FTL_Interface
setup_FTL_ListeningBehaviour
setup_FTL_CacheSize

View File

@ -113,10 +113,7 @@ ensure_basic_configuration() {
changeFTLsetting "MACVENDORDB" "/macvendor.db"
fi
# 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;
# setup_or_skip_gravity
}
validate_env() {
@ -197,7 +194,7 @@ setup_FTL_CacheSize() {
echo " [i] Custom CUSTOM_CACHE_SIZE set to $custom_cache_size"
change_setting "CACHE_SIZE" "$custom_cache_size"
sed -i "s/^cache-size=\s*[0-9]*/cache-size=$custom_cache_size/" ${dnsmasq_pihole_01_location}
# sed -i "s/^cache-size=\s*[0-9]*/cache-size=$custom_cache_size/" ${dnsmasq_pihole_01_location}
}
apply_FTL_Configs_From_Env(){
@ -231,13 +228,13 @@ setup_FTL_query_logging(){
if [ "${QUERY_LOGGING_OVERRIDE}" == "false" ]; then
echo " [i] Disabling Query Logging"
change_setting "QUERY_LOGGING" "$QUERY_LOGGING_OVERRIDE"
removeKey "${dnsmasqconfig}" log-queries
#removeKey "${dnsmasqconfig}" log-queries
else
# If it is anything other than false, set it to true
change_setting "QUERY_LOGGING" "true"
# Set pihole logging on for good measure
echo " [i] Enabling Query Logging"
addKey "${dnsmasqconfig}" log-queries
#addKey "${dnsmasqconfig}" log-queries
fi
}
@ -332,7 +329,7 @@ setup_FTL_ProcessDNSSettings(){
# shellcheck source=/dev/null
. /opt/pihole/webpage.sh
ProcessDNSSettings
# ProcessDNSSettings
}
setup_lighttpd_bind() {

View File

@ -65,13 +65,24 @@ export USER=pihole
export PIHOLE_SKIP_OS_CHECK=true
# Run the installer in unattended mode using the preseeded variables above and --reconfigure so that local repos are not updated
curl -sSL https://install.pi-hole.net | bash -sex -- --unattended
# # Run the installer in unattended mode using the preseeded variables above and --reconfigure so that local repos are not updated
# curl -sSL https://install.pi-hole.net | bash -sex -- --unattended
# At this stage, if we are building a :nightly tag, then switch the Pi-hole install to dev versions
if [[ "${DOCKER_TAG}" = 'nightly' ]]; then
yes | pihole checkout dev
fi
# # At this stage, if we are building a :nightly tag, then switch the Pi-hole install to dev versions
# if [[ "${DOCKER_TAG}" = 'nightly' ]]; then
# yes | pihole checkout dev
# fi
git clone https://github.com/pi-hole/adminLTE /var/www/html/admin
cd /var/www/html/admin
git checkout new/FTL_is_my_new_home
echo "new/http" | tee /etc/pihole/ftlbranch
sudo git clone https://github.com/pi-hole/pi-hole /etc/.pihole
cd /etc/.pihole
sudo git checkout development-v6
bash -ex /etc/.pihole/automated\ install/basic-install.sh --unattended
sed -i '/^WEBPASSWORD/d' /etc/pihole/setupVars.conf