Skip to content
Snippets Groups Projects
Commit 3c9859d3 authored by Bob Mottram's avatar Bob Mottram
Browse files

tidying

parent 455d4515
No related branches found
No related tags found
No related merge requests found
......@@ -41,7 +41,7 @@ PIHOLE_DNS2='213.73.91.35'
piholeBasename=pihole
piholeDir=/etc/$piholeBasename
PIHOLE_ADLIST=$piholeDir/gravity.list
PIHOLE_ADLIST=$piholeDir/adlists.list
PIHOLE_BLACKLIST=$piholeDir/blacklist.txt
PIHOLE_WHITELIST=$piholeDir/whitelist.txt
......@@ -59,8 +59,7 @@ function pihole_copy_files {
fi
cp $INSTALL_DIR/pihole/adlists.default /etc/.pihole/adlists.default
cp $INSTALL_DIR/pihole/adlists.default $piholeDir/adlists.default
cp $piholeDir/adlists.default $piholeDir/adlists.list
#cp $INSTALL_DIR/pihole/adlists.default $PIHOLE_ADLIST
cp $INSTALL_DIR/pihole/adlists.default $PIHOLE_ADLIST
cp $INSTALL_DIR/pihole/advanced/Scripts/* /opt/$piholeBasename
if [ -f /etc/dnsmasq.d/01-pihole.conf ]; then
rm /etc/dnsmasq.d/01-pihole.conf
......@@ -102,8 +101,7 @@ function pihole_update {
echo "piholeDNS1=${PIHOLE_DNS1}" >> ${setupVars}
echo "piholeDNS2=${PIHOLE_DNS1}" >> ${setupVars}
echo "addn-hosts=${PIHOLE_ADLIST}" > /etc/dnsmasq.conf
echo 'domain-needed' >> /etc/dnsmasq.conf
echo 'domain-needed' > /etc/dnsmasq.conf
echo 'bogus-priv' >> /etc/dnsmasq.conf
echo 'no-resolv' >> /etc/dnsmasq.conf
echo "server=${PIHOLE_DNS1}" >> /etc/dnsmasq.conf
......@@ -112,18 +110,6 @@ function pihole_update {
echo 'listen-address=127.0.0.1' >> /etc/dnsmasq.conf
echo 'log-queries' >> /etc/dnsmasq.conf
#sed -i "s|@DNS1@|${PIHOLE_DNS1}|g" /etc/dnsmasq.d/01-pihole.conf
#sed -i "s|@DNS2@|${PIHOLE_DNS2}|g" /etc/dnsmasq.d/01-pihole.conf
#sed -i "s|interface=.*|interface=${PIHOLE_IFACE}|g" /etc/dnsmasq.d/01-pihole.conf
#sed -i "s|@IPv4@|${IPv4_address}|g" /etc/dnsmasq.d/01-pihole.conf
#if [ ${#IPv6_address} -gt 0 ]; then
# sed -i "s|@IPv6@|${IPv6_address}|g" /etc/dnsmasq.d/01-pihole.conf
#else
# sed -i '/@IPv6@/d' /etc/dnsmasq.d/01-pihole.conf
#fi
#sed -i "s|@HOSTNAME@|$HOSTNAME|g" /etc/dnsmasq.d/01-pihole.conf
#sed -i "s|addn-hosts=.*|addn-hosts=${PIHOLE_ADLIST}|g" /etc/dnsmasq.d/01-pihole.conf
pihole -g
systemctl restart dnsmasq
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment