mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-24 13:50:17 +00:00
Add update function to pihole script
This commit is contained in:
parent
b3e7619048
commit
2f2e746e56
1 changed files with 10 additions and 0 deletions
10
pihole
10
pihole
|
@ -52,6 +52,14 @@ function updateDashboardFunc {
|
|||
exit 1
|
||||
}
|
||||
|
||||
function updateMainFunc {
|
||||
echo "::: Fetching latest changes from Github..."
|
||||
cd /etc/.pihole
|
||||
${SUDO} git pull
|
||||
${SUDO} /etc/.pihole/automated install/basic-install.sh
|
||||
exit 1
|
||||
}
|
||||
|
||||
function updateGravityFunc {
|
||||
${SUDO} /opt/pihole/gravity.sh "$@"
|
||||
exit 1
|
||||
|
@ -91,6 +99,7 @@ function helpFunc {
|
|||
echo "::: -d, debug Start a debugging session if having trouble"
|
||||
echo "::: -f, flush Flush the pihole.log file"
|
||||
echo "::: -u, updateDashboard Update the web dashboard manually"
|
||||
echo "::: -U, updateMain Update Pi-hole"
|
||||
echo "::: -g, updateGravity Update the list of ad-serving domains"
|
||||
echo "::: -s, setupLCD Automatically configures the Pi to use the 2.8 LCD screen to display stats on it"
|
||||
echo "::: -c, chronometer Calculates stats and displays to an LCD"
|
||||
|
@ -111,6 +120,7 @@ case "$1" in
|
|||
"-d" | "debug" ) debugFunc;;
|
||||
"-f" | "flush" ) flushFunc;;
|
||||
"-u" | "updateDashboard" ) updateDashboardFunc;;
|
||||
"-U" | "updateMain" ) updateMainFunc;;
|
||||
"-g" | "updateGravity" ) updateGravityFunc "$@";;
|
||||
"-s" | "setupLCD" ) setupLCDFunction;;
|
||||
"-c" | "chronometer" ) chronometerFunc "$@";;
|
||||
|
|
Loading…
Reference in a new issue