Add bash / cron based update checker for Pi-hole

This commit is contained in:
DL6ER
2017-10-28 13:20:02 +02:00
parent 2c33c64fae
commit 6ca47dc3b3
3 changed files with 81 additions and 2 deletions

10
pihole
View File

@@ -200,7 +200,7 @@ Options:
# Scan Wildcards
if [[ -e "${wildcardlist}" ]]; then
# Determine all subdomains, domain and TLDs
# Determine all subdomains, domain and TLDs
mapfile -t wildcards <<< "$(processWildcards "${domainQuery}")"
for match in "${wildcards[@]}"; do
@@ -483,7 +483,7 @@ statusFunc() {
# Determine if Pi-hole's addn-hosts configs are commented out
addnConfigs=$(grep -i "addn-hosts=/" /etc/dnsmasq.d/01-pihole.conf)
if [[ "${addnConfigs}" =~ "#" ]]; then
# A config is commented out
case "${1}" in
@@ -579,6 +579,11 @@ tricorderFunc() {
fi
}
updateCheckFunc() {
"${PI_HOLE_SCRIPT_DIR}"/updatecheck.sh "$@"
exit 0
}
helpFunc() {
echo "Usage: pihole [options]
Example: 'pihole -w -h'
@@ -650,5 +655,6 @@ case "${1}" in
"-t" | "tail" ) tailFunc;;
"checkout" ) piholeCheckoutFunc "$@";;
"tricorder" ) tricorderFunc;;
"updatechecker" ) updateCheckFunc;;
* ) helpFunc;;
esac