updating to the latest upstream pihole code
This commit is contained in:
parent
adc40218e1
commit
e88e75ac3d
|
@ -14,8 +14,9 @@ RUN apk add --update \
|
|||
COPY ./alpine/gravity.sh /usr/local/bin/
|
||||
COPY ./alpine/nginx.conf /etc/nginx/nginx.conf
|
||||
# Original upstream pihole code being used
|
||||
COPY ./pi-hole/adlists.default /etc/pihole/
|
||||
COPY ./pi-hole/advanced/Scripts/* /usr/local/bin/
|
||||
COPY ./pi-hole/advanced/dnsmasq.conf /etc/dnsmasq.conf
|
||||
COPY ./pi-hole/advanced/01-pihole.conf /etc/dnsmasq.conf
|
||||
COPY ./pi-hole/advanced/index.html /var/www/html/pihole/index.html
|
||||
COPY ./AdminLTE /var/www/html/admin
|
||||
|
||||
|
@ -28,7 +29,9 @@ RUN mkdir -p /etc/pihole/ && \
|
|||
touch /var/log/pihole.log && \
|
||||
chmod 644 /var/log/pihole.log && \
|
||||
chown dnsmasq:root /var/log/pihole.log && \
|
||||
sed -i "s/@INT@/eth0/" /etc/dnsmasq.conf
|
||||
sed -i "s/@INT@/eth0/" /etc/dnsmasq.conf && \
|
||||
sed -i "s/@DNS1@/8.8.8.8/" /etc/dnsmasq.conf && \
|
||||
sed -i "s/@DNS2@/8.8.4.4/" /etc/dnsmasq.conf
|
||||
|
||||
# This chould be eliminated if the (upstream) files were +x in git
|
||||
RUN chmod +x /usr/local/bin/*.sh
|
||||
|
|
|
@ -29,6 +29,9 @@ fi
|
|||
piholeIPfile=/tmp/piholeIP
|
||||
piholeIPv6file=/etc/pihole/.useIPv6
|
||||
|
||||
adListFile=/etc/pihole/adlists.list
|
||||
adListDefault=/etc/pihole/adlists.default
|
||||
|
||||
if [[ -f $piholeIPfile ]];then
|
||||
# If the file exists, it means it was exported from the installation script and we should use that value instead of detecting it in this script
|
||||
piholeIP=$(cat $piholeIPfile)
|
||||
|
@ -45,18 +48,8 @@ if [[ -f $piholeIPv6file ]];then
|
|||
piholeIPv6=$(ip -6 route get 2001:4860:4860::8888 | awk -F " " '{ for(i=1;i<=NF;i++) if ($i == "src") print $(i+1) }')
|
||||
fi
|
||||
|
||||
# Ad-list sources--one per line in single quotes
|
||||
# The mahakala source is commented out due to many users having issues with it blocking legitimate domains.
|
||||
# Uncomment at your own risk
|
||||
sources=('https://adaway.org/hosts.txt'
|
||||
'http://adblock.gjtech.net/?format=unix-hosts'
|
||||
#'http://adblock.mahakala.is/'
|
||||
'http://hosts-file.net/ad_servers.txt'
|
||||
'http://www.malwaredomainlist.com/hostslist/hosts.txt'
|
||||
'http://pgl.yoyo.org/adservers/serverlist.php?'
|
||||
'http://someonewhocares.org/hosts/hosts'
|
||||
'http://winhelp2002.mvps.org/hosts.txt'
|
||||
'http://mirror1.malwaredomains.com/files/justdomains')
|
||||
|
||||
|
||||
|
||||
# Variables for various stages of downloading and formatting the list
|
||||
basename=pihole
|
||||
|
@ -97,7 +90,26 @@ spinner(){
|
|||
###########################
|
||||
# collapse - begin formation of pihole
|
||||
function gravity_collapse() {
|
||||
echo -n "::: Neutrino emissions detected..."
|
||||
echo "::: Neutrino emissions detected..."
|
||||
echo ":::"
|
||||
#Decide if we're using a custom ad block list, or defaults.
|
||||
if [ -f $adListFile ]; then
|
||||
#custom file found, use this instead of default
|
||||
echo -n "::: Custom adList file detected. Reading..."
|
||||
sources=()
|
||||
while read -a line; do
|
||||
sources+=($line)
|
||||
done < $adListFile
|
||||
echo " done!"
|
||||
else
|
||||
#no custom file found, use defaults!
|
||||
echo -n "::: No custom adlist file detected, reading from default file..."
|
||||
sources=()
|
||||
while read -a line; do
|
||||
sources+=($line)
|
||||
done < $adListDefault
|
||||
echo " done!"
|
||||
fi
|
||||
|
||||
# Create the pihole resource directory if it doesn't exist. Future files will be stored here
|
||||
if [[ -d $piholeDir ]];then
|
||||
|
@ -319,7 +331,7 @@ function gravity_reload() {
|
|||
echo " done!"
|
||||
}
|
||||
|
||||
|
||||
$SUDO cp /etc/.pihole/adlists.default /etc/pihole/adlists.default
|
||||
gravity_collapse
|
||||
gravity_spinup
|
||||
gravity_Schwarzchild
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
#!/bin/sh
|
||||
gravity.sh # pi-hole version minus the service dnsmasq start
|
||||
|
||||
dnsmasq --test || exit 1
|
||||
dnsmasq
|
||||
|
||||
php-fpm -t || exit 1
|
||||
php-fpm
|
||||
|
||||
nginx -t || exit 1
|
||||
|
||||
gravity.sh # pi-hole version minus the service dnsmasq start
|
||||
dnsmasq
|
||||
php-fpm
|
||||
nginx
|
||||
|
||||
tail -F /var/log/nginx/*.log /var/log/pihole.log
|
||||
|
|
|
@ -17,11 +17,12 @@ RUN apt-get -q update && \
|
|||
curl unzip wget && \
|
||||
rm -rf /var/cache/apt/archives
|
||||
|
||||
# Setup
|
||||
# Original upstream pihole code being used
|
||||
COPY ./pi-hole/gravity.sh /usr/local/bin/
|
||||
COPY ./pi-hole/adlists.default /etc/pihole/
|
||||
COPY ./pi-hole/advanced/Scripts/* /usr/local/bin/
|
||||
COPY ./pi-hole/advanced/lighttpd.conf /etc/lighttpd/lighttpd.conf
|
||||
COPY ./pi-hole/advanced/dnsmasq.conf /etc/dnsmasq.conf
|
||||
COPY ./pi-hole/advanced/01-pihole.conf /etc/dnsmasq.conf
|
||||
COPY ./pi-hole/advanced/index.html /var/www/html/pihole/index.html
|
||||
COPY ./AdminLTE /var/www/html/admin
|
||||
|
||||
|
@ -34,7 +35,9 @@ RUN mkdir -p /etc/pihole/ && \
|
|||
touch /var/log/pihole.log && \
|
||||
chmod 644 /var/log/pihole.log && \
|
||||
chown dnsmasq:root /var/log/pihole.log && \
|
||||
sed -i "s/@INT@/eth0/" /etc/dnsmasq.conf
|
||||
sed -i "s/@INT@/eth0/" /etc/dnsmasq.conf && \
|
||||
sed -i "s/@DNS1@/8.8.8.8/" /etc/dnsmasq.conf && \
|
||||
sed -i "s/@DNS2@/8.8.4.4/" /etc/dnsmasq.conf
|
||||
|
||||
# This chould be eliminated if the files were +x in git
|
||||
RUN chmod +x /usr/local/bin/*.sh
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#!/bin/sh
|
||||
dnsmasq --test || exit 1
|
||||
lighttpd -t -f /etc/lighttpd/lighttpd.conf || exit 1
|
||||
|
||||
|
||||
service lighttpd start
|
||||
gravity.sh # dnsmasq start included
|
||||
service lighttpd start
|
||||
|
||||
tail -f /var/log/lighttpd/*.log /var/log/pihole.log
|
||||
|
||||
|
|
2
pi-hole
2
pi-hole
|
@ -1 +1 @@
|
|||
Subproject commit 52b5d7143bac8e514461aae4e563c534a1409704
|
||||
Subproject commit e37495d80bcd32e8b1993160d255d4379b128a4a
|
Loading…
Reference in New Issue