mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 23:08:07 +00:00
Update webpage.sh
Signed-off-by: Mograine <ghiot.pierre@gmail.com>
This commit is contained in:
parent
e41c4b5bb6
commit
f9d16c2b15
@ -17,6 +17,7 @@ readonly FTLconf="/etc/pihole/pihole-FTL.conf"
|
|||||||
# 03 -> wildcards
|
# 03 -> wildcards
|
||||||
readonly dhcpstaticconfig="/etc/dnsmasq.d/04-pihole-static-dhcp.conf"
|
readonly dhcpstaticconfig="/etc/dnsmasq.d/04-pihole-static-dhcp.conf"
|
||||||
readonly PI_HOLE_BIN_DIR="/usr/local/bin"
|
readonly PI_HOLE_BIN_DIR="/usr/local/bin"
|
||||||
|
readonly dnscustomfile="/etc/pihole/custom.list"
|
||||||
|
|
||||||
coltable="/opt/pihole/COL_TABLE"
|
coltable="/opt/pihole/COL_TABLE"
|
||||||
if [[ -f ${coltable} ]]; then
|
if [[ -f ${coltable} ]]; then
|
||||||
@ -564,6 +565,17 @@ SetPrivacyLevel() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AddCustomDNSAddress() {
|
||||||
|
ip="${args[2]}"
|
||||||
|
host="${args[3]}"
|
||||||
|
echo "${ip} ${host}" >> "${dnscustomfile}"
|
||||||
|
}
|
||||||
|
|
||||||
|
RemoveCustomDNSAddress() {
|
||||||
|
host="${args[2]}"
|
||||||
|
sed -i "/.*${host}/d" "${dnscustomfile}"
|
||||||
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
args=("$@")
|
args=("$@")
|
||||||
|
|
||||||
@ -595,6 +607,8 @@ main() {
|
|||||||
"audit" ) addAudit "$@";;
|
"audit" ) addAudit "$@";;
|
||||||
"clearaudit" ) clearAudit;;
|
"clearaudit" ) clearAudit;;
|
||||||
"-l" | "privacylevel" ) SetPrivacyLevel;;
|
"-l" | "privacylevel" ) SetPrivacyLevel;;
|
||||||
|
"addcustomdns" ) AddCustomDNSAddress;;
|
||||||
|
"removecustomdns" ) RemoveCustomDNSAddress;;
|
||||||
* ) helpFunc;;
|
* ) helpFunc;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user