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

@@ -1,5 +1,17 @@
#!/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
/etc/.pihole/automated\ install/basic-install.sh --reconfigure --unattended
#Set password
pihole -a -p
pihole setpassword