summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authormax.bra2020-02-16 12:58:16 +0100
committermax.bra2020-02-16 12:58:16 +0100
commit2e36bfb658cca41ef4756be027b89780e51acc4f (patch)
tree5c5d834fbebd9c27ba0d60f8a24a94ea1af11e6a
parent68732b5babb2d361032bb795ee432233e1705124 (diff)
downloadaur-2e36bfb658cca41ef4756be027b89780e51acc4f.tar.gz
correctly removed chrnometer and versione scripts refs
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD6
-rw-r--r--arch-server-core-4.3.2-392627340.patch411
-rw-r--r--arch-server-core-4.3.2-742906734.patch411
-rw-r--r--piholeDebug.sh2
5 files changed, 830 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 22f1eeac1240..56714a1d40b6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = pi-hole-standalone
pkgdesc = The Pi-hole is an advertising-aware DNS/Web server. Arch alteration for standalone PC.
pkgver = 4.3.2
- pkgrel = 3
+ pkgrel = 4
url = https://github.com/pi-hole/pi-hole
install = pi-hole-standalone.install
arch = any
@@ -15,19 +15,19 @@ pkgbase = pi-hole-standalone
backup = etc/pihole/blacklist.txt
backup = etc/dnsmasq.d/01-pihole.conf
source = https://github.com/pi-hole/pi-hole/archive/v4.3.2.tar.gz
- source = arch-server-core-4.3.2-539980707.patch::https://raw.githubusercontent.com/max72bra/pi-hole-standalone-archlinux-customization/master/arch-server-core-4.3.2.patch
+ source = arch-server-core-4.3.2-984819278.patch::https://raw.githubusercontent.com/max72bra/pi-hole-standalone-archlinux-customization/master/arch-server-core-4.3.2.patch
source = dnsmasq.include
source = pi-hole-gravity.service
source = pi-hole-gravity.timer
source = mimic_setupVars.conf.sh
source = piholeDebug.sh
md5sums = 33ea26a46937a0b5d20037639eb0ee34
- md5sums = c318942902c9f7c1f5f9dedbbc846188
+ md5sums = 382d89f4621e7efb87c68b976f8930c0
md5sums = 50d29442a7b185f0d05bc2ed72f875be
md5sums = 047f13d4ac97877f724f87b002aaee63
md5sums = d42a864f88299998f8233c0bc0dd093d
md5sums = 7821b6dfe380955073701e5acd1587a2
- md5sums = d7b69ae51db0e8ac8e27f20a234eed85
+ md5sums = 6139cbc8cf38a7bb2a32f9e855eaf7d9
pkgname = pi-hole-standalone
diff --git a/PKGBUILD b/PKGBUILD
index 81fb05f6809a..d61b41e5d5b2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=pi-hole-standalone
_pkgname=pi-hole
pkgver=4.3.2
-pkgrel=3
+pkgrel=4
_now=`date +%N`
pkgdesc='The Pi-hole is an advertising-aware DNS/Web server. Arch alteration for standalone PC.'
arch=('any')
@@ -24,12 +24,12 @@ source=(https://github.com/$_pkgname/$_pkgname/archive/v$pkgver.tar.gz
piholeDebug.sh)
md5sums=('33ea26a46937a0b5d20037639eb0ee34'
- 'c318942902c9f7c1f5f9dedbbc846188'
+ '382d89f4621e7efb87c68b976f8930c0'
'50d29442a7b185f0d05bc2ed72f875be'
'047f13d4ac97877f724f87b002aaee63'
'd42a864f88299998f8233c0bc0dd093d'
'7821b6dfe380955073701e5acd1587a2'
- 'd7b69ae51db0e8ac8e27f20a234eed85')
+ '6139cbc8cf38a7bb2a32f9e855eaf7d9')
prepare() {
cd "$srcdir"/"$_pkgname"-"$pkgver"
diff --git a/arch-server-core-4.3.2-392627340.patch b/arch-server-core-4.3.2-392627340.patch
new file mode 100644
index 000000000000..d94a789ae7d1
--- /dev/null
+++ b/arch-server-core-4.3.2-392627340.patch
@@ -0,0 +1,411 @@
+diff -uprN pi-hole-4.3.2/adlists.list pi-hole-4.3.2.cust/adlists.list
+--- pi-hole-4.3.2/adlists.list 1970-01-01 01:00:00.000000000 +0100
++++ pi-hole-4.3.2.cust/adlists.list 2020-02-16 12:50:00.072818191 +0100
+@@ -0,0 +1,6 @@
++https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
++https://mirror1.malwaredomains.com/files/justdomains
++http://sysctl.org/cameleon/hosts
++https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
++https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
++https://hosts-file.net/ad_servers.txt
+diff -uprN pi-hole-4.3.2/advanced/Scripts/webpage.sh pi-hole-4.3.2.cust/advanced/Scripts/webpage.sh
+--- pi-hole-4.3.2/advanced/Scripts/webpage.sh 2019-09-15 17:52:21.000000000 +0200
++++ pi-hole-4.3.2.cust/advanced/Scripts/webpage.sh 2020-02-16 12:50:00.071818192 +0100
+@@ -16,7 +16,7 @@ readonly dhcpconfig="/etc/dnsmasq.d/02-p
+ readonly FTLconf="/etc/pihole/pihole-FTL.conf"
+ # 03 -> wildcards
+ readonly dhcpstaticconfig="/etc/dnsmasq.d/04-pihole-static-dhcp.conf"
+-readonly PI_HOLE_BIN_DIR="/usr/local/bin"
++readonly PI_HOLE_BIN_DIR="/usr/bin"
+
+ coltable="/opt/pihole/COL_TABLE"
+ if [[ -f ${coltable} ]]; then
+@@ -29,10 +29,6 @@ Example: pihole -a -p password
+ Set options for the Admin Console
+
+ Options:
+- -p, password Set Admin Console password
+- -c, celsius Set Celsius as preferred temperature unit
+- -f, fahrenheit Set Fahrenheit as preferred temperature unit
+- -k, kelvin Set Kelvin as preferred temperature unit
+ -r, hostrecord Add a name to the DNS associated to an IPv4/IPv6 address
+ -e, email Set an administrative contact address for the Block Page
+ -h, --help Show this help dialog
+@@ -79,10 +75,6 @@ delete_dnsmasq_setting() {
+ sed -i "/${1}/d" "${dnsmasqconfig}"
+ }
+
+-SetTemperatureUnit() {
+- change_setting "TEMPERATUREUNIT" "${unit}"
+- echo -e " ${TICK} Set temperature unit to ${unit}"
+-}
+
+ HashPassword() {
+ # Compute password hash twice to avoid rainbow table vulnerability
+@@ -91,51 +83,6 @@ HashPassword() {
+ echo ${return}
+ }
+
+-SetWebPassword() {
+- if [ "${SUDO_USER}" == "www-data" ]; then
+- echo "Security measure: user www-data is not allowed to change webUI password!"
+- echo "Exiting"
+- exit 1
+- fi
+-
+- if [ "${SUDO_USER}" == "lighttpd" ]; then
+- echo "Security measure: user lighttpd is not allowed to change webUI password!"
+- echo "Exiting"
+- exit 1
+- fi
+-
+- if (( ${#args[2]} > 0 )) ; then
+- readonly PASSWORD="${args[2]}"
+- readonly CONFIRM="${PASSWORD}"
+- else
+- # Prevents a bug if the user presses Ctrl+C and it continues to hide the text typed.
+- # So we reset the terminal via stty if the user does press Ctrl+C
+- trap '{ echo -e "\nNo password will be set" ; stty sane ; exit 1; }' INT
+- read -s -r -p "Enter New Password (Blank for no password): " PASSWORD
+- echo ""
+-
+- if [ "${PASSWORD}" == "" ]; then
+- change_setting "WEBPASSWORD" ""
+- echo -e " ${TICK} Password Removed"
+- exit 0
+- fi
+-
+- read -s -r -p "Confirm Password: " CONFIRM
+- echo ""
+- fi
+-
+- if [ "${PASSWORD}" == "${CONFIRM}" ] ; then
+- # We do not wrap this in brackets, otherwise BASH will expand any appropriate syntax
+- hash=$(HashPassword "$PASSWORD")
+- # Save hash to file
+- change_setting "WEBPASSWORD" "${hash}"
+- echo -e " ${TICK} New password set"
+- else
+- echo -e " ${CROSS} Passwords don't match. Your password has not been changed"
+- exit 1
+- fi
+-}
+-
+ ProcessDNSSettings() {
+ source "${setupVars}"
+
+@@ -258,14 +205,6 @@ SetDNSServers() {
+ RestartDNS
+ }
+
+-SetExcludeDomains() {
+- change_setting "API_EXCLUDE_DOMAINS" "${args[2]}"
+-}
+-
+-SetExcludeClients() {
+- change_setting "API_EXCLUDE_CLIENTS" "${args[2]}"
+-}
+-
+ Poweroff(){
+ nohup bash -c "sleep 5; poweroff" &> /dev/null </dev/null &
+ }
+@@ -350,49 +289,6 @@ ra-param=*,0,0
+ fi
+ }
+
+-EnableDHCP() {
+- change_setting "DHCP_ACTIVE" "true"
+- change_setting "DHCP_START" "${args[2]}"
+- change_setting "DHCP_END" "${args[3]}"
+- change_setting "DHCP_ROUTER" "${args[4]}"
+- change_setting "DHCP_LEASETIME" "${args[5]}"
+- change_setting "PIHOLE_DOMAIN" "${args[6]}"
+- change_setting "DHCP_IPv6" "${args[7]}"
+- change_setting "DHCP_rapid_commit" "${args[8]}"
+-
+- # Remove possible old setting from file
+- delete_dnsmasq_setting "dhcp-"
+- delete_dnsmasq_setting "quiet-dhcp"
+-
+- # If a DHCP client claims that its name is "wpad", ignore that.
+- # This fixes a security hole. see CERT Vulnerability VU#598349
+- # We also ignore "localhost" as Windows behaves strangely if a
+- # device claims this host name
+- add_dnsmasq_setting "dhcp-name-match=set:hostname-ignore,wpad
+-dhcp-name-match=set:hostname-ignore,localhost
+-dhcp-ignore-names=tag:hostname-ignore"
+-
+- ProcessDHCPSettings
+-
+- RestartDNS
+-}
+-
+-DisableDHCP() {
+- change_setting "DHCP_ACTIVE" "false"
+-
+- # Remove possible old setting from file
+- delete_dnsmasq_setting "dhcp-"
+- delete_dnsmasq_setting "quiet-dhcp"
+-
+- ProcessDHCPSettings
+-
+- RestartDNS
+-}
+-
+-SetWebUILayout() {
+- change_setting "WEBUIBOXEDLAYOUT" "${args[2]}"
+-}
+-
+ CustomizeAdLists() {
+ list="/etc/pihole/adlists.list"
+
+@@ -413,14 +309,6 @@ CustomizeAdLists() {
+ fi
+ }
+
+-SetPrivacyMode() {
+- if [[ "${args[2]}" == "true" ]]; then
+- change_setting "API_PRIVACY_MODE" "true"
+- else
+- change_setting "API_PRIVACY_MODE" "false"
+- fi
+-}
+-
+ ResolutionSettings() {
+ typ="${args[2]}"
+ state="${args[3]}"
+@@ -568,22 +456,12 @@ main() {
+ args=("$@")
+
+ case "${args[1]}" in
+- "-p" | "password" ) SetWebPassword;;
+- "-c" | "celsius" ) unit="C"; SetTemperatureUnit;;
+- "-f" | "fahrenheit" ) unit="F"; SetTemperatureUnit;;
+- "-k" | "kelvin" ) unit="K"; SetTemperatureUnit;;
+ "setdns" ) SetDNSServers;;
+- "setexcludedomains" ) SetExcludeDomains;;
+- "setexcludeclients" ) SetExcludeClients;;
+ "poweroff" ) Poweroff;;
+ "reboot" ) Reboot;;
+ "restartdns" ) RestartDNS;;
+ "setquerylog" ) SetQueryLogOptions;;
+- "enabledhcp" ) EnableDHCP;;
+- "disabledhcp" ) DisableDHCP;;
+- "layout" ) SetWebUILayout;;
+ "-h" | "--help" ) helpFunc;;
+- "privacymode" ) SetPrivacyMode;;
+ "resolve" ) ResolutionSettings;;
+ "addstaticdhcp" ) AddDHCPStaticAddress;;
+ "removestaticdhcp" ) RemoveDHCPStaticAddress;;
+diff -uprN pi-hole-4.3.2/advanced/dnsmasq.conf.original pi-hole-4.3.2.cust/advanced/dnsmasq.conf.original
+--- pi-hole-4.3.2/advanced/dnsmasq.conf.original 2019-09-15 17:52:21.000000000 +0200
++++ pi-hole-4.3.2.cust/advanced/dnsmasq.conf.original 2020-02-16 12:50:00.071818192 +0100
+@@ -646,3 +646,4 @@
+
+ # Include all files in a directory which end in .conf
+ #conf-dir=/etc/dnsmasq.d/*.conf
++conf-dir=/etc/dnsmasq.d/,*.conf
+diff -uprN pi-hole-4.3.2/gravity.sh pi-hole-4.3.2.cust/gravity.sh
+--- pi-hole-4.3.2/gravity.sh 2019-09-15 17:52:21.000000000 +0200
++++ pi-hole-4.3.2.cust/gravity.sh 2020-02-16 12:50:00.011818230 +0100
+@@ -19,7 +19,7 @@ regexconverter="/opt/pihole/wildcard_reg
+ source "${regexconverter}"
+
+ basename="pihole"
+-PIHOLE_COMMAND="/usr/local/bin/${basename}"
++PIHOLE_COMMAND="/usr/bin/${basename}"
+
+ piholeDir="/etc/${basename}"
+
+diff -uprN pi-hole-4.3.2/pihole pi-hole-4.3.2.cust/pihole
+--- pi-hole-4.3.2/pihole 2019-09-15 17:52:21.000000000 +0200
++++ pi-hole-4.3.2.cust/pihole 2020-02-16 12:50:00.013818229 +0100
+@@ -13,11 +13,10 @@ readonly PI_HOLE_SCRIPT_DIR="/opt/pihole
+ readonly gravitylist="/etc/pihole/gravity.list"
+ readonly blacklist="/etc/pihole/black.list"
+
+-# setupVars and PI_HOLE_BIN_DIR are not readonly here because in some funcitons (checkout),
+ # it might get set again when the installer is sourced. This causes an
+ # error due to modifying a readonly variable.
+ setupVars="/etc/pihole/setupVars.conf"
+-PI_HOLE_BIN_DIR="/usr/local/bin"
++PI_HOLE_BIN_DIR="/usr/bin"
+
+ readonly colfile="${PI_HOLE_SCRIPT_DIR}/COL_TABLE"
+ source "${colfile}"
+@@ -52,22 +51,6 @@ debugFunc() {
+ exit 0
+ }
+
+-flushFunc() {
+- "${PI_HOLE_SCRIPT_DIR}"/piholeLogFlush.sh "$@"
+- exit 0
+-}
+-
+-updatePiholeFunc() {
+- shift
+- "${PI_HOLE_SCRIPT_DIR}"/update.sh "$@"
+- exit 0
+-}
+-
+-reconfigurePiholeFunc() {
+- /etc/.pihole/automated\ install/basic-install.sh --reconfigure
+- exit 0;
+-}
+-
+ updateGravityFunc() {
+ "${PI_HOLE_SCRIPT_DIR}"/gravity.sh "$@"
+ exit $?
+@@ -79,23 +62,8 @@ queryFunc() {
+ exit 0
+ }
+
+-chronometerFunc() {
+- shift
+- "${PI_HOLE_SCRIPT_DIR}"/chronometer.sh "$@"
+- exit 0
+-}
+-
+
+-uninstallFunc() {
+- "${PI_HOLE_SCRIPT_DIR}"/uninstall.sh
+- exit 0
+-}
+
+-versionFunc() {
+- shift
+- "${PI_HOLE_SCRIPT_DIR}"/version.sh "$@"
+- exit 0
+-}
+
+ restartDNS() {
+ local svcOption svc str output status
+@@ -108,7 +76,7 @@ restartDNS() {
+ svc="killall -s SIGHUP ${resolver}"
+ else
+ # A full restart has been requested
+- svc="service ${resolver} restart"
++ svc="systemctl restart ${resolver}"
+ fi
+
+ # Print output to Terminal, but not to Web Admin
+@@ -316,60 +284,6 @@ tailFunc() {
+ exit 0
+ }
+
+-piholeCheckoutFunc() {
+- if [[ "$2" == "-h" ]] || [[ "$2" == "--help" ]]; then
+- echo "Usage: pihole checkout [repo] [branch]
+-Example: 'pihole checkout master' or 'pihole checkout core dev'
+-Switch Pi-hole subsystems to a different Github branch
+-
+-Repositories:
+- core [branch] Change the branch of Pi-hole's core subsystem
+- web [branch] Change the branch of Web Interface subsystem
+- ftl [branch] Change the branch of Pi-hole's FTL subsystem
+-
+-Branches:
+- master Update subsystems to the latest stable release
+- dev Update subsystems to the latest development release
+- branchname Update subsystems to the specified branchname"
+- exit 0
+- fi
+-
+- source "${PI_HOLE_SCRIPT_DIR}"/piholeCheckout.sh
+- shift
+- checkout "$@"
+-}
+-
+-tricorderFunc() {
+- if [[ ! -p "/dev/stdin" ]]; then
+- echo -e " ${INFO} Please do not call Tricorder directly"
+- exit 1
+- fi
+-
+- if ! (echo > /dev/tcp/tricorder.pi-hole.net/9998) >/dev/null 2>&1; then
+- echo -e " ${CROSS} Unable to connect to Pi-hole's Tricorder server"
+- exit 1
+- fi
+-
+- if command -v openssl &> /dev/null; then
+- openssl s_client -quiet -connect tricorder.pi-hole.net:9998 2> /dev/null < /dev/stdin
+- exit "$?"
+- else
+- echo -e " ${INFO} ${COL_YELLOW}Security Notice${COL_NC}: ${COL_WHITE}openssl${COL_NC} is not installed
+- Your debug log will be transmitted unencrypted via plain-text
+- There is a possibility that this could be intercepted by a third party
+- If you wish to cancel, press Ctrl-C to exit within 10 seconds"
+- secs="10"
+- while [[ "$secs" -gt "0" ]]; do
+- echo -ne "."
+- sleep 1
+- : $((secs--))
+- done
+- echo " "
+- nc tricorder.pi-hole.net 9999 < /dev/stdin
+- exit "$?"
+- fi
+-}
+-
+ updateCheckFunc() {
+ "${PI_HOLE_SCRIPT_DIR}"/updatecheck.sh "$@"
+ exit 0
+@@ -390,33 +304,22 @@ Whitelist/Blacklist Options:
+ Debugging Options:
+ -d, debug Start a debugging session
+ Add '-a' to enable automated debugging
+- -f, flush Flush the Pi-hole log
+- -r, reconfigure Reconfigure or Repair Pi-hole subsystems
+- -t, tail View the live output of the Pi-hole log
+
+ Options:
+- -a, admin Web interface options
+- Add '-h' for more info on Web Interface usage
+- -c, chronometer Calculates stats and displays to an LCD
+ Add '-h' for more info on chronometer usage
+ -g, updateGravity Update the list of ad-serving domains
+ -h, --help, help Show this help dialog
+- -l, logging Specify whether the Pi-hole log should be used
+ Add '-h' for more info on logging usage
+ -q, query Query the adlists for a specified domain
+ Add '-h' for more info on query usage
+- -up, updatePihole Update Pi-hole subsystems
+ Add '--check-only' to exit script before update is performed.
+- -v, version Show installed versions of Pi-hole, Web Interface & FTL
+ Add '-h' for more info on version usage
+- uninstall Uninstall Pi-hole from your system
+ status Display the running status of Pi-hole subsystems
+ enable Enable Pi-hole subsystems
+ disable Disable Pi-hole subsystems
+ Add '-h' for more info on disable usage
+ restartdns Restart Pi-hole subsystems
+- checkout Switch Pi-hole subsystems to a different Github branch
+- Add '-h' for more info on checkout usage";
++";
+ exit 0
+ }
+
+@@ -447,23 +350,15 @@ case "${1}" in
+ "--regex" | "regex" ) listFunc "$@";;
+ "-d" | "debug" ) debugFunc "$@";;
+ "-f" | "flush" ) flushFunc "$@";;
+- "-up" | "updatePihole" ) updatePiholeFunc "$@";;
+- "-r" | "reconfigure" ) reconfigurePiholeFunc;;
+ "-g" | "updateGravity" ) updateGravityFunc "$@";;
+- "-c" | "chronometer" ) chronometerFunc "$@";;
+ "-h" | "help" ) helpFunc;;
+- "-v" | "version" ) versionFunc "$@";;
+ "-q" | "query" ) queryFunc "$@";;
+ "-l" | "logging" ) piholeLogging "$@";;
+- "uninstall" ) uninstallFunc;;
+ "enable" ) piholeEnable 1;;
+ "disable" ) piholeEnable 0 "$2";;
+ "status" ) statusFunc "$2";;
+ "restartdns" ) restartDNS "$2";;
+ "-a" | "admin" ) webpageFunc "$@";;
+ "-t" | "tail" ) tailFunc;;
+- "checkout" ) piholeCheckoutFunc "$@";;
+- "tricorder" ) tricorderFunc;;
+- "updatechecker" ) updateCheckFunc "$@";;
+ * ) helpFunc;;
+ esac
diff --git a/arch-server-core-4.3.2-742906734.patch b/arch-server-core-4.3.2-742906734.patch
new file mode 100644
index 000000000000..d94a789ae7d1
--- /dev/null
+++ b/arch-server-core-4.3.2-742906734.patch
@@ -0,0 +1,411 @@
+diff -uprN pi-hole-4.3.2/adlists.list pi-hole-4.3.2.cust/adlists.list
+--- pi-hole-4.3.2/adlists.list 1970-01-01 01:00:00.000000000 +0100
++++ pi-hole-4.3.2.cust/adlists.list 2020-02-16 12:50:00.072818191 +0100
+@@ -0,0 +1,6 @@
++https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
++https://mirror1.malwaredomains.com/files/justdomains
++http://sysctl.org/cameleon/hosts
++https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
++https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
++https://hosts-file.net/ad_servers.txt
+diff -uprN pi-hole-4.3.2/advanced/Scripts/webpage.sh pi-hole-4.3.2.cust/advanced/Scripts/webpage.sh
+--- pi-hole-4.3.2/advanced/Scripts/webpage.sh 2019-09-15 17:52:21.000000000 +0200
++++ pi-hole-4.3.2.cust/advanced/Scripts/webpage.sh 2020-02-16 12:50:00.071818192 +0100
+@@ -16,7 +16,7 @@ readonly dhcpconfig="/etc/dnsmasq.d/02-p
+ readonly FTLconf="/etc/pihole/pihole-FTL.conf"
+ # 03 -> wildcards
+ readonly dhcpstaticconfig="/etc/dnsmasq.d/04-pihole-static-dhcp.conf"
+-readonly PI_HOLE_BIN_DIR="/usr/local/bin"
++readonly PI_HOLE_BIN_DIR="/usr/bin"
+
+ coltable="/opt/pihole/COL_TABLE"
+ if [[ -f ${coltable} ]]; then
+@@ -29,10 +29,6 @@ Example: pihole -a -p password
+ Set options for the Admin Console
+
+ Options:
+- -p, password Set Admin Console password
+- -c, celsius Set Celsius as preferred temperature unit
+- -f, fahrenheit Set Fahrenheit as preferred temperature unit
+- -k, kelvin Set Kelvin as preferred temperature unit
+ -r, hostrecord Add a name to the DNS associated to an IPv4/IPv6 address
+ -e, email Set an administrative contact address for the Block Page
+ -h, --help Show this help dialog
+@@ -79,10 +75,6 @@ delete_dnsmasq_setting() {
+ sed -i "/${1}/d" "${dnsmasqconfig}"
+ }
+
+-SetTemperatureUnit() {
+- change_setting "TEMPERATUREUNIT" "${unit}"
+- echo -e " ${TICK} Set temperature unit to ${unit}"
+-}
+
+ HashPassword() {
+ # Compute password hash twice to avoid rainbow table vulnerability
+@@ -91,51 +83,6 @@ HashPassword() {
+ echo ${return}
+ }
+
+-SetWebPassword() {
+- if [ "${SUDO_USER}" == "www-data" ]; then
+- echo "Security measure: user www-data is not allowed to change webUI password!"
+- echo "Exiting"
+- exit 1
+- fi
+-
+- if [ "${SUDO_USER}" == "lighttpd" ]; then
+- echo "Security measure: user lighttpd is not allowed to change webUI password!"
+- echo "Exiting"
+- exit 1
+- fi
+-
+- if (( ${#args[2]} > 0 )) ; then
+- readonly PASSWORD="${args[2]}"
+- readonly CONFIRM="${PASSWORD}"
+- else
+- # Prevents a bug if the user presses Ctrl+C and it continues to hide the text typed.
+- # So we reset the terminal via stty if the user does press Ctrl+C
+- trap '{ echo -e "\nNo password will be set" ; stty sane ; exit 1; }' INT
+- read -s -r -p "Enter New Password (Blank for no password): " PASSWORD
+- echo ""
+-
+- if [ "${PASSWORD}" == "" ]; then
+- change_setting "WEBPASSWORD" ""
+- echo -e " ${TICK} Password Removed"
+- exit 0
+- fi
+-
+- read -s -r -p "Confirm Password: " CONFIRM
+- echo ""
+- fi
+-
+- if [ "${PASSWORD}" == "${CONFIRM}" ] ; then
+- # We do not wrap this in brackets, otherwise BASH will expand any appropriate syntax
+- hash=$(HashPassword "$PASSWORD")
+- # Save hash to file
+- change_setting "WEBPASSWORD" "${hash}"
+- echo -e " ${TICK} New password set"
+- else
+- echo -e " ${CROSS} Passwords don't match. Your password has not been changed"
+- exit 1
+- fi
+-}
+-
+ ProcessDNSSettings() {
+ source "${setupVars}"
+
+@@ -258,14 +205,6 @@ SetDNSServers() {
+ RestartDNS
+ }
+
+-SetExcludeDomains() {
+- change_setting "API_EXCLUDE_DOMAINS" "${args[2]}"
+-}
+-
+-SetExcludeClients() {
+- change_setting "API_EXCLUDE_CLIENTS" "${args[2]}"
+-}
+-
+ Poweroff(){
+ nohup bash -c "sleep 5; poweroff" &> /dev/null </dev/null &
+ }
+@@ -350,49 +289,6 @@ ra-param=*,0,0
+ fi
+ }
+
+-EnableDHCP() {
+- change_setting "DHCP_ACTIVE" "true"
+- change_setting "DHCP_START" "${args[2]}"
+- change_setting "DHCP_END" "${args[3]}"
+- change_setting "DHCP_ROUTER" "${args[4]}"
+- change_setting "DHCP_LEASETIME" "${args[5]}"
+- change_setting "PIHOLE_DOMAIN" "${args[6]}"
+- change_setting "DHCP_IPv6" "${args[7]}"
+- change_setting "DHCP_rapid_commit" "${args[8]}"
+-
+- # Remove possible old setting from file
+- delete_dnsmasq_setting "dhcp-"
+- delete_dnsmasq_setting "quiet-dhcp"
+-
+- # If a DHCP client claims that its name is "wpad", ignore that.
+- # This fixes a security hole. see CERT Vulnerability VU#598349
+- # We also ignore "localhost" as Windows behaves strangely if a
+- # device claims this host name
+- add_dnsmasq_setting "dhcp-name-match=set:hostname-ignore,wpad
+-dhcp-name-match=set:hostname-ignore,localhost
+-dhcp-ignore-names=tag:hostname-ignore"
+-
+- ProcessDHCPSettings
+-
+- RestartDNS
+-}
+-
+-DisableDHCP() {
+- change_setting "DHCP_ACTIVE" "false"
+-
+- # Remove possible old setting from file
+- delete_dnsmasq_setting "dhcp-"
+- delete_dnsmasq_setting "quiet-dhcp"
+-
+- ProcessDHCPSettings
+-
+- RestartDNS
+-}
+-
+-SetWebUILayout() {
+- change_setting "WEBUIBOXEDLAYOUT" "${args[2]}"
+-}
+-
+ CustomizeAdLists() {
+ list="/etc/pihole/adlists.list"
+
+@@ -413,14 +309,6 @@ CustomizeAdLists() {
+ fi
+ }
+
+-SetPrivacyMode() {
+- if [[ "${args[2]}" == "true" ]]; then
+- change_setting "API_PRIVACY_MODE" "true"
+- else
+- change_setting "API_PRIVACY_MODE" "false"
+- fi
+-}
+-
+ ResolutionSettings() {
+ typ="${args[2]}"
+ state="${args[3]}"
+@@ -568,22 +456,12 @@ main() {
+ args=("$@")
+
+ case "${args[1]}" in
+- "-p" | "password" ) SetWebPassword;;
+- "-c" | "celsius" ) unit="C"; SetTemperatureUnit;;
+- "-f" | "fahrenheit" ) unit="F"; SetTemperatureUnit;;
+- "-k" | "kelvin" ) unit="K"; SetTemperatureUnit;;
+ "setdns" ) SetDNSServers;;
+- "setexcludedomains" ) SetExcludeDomains;;
+- "setexcludeclients" ) SetExcludeClients;;
+ "poweroff" ) Poweroff;;
+ "reboot" ) Reboot;;
+ "restartdns" ) RestartDNS;;
+ "setquerylog" ) SetQueryLogOptions;;
+- "enabledhcp" ) EnableDHCP;;
+- "disabledhcp" ) DisableDHCP;;
+- "layout" ) SetWebUILayout;;
+ "-h" | "--help" ) helpFunc;;
+- "privacymode" ) SetPrivacyMode;;
+ "resolve" ) ResolutionSettings;;
+ "addstaticdhcp" ) AddDHCPStaticAddress;;
+ "removestaticdhcp" ) RemoveDHCPStaticAddress;;
+diff -uprN pi-hole-4.3.2/advanced/dnsmasq.conf.original pi-hole-4.3.2.cust/advanced/dnsmasq.conf.original
+--- pi-hole-4.3.2/advanced/dnsmasq.conf.original 2019-09-15 17:52:21.000000000 +0200
++++ pi-hole-4.3.2.cust/advanced/dnsmasq.conf.original 2020-02-16 12:50:00.071818192 +0100
+@@ -646,3 +646,4 @@
+
+ # Include all files in a directory which end in .conf
+ #conf-dir=/etc/dnsmasq.d/*.conf
++conf-dir=/etc/dnsmasq.d/,*.conf
+diff -uprN pi-hole-4.3.2/gravity.sh pi-hole-4.3.2.cust/gravity.sh
+--- pi-hole-4.3.2/gravity.sh 2019-09-15 17:52:21.000000000 +0200
++++ pi-hole-4.3.2.cust/gravity.sh 2020-02-16 12:50:00.011818230 +0100
+@@ -19,7 +19,7 @@ regexconverter="/opt/pihole/wildcard_reg
+ source "${regexconverter}"
+
+ basename="pihole"
+-PIHOLE_COMMAND="/usr/local/bin/${basename}"
++PIHOLE_COMMAND="/usr/bin/${basename}"
+
+ piholeDir="/etc/${basename}"
+
+diff -uprN pi-hole-4.3.2/pihole pi-hole-4.3.2.cust/pihole
+--- pi-hole-4.3.2/pihole 2019-09-15 17:52:21.000000000 +0200
++++ pi-hole-4.3.2.cust/pihole 2020-02-16 12:50:00.013818229 +0100
+@@ -13,11 +13,10 @@ readonly PI_HOLE_SCRIPT_DIR="/opt/pihole
+ readonly gravitylist="/etc/pihole/gravity.list"
+ readonly blacklist="/etc/pihole/black.list"
+
+-# setupVars and PI_HOLE_BIN_DIR are not readonly here because in some funcitons (checkout),
+ # it might get set again when the installer is sourced. This causes an
+ # error due to modifying a readonly variable.
+ setupVars="/etc/pihole/setupVars.conf"
+-PI_HOLE_BIN_DIR="/usr/local/bin"
++PI_HOLE_BIN_DIR="/usr/bin"
+
+ readonly colfile="${PI_HOLE_SCRIPT_DIR}/COL_TABLE"
+ source "${colfile}"
+@@ -52,22 +51,6 @@ debugFunc() {
+ exit 0
+ }
+
+-flushFunc() {
+- "${PI_HOLE_SCRIPT_DIR}"/piholeLogFlush.sh "$@"
+- exit 0
+-}
+-
+-updatePiholeFunc() {
+- shift
+- "${PI_HOLE_SCRIPT_DIR}"/update.sh "$@"
+- exit 0
+-}
+-
+-reconfigurePiholeFunc() {
+- /etc/.pihole/automated\ install/basic-install.sh --reconfigure
+- exit 0;
+-}
+-
+ updateGravityFunc() {
+ "${PI_HOLE_SCRIPT_DIR}"/gravity.sh "$@"
+ exit $?
+@@ -79,23 +62,8 @@ queryFunc() {
+ exit 0
+ }
+
+-chronometerFunc() {
+- shift
+- "${PI_HOLE_SCRIPT_DIR}"/chronometer.sh "$@"
+- exit 0
+-}
+-
+
+-uninstallFunc() {
+- "${PI_HOLE_SCRIPT_DIR}"/uninstall.sh
+- exit 0
+-}
+
+-versionFunc() {
+- shift
+- "${PI_HOLE_SCRIPT_DIR}"/version.sh "$@"
+- exit 0
+-}
+
+ restartDNS() {
+ local svcOption svc str output status
+@@ -108,7 +76,7 @@ restartDNS() {
+ svc="killall -s SIGHUP ${resolver}"
+ else
+ # A full restart has been requested
+- svc="service ${resolver} restart"
++ svc="systemctl restart ${resolver}"
+ fi
+
+ # Print output to Terminal, but not to Web Admin
+@@ -316,60 +284,6 @@ tailFunc() {
+ exit 0
+ }
+
+-piholeCheckoutFunc() {
+- if [[ "$2" == "-h" ]] || [[ "$2" == "--help" ]]; then
+- echo "Usage: pihole checkout [repo] [branch]
+-Example: 'pihole checkout master' or 'pihole checkout core dev'
+-Switch Pi-hole subsystems to a different Github branch
+-
+-Repositories:
+- core [branch] Change the branch of Pi-hole's core subsystem
+- web [branch] Change the branch of Web Interface subsystem
+- ftl [branch] Change the branch of Pi-hole's FTL subsystem
+-
+-Branches:
+- master Update subsystems to the latest stable release
+- dev Update subsystems to the latest development release
+- branchname Update subsystems to the specified branchname"
+- exit 0
+- fi
+-
+- source "${PI_HOLE_SCRIPT_DIR}"/piholeCheckout.sh
+- shift
+- checkout "$@"
+-}
+-
+-tricorderFunc() {
+- if [[ ! -p "/dev/stdin" ]]; then
+- echo -e " ${INFO} Please do not call Tricorder directly"
+- exit 1
+- fi
+-
+- if ! (echo > /dev/tcp/tricorder.pi-hole.net/9998) >/dev/null 2>&1; then
+- echo -e " ${CROSS} Unable to connect to Pi-hole's Tricorder server"
+- exit 1
+- fi
+-
+- if command -v openssl &> /dev/null; then
+- openssl s_client -quiet -connect tricorder.pi-hole.net:9998 2> /dev/null < /dev/stdin
+- exit "$?"
+- else
+- echo -e " ${INFO} ${COL_YELLOW}Security Notice${COL_NC}: ${COL_WHITE}openssl${COL_NC} is not installed
+- Your debug log will be transmitted unencrypted via plain-text
+- There is a possibility that this could be intercepted by a third party
+- If you wish to cancel, press Ctrl-C to exit within 10 seconds"
+- secs="10"
+- while [[ "$secs" -gt "0" ]]; do
+- echo -ne "."
+- sleep 1
+- : $((secs--))
+- done
+- echo " "
+- nc tricorder.pi-hole.net 9999 < /dev/stdin
+- exit "$?"
+- fi
+-}
+-
+ updateCheckFunc() {
+ "${PI_HOLE_SCRIPT_DIR}"/updatecheck.sh "$@"
+ exit 0
+@@ -390,33 +304,22 @@ Whitelist/Blacklist Options:
+ Debugging Options:
+ -d, debug Start a debugging session
+ Add '-a' to enable automated debugging
+- -f, flush Flush the Pi-hole log
+- -r, reconfigure Reconfigure or Repair Pi-hole subsystems
+- -t, tail View the live output of the Pi-hole log
+
+ Options:
+- -a, admin Web interface options
+- Add '-h' for more info on Web Interface usage
+- -c, chronometer Calculates stats and displays to an LCD
+ Add '-h' for more info on chronometer usage
+ -g, updateGravity Update the list of ad-serving domains
+ -h, --help, help Show this help dialog
+- -l, logging Specify whether the Pi-hole log should be used
+ Add '-h' for more info on logging usage
+ -q, query Query the adlists for a specified domain
+ Add '-h' for more info on query usage
+- -up, updatePihole Update Pi-hole subsystems
+ Add '--check-only' to exit script before update is performed.
+- -v, version Show installed versions of Pi-hole, Web Interface & FTL
+ Add '-h' for more info on version usage
+- uninstall Uninstall Pi-hole from your system
+ status Display the running status of Pi-hole subsystems
+ enable Enable Pi-hole subsystems
+ disable Disable Pi-hole subsystems
+ Add '-h' for more info on disable usage
+ restartdns Restart Pi-hole subsystems
+- checkout Switch Pi-hole subsystems to a different Github branch
+- Add '-h' for more info on checkout usage";
++";
+ exit 0
+ }
+
+@@ -447,23 +350,15 @@ case "${1}" in
+ "--regex" | "regex" ) listFunc "$@";;
+ "-d" | "debug" ) debugFunc "$@";;
+ "-f" | "flush" ) flushFunc "$@";;
+- "-up" | "updatePihole" ) updatePiholeFunc "$@";;
+- "-r" | "reconfigure" ) reconfigurePiholeFunc;;
+ "-g" | "updateGravity" ) updateGravityFunc "$@";;
+- "-c" | "chronometer" ) chronometerFunc "$@";;
+ "-h" | "help" ) helpFunc;;
+- "-v" | "version" ) versionFunc "$@";;
+ "-q" | "query" ) queryFunc "$@";;
+ "-l" | "logging" ) piholeLogging "$@";;
+- "uninstall" ) uninstallFunc;;
+ "enable" ) piholeEnable 1;;
+ "disable" ) piholeEnable 0 "$2";;
+ "status" ) statusFunc "$2";;
+ "restartdns" ) restartDNS "$2";;
+ "-a" | "admin" ) webpageFunc "$@";;
+ "-t" | "tail" ) tailFunc;;
+- "checkout" ) piholeCheckoutFunc "$@";;
+- "tricorder" ) tricorderFunc;;
+- "updatechecker" ) updateCheckFunc "$@";;
+ * ) helpFunc;;
+ esac
diff --git a/piholeDebug.sh b/piholeDebug.sh
index 26cbde8ff866..ea748c19d6fb 100644
--- a/piholeDebug.sh
+++ b/piholeDebug.sh
@@ -1,4 +1,4 @@
#!/usr/bin/sh
echo -e "Pi-hole debug options are \e[1;31mdisabled\e[0m.\n"
echo -e "ArchLinux distribution of Pi-hole is not supported by official project and this debug report CAN NOT be uploaded to their debug team."
-echo -e "Follow instructions carefully on the project wiki page (\e[1;36mhttps://wiki.archlinux.org/index.php/Pi-hole\e[0m) and please refer to AUR package web page for support and debugging (\e[1;36mhttps://aur.archlinux.org/packages/pi-hole-server\e[0m).\n"
+echo -e "Follow instructions carefully on the project wiki page (\e[1;36mhttps://wiki.archlinux.org/index.php/Pi-hole\e[0m) and please refer to AUR package web page for support and debugging (\e[1;36mhttps://aur.archlinux.org/packages/pi-hole-standalone\e[0m).\n"