mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-24 23:23:42 +00:00
add pihole update script to 'pihole' command
This commit is contained in:
parent
aac7fa9c14
commit
42614f6a7a
1 changed files with 22 additions and 15 deletions
37
pihole
37
pihole
|
@ -57,6 +57,11 @@ function updateGravityFunc {
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updatePiholeFunc {
|
||||||
|
$SUDO /opt/pihole/updatePihole.sh
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
function setupLCDFunction {
|
function setupLCDFunction {
|
||||||
$SUDO /opt/pihole/setupLCD.sh
|
$SUDO /opt/pihole/setupLCD.sh
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -75,21 +80,22 @@ function uninstallFunc {
|
||||||
}
|
}
|
||||||
|
|
||||||
function helpFunc {
|
function helpFunc {
|
||||||
echo "::: Control all PiHole specific functions!"
|
echo "::: Control all PiHole specific functions!"
|
||||||
echo ":::"
|
echo ":::"
|
||||||
echo "::: Usage: pihole [options]"
|
echo "::: Usage: pihole [options]"
|
||||||
echo "::: Add -h after -w (whitelist), -b (blacklist), or -c (chronometer) for more information on usage"
|
printf ":::\tAdd -h after -w (whitelist), -b (blacklist), or -c (chronometer) for more information on usage\n"
|
||||||
echo ":::"
|
echo ":::"
|
||||||
echo "::: Options:"
|
echo "::: Options:"
|
||||||
echo "::: -w, whitelist Whitelist domains"
|
echo "::: -w, whitelist Whitelist domains"
|
||||||
echo "::: -b, blacklist Blacklist domains"
|
echo "::: -b, blacklist Blacklist domains"
|
||||||
echo "::: -d, debug Start a debugging session if having trouble"
|
echo "::: -d, debug Start a debugging session if having trouble"
|
||||||
echo "::: -f, flush Flush the pihole.log file"
|
echo "::: -f, flush Flush the pihole.log file"
|
||||||
echo "::: -u, updateDashboard Update the web dashboard manually"
|
echo "::: -u, updateDashboard Update the web dashboard manually"
|
||||||
echo "::: -g, updateGravity Update the list of ad-serving domains"
|
echo "::: -up, updatePihole Update the Pi-hole core files manually"
|
||||||
echo "::: -s, setupLCD Automatically configures the Pi to use the 2.8 LCD screen to display stats on it"
|
echo "::: -g, updateGravity Update the list of ad-serving domains"
|
||||||
echo "::: -c, chronometer Calculates stats and displays to an LCD"
|
echo "::: -s, setupLCD Automatically configures the Pi to use the 2.8 LCD screen to display stats on it"
|
||||||
echo "::: -h, help Show this help dialog"
|
echo "::: -c, chronometer Calculates stats and displays to an LCD"
|
||||||
|
echo "::: -h, help Show this help dialog"
|
||||||
echo "::: uninstall Uninstall Pi-Hole from your system!"
|
echo "::: uninstall Uninstall Pi-Hole from your system!"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
@ -105,6 +111,7 @@ case "$1" in
|
||||||
"-d" | "debug" ) debugFunc;;
|
"-d" | "debug" ) debugFunc;;
|
||||||
"-f" | "flush" ) flushFunc;;
|
"-f" | "flush" ) flushFunc;;
|
||||||
"-u" | "updateDashboard" ) updateDashboardFunc;;
|
"-u" | "updateDashboard" ) updateDashboardFunc;;
|
||||||
|
"-up" | "updatePihole" ) updatePiholeFunc;;
|
||||||
"-g" | "updateGravity" ) updateGravityFunc;;
|
"-g" | "updateGravity" ) updateGravityFunc;;
|
||||||
"-s" | "setupLCD" ) setupLCDFunction;;
|
"-s" | "setupLCD" ) setupLCDFunction;;
|
||||||
"-c" | "chronometer" ) chronometerFunc "$@";;
|
"-c" | "chronometer" ) chronometerFunc "$@";;
|
||||||
|
|
Loading…
Reference in a new issue