CT Pihole: Update install methode for PiHoleV6

This commit is contained in:
2025-05-10 00:35:53 +02:00
parent c65282871f
commit 31629ec39f
7 changed files with 52 additions and 27 deletions

View File

@@ -1339,33 +1339,26 @@ packages:
#pihole pkgs #pihole pkgs
- packages: - packages:
- grep
- grep - grep
- dnsutils - dnsutils
- binutils
- git - git
- iproute2 - iproute2
- whiptail - dialog
- cron - cron
- curl - curl
- iputils-ping - iputils-ping
- lsof
- netcat-openbsd
- psmisc - psmisc
- sudo - sudo
- unzip - unzip
- idn2
- sqlite3
- libcap2-bin - libcap2-bin
- dns-root-data - dns-root-data
- libcap2 - libcap2
- jq - netcat-openbsd
- procps - procps
- lighttpd - jq
- php-common - lshw
- php-cli
- php-cgi
- php-sqlite3
- php-xml
- php-intl
action: install action: install
variants: variants:
- pihole - pihole

View File

@@ -1 +0,0 @@
url.redirect = ("^/$" => "/admin" )

View File

@@ -0,0 +1,28 @@
# Pi-hole configuration file (v6.1)
# Encoding: UTF-8
[dns]
upstreams = [
"9.9.9.9",
"149.112.112.112"
]
piholePTR = "HOSTNAME"
listeningMode = "SINGLE"
domainNeeded = true
[ntp.ipv4]
active = false
[ntp.ipv6]
active = false
[ntp.sync]
active = false
[ntp.sync.rtc]
utc = false
[webserver]
port = "80o,[::]:80o"

View File

@@ -1,7 +0,0 @@
WEBPASSWORD=
QUERY_LOGGING=true
INSTALL_WEB=true
DNSMASQ_LISTENING=single
PIHOLE_DNS_1=192.168.2.1
PIHOLE_DNS_2=192.168.2.1
TEMPERATUREUNIT=C

View File

@@ -1,5 +1,17 @@
#!/bin/bash #!/bin/bash
read -p "IP for the upstream dns server: " UpStreamDNS1
while true; do
read -p "Add seconndary upstream dns server Y/N? " yn
case $yn in
[Yy]* ) read -p "IP for second the upstream dns server: " UpStreamDNS2;break;;
[Nn]* ) UpStreamDNS2=$UpStreamDNS1;break;;
* ) echo "Please answer yes or no.";;
esac
done
sed -i "/upstreams = \[/,/\]/c\upstreams = [ \"$UpStreamDNS1\" , \"$UpStreamDNS2\" ]" /etc/pihole/pihole.toml
#Finialize instaltation #Finialize instaltation
/etc/.pihole/automated\ install/basic-install.sh --reconfigure --unattended /etc/.pihole/automated\ install/basic-install.sh --reconfigure --unattended
#Set password #Set password
pihole -a -p pihole setpassword

View File

@@ -1,9 +1,9 @@
#!/bin/sh #!/bin/sh
mkdir -p /etc/pihole mkdir -p /etc/pihole
mv /opt/Setup/Configs/setupVars.conf /etc/pihole/setupVars.conf mv /opt/Setup/Configs/pihole.toml /etc/pihole/pihole.toml
mv /opt/Setup/Configs/lighthttpd-redirect.conf /etc/lighttpd/conf-available/14-root-redirect.conf
ln -s ../conf-available/14-root-redirect.conf /etc/lighttpd/conf-enabled/14-root-redirect.conf
echo "DNSStubListener=no" >> /etc/systemd/resolved.conf echo "DNSStubListener=no" >> /etc/systemd/resolved.conf
ln -s /etc/systemd/system/pihole-FTL.service /etc/systemd/system/multi-user.target.wants/pihole-FTL.service ln -s /etc/systemd/system/pihole-FTL.service /etc/systemd/system/multi-user.target.wants/pihole-FTL.service
curl -sSL https://install.pi-hole.net | bash /dev/stdin --unattended || true curl -sSL https://install.pi-hole.net | bash /dev/stdin --unattended || true
rm -rf /opt/Setup/Configs

View File

@@ -1,3 +1,3 @@
#!/bin/sh #!/bin/sh
# Update script for updating apps with ProxmoxHelper/ProxMoxToolKit # Update script for updating apps with ProxmoxHelper/ProxMoxToolKit
/usr/local/bin/pihole -up /usr/local/bin/pihole updatePihole