mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +00:00
Merge branch 'master' of https://github.com/jftuga/pi-hole into jftuga-master
This commit is contained in:
commit
6c1d52199f
1 changed files with 13 additions and 13 deletions
|
@ -619,8 +619,8 @@ version_check_dnsmasq() {
|
||||||
local dnsmasq_conf="/etc/dnsmasq.conf"
|
local dnsmasq_conf="/etc/dnsmasq.conf"
|
||||||
local dnsmasq_conf_orig="/etc/dnsmasq.conf.orig"
|
local dnsmasq_conf_orig="/etc/dnsmasq.conf.orig"
|
||||||
local dnsmasq_pihole_id_string="addn-hosts=/etc/pihole/gravity.list"
|
local dnsmasq_pihole_id_string="addn-hosts=/etc/pihole/gravity.list"
|
||||||
local dnsmasq_original_config="/etc/.pihole/advanced/dnsmasq.conf.original"
|
local dnsmasq_original_config="${PI_HOLE_LOCAL_REPO}/advanced/dnsmasq.conf.original"
|
||||||
local dnsmasq_pihole_01_snippet="/etc/.pihole/advanced/01-pihole.conf"
|
local dnsmasq_pihole_01_snippet="${PI_HOLE_LOCAL_REPO}/advanced/01-pihole.conf"
|
||||||
local dnsmasq_pihole_01_location="/etc/dnsmasq.d/01-pihole.conf"
|
local dnsmasq_pihole_01_location="/etc/dnsmasq.d/01-pihole.conf"
|
||||||
|
|
||||||
if [ -f ${dnsmasq_conf} ]; then
|
if [ -f ${dnsmasq_conf} ]; then
|
||||||
|
@ -706,7 +706,7 @@ installScripts() {
|
||||||
}
|
}
|
||||||
|
|
||||||
installConfigs() {
|
installConfigs() {
|
||||||
# Install the configs from /etc/.pihole to their various locations
|
# Install the configs from ${PI_HOLE_LOCAL_REPO} to their various locations
|
||||||
echo ":::"
|
echo ":::"
|
||||||
echo "::: Installing configs..."
|
echo "::: Installing configs..."
|
||||||
version_check_dnsmasq
|
version_check_dnsmasq
|
||||||
|
@ -719,7 +719,7 @@ installConfigs() {
|
||||||
elif [ -f "/etc/lighttpd/lighttpd.conf" ]; then
|
elif [ -f "/etc/lighttpd/lighttpd.conf" ]; then
|
||||||
mv /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.orig
|
mv /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.orig
|
||||||
fi
|
fi
|
||||||
cp /etc/.pihole/advanced/${LIGHTTPD_CFG} /etc/lighttpd/lighttpd.conf
|
cp ${PI_HOLE_LOCAL_REPO}/advanced/${LIGHTTPD_CFG} /etc/lighttpd/lighttpd.conf
|
||||||
mkdir -p /var/run/lighttpd
|
mkdir -p /var/run/lighttpd
|
||||||
chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /var/run/lighttpd
|
chown ${LIGHTTPD_USER}:${LIGHTTPD_GROUP} /var/run/lighttpd
|
||||||
mkdir -p /var/cache/lighttpd/compress
|
mkdir -p /var/cache/lighttpd/compress
|
||||||
|
@ -874,7 +874,7 @@ installPiholeWeb() {
|
||||||
echo "::: Existing index.php detected, not overwriting"
|
echo "::: Existing index.php detected, not overwriting"
|
||||||
else
|
else
|
||||||
echo -n "::: index.php missing, replacing... "
|
echo -n "::: index.php missing, replacing... "
|
||||||
cp /etc/.pihole/advanced/index.php /var/www/html/pihole/
|
cp ${PI_HOLE_LOCAL_REPO}/advanced/index.php /var/www/html/pihole/
|
||||||
echo " done!"
|
echo " done!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -882,7 +882,7 @@ installPiholeWeb() {
|
||||||
echo "::: Existing index.js detected, not overwriting"
|
echo "::: Existing index.js detected, not overwriting"
|
||||||
else
|
else
|
||||||
echo -n "::: index.js missing, replacing... "
|
echo -n "::: index.js missing, replacing... "
|
||||||
cp /etc/.pihole/advanced/index.js /var/www/html/pihole/
|
cp ${PI_HOLE_LOCAL_REPO}/advanced/index.js /var/www/html/pihole/
|
||||||
echo " done!"
|
echo " done!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -890,14 +890,14 @@ installPiholeWeb() {
|
||||||
echo "::: Existing blockingpage.css detected, not overwriting"
|
echo "::: Existing blockingpage.css detected, not overwriting"
|
||||||
else
|
else
|
||||||
echo -n "::: blockingpage.css missing, replacing... "
|
echo -n "::: blockingpage.css missing, replacing... "
|
||||||
cp /etc/.pihole/advanced/blockingpage.css /var/www/html/pihole
|
cp ${PI_HOLE_LOCAL_REPO}/advanced/blockingpage.css /var/www/html/pihole
|
||||||
echo " done!"
|
echo " done!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "::: Creating directory for blocking page"
|
echo "::: Creating directory for blocking page"
|
||||||
install -d /var/www/html/pihole
|
install -d /var/www/html/pihole
|
||||||
install -D /etc/.pihole/advanced/{index,blockingpage}.* /var/www/html/pihole/
|
install -D ${PI_HOLE_LOCAL_REPO}/advanced/{index,blockingpage}.* /var/www/html/pihole/
|
||||||
if [ -f /var/www/html/index.lighttpd.html ]; then
|
if [ -f /var/www/html/index.lighttpd.html ]; then
|
||||||
mv /var/www/html/index.lighttpd.html /var/www/html/index.lighttpd.orig
|
mv /var/www/html/index.lighttpd.html /var/www/html/index.lighttpd.orig
|
||||||
else
|
else
|
||||||
|
@ -910,7 +910,7 @@ installPiholeWeb() {
|
||||||
echo ":::"
|
echo ":::"
|
||||||
echo -n "::: Installing sudoer file..."
|
echo -n "::: Installing sudoer file..."
|
||||||
mkdir -p /etc/sudoers.d/
|
mkdir -p /etc/sudoers.d/
|
||||||
cp /etc/.pihole/advanced/pihole.sudo /etc/sudoers.d/pihole
|
cp ${PI_HOLE_LOCAL_REPO}/advanced/pihole.sudo /etc/sudoers.d/pihole
|
||||||
# Add lighttpd user (OS dependent) to sudoers file
|
# Add lighttpd user (OS dependent) to sudoers file
|
||||||
echo "${LIGHTTPD_USER} ALL=NOPASSWD: /usr/local/bin/pihole" >> /etc/sudoers.d/pihole
|
echo "${LIGHTTPD_USER} ALL=NOPASSWD: /usr/local/bin/pihole" >> /etc/sudoers.d/pihole
|
||||||
|
|
||||||
|
@ -928,7 +928,7 @@ installCron() {
|
||||||
# Install the cron job
|
# Install the cron job
|
||||||
echo ":::"
|
echo ":::"
|
||||||
echo -n "::: Installing latest Cron script..."
|
echo -n "::: Installing latest Cron script..."
|
||||||
cp /etc/.pihole/advanced/pihole.cron /etc/cron.d/pihole
|
cp ${PI_HOLE_LOCAL_REPO}/advanced/pihole.cron /etc/cron.d/pihole
|
||||||
echo " done!"
|
echo " done!"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -942,7 +942,7 @@ runGravity() {
|
||||||
fi
|
fi
|
||||||
# Test if /etc/pihole/adlists.default exists
|
# Test if /etc/pihole/adlists.default exists
|
||||||
if [[ ! -e /etc/pihole/adlists.default ]]; then
|
if [[ ! -e /etc/pihole/adlists.default ]]; then
|
||||||
cp /etc/.pihole/adlists.default /etc/pihole/adlists.default
|
cp ${PI_HOLE_LOCAL_REPO}/adlists.default /etc/pihole/adlists.default
|
||||||
fi
|
fi
|
||||||
echo "::: Running gravity.sh"
|
echo "::: Running gravity.sh"
|
||||||
{ /opt/pihole/gravity.sh; }
|
{ /opt/pihole/gravity.sh; }
|
||||||
|
@ -1017,7 +1017,7 @@ finalExports() {
|
||||||
|
|
||||||
# Look for DNS server settings which would have to be reapplied
|
# Look for DNS server settings which would have to be reapplied
|
||||||
source "${setupVars}"
|
source "${setupVars}"
|
||||||
source "/etc/.pihole/advanced/Scripts/webpage.sh"
|
source "${PI_HOLE_LOCAL_REPO}/advanced/Scripts/webpage.sh"
|
||||||
|
|
||||||
if [[ "${DNS_FQDN_REQUIRED}" != "" ]] ; then
|
if [[ "${DNS_FQDN_REQUIRED}" != "" ]] ; then
|
||||||
ProcessDNSSettings
|
ProcessDNSSettings
|
||||||
|
@ -1032,7 +1032,7 @@ installLogrotate() {
|
||||||
# Install the logrotate script
|
# Install the logrotate script
|
||||||
echo ":::"
|
echo ":::"
|
||||||
echo -n "::: Installing latest logrotate script..."
|
echo -n "::: Installing latest logrotate script..."
|
||||||
cp /etc/.pihole/advanced/logrotate /etc/pihole/logrotate
|
cp ${PI_HOLE_LOCAL_REPO}/advanced/logrotate /etc/pihole/logrotate
|
||||||
# Different operating systems have different user / group
|
# Different operating systems have different user / group
|
||||||
# settings for logrotate that makes it impossible to create
|
# settings for logrotate that makes it impossible to create
|
||||||
# a static logrotate file that will work with e.g.
|
# a static logrotate file that will work with e.g.
|
||||||
|
|
Loading…
Reference in a new issue