CT Pihole: Update install methode for PiHoleV6
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user