mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
add reconfigure flag to -r command
This commit is contained in:
parent
7e10dcdcf0
commit
a43577fa26
2 changed files with 19 additions and 4 deletions
|
@ -40,6 +40,11 @@ columns=$(tput cols)
|
|||
r=$(( rows / 2 ))
|
||||
c=$(( columns / 2 ))
|
||||
|
||||
######## Flags. Shhh ########
|
||||
skipSpaceCheck=false
|
||||
skipRepoUpdate=false
|
||||
runUnattended=false
|
||||
|
||||
######## FIRST CHECK ########
|
||||
# Must be root to install
|
||||
echo ":::"
|
||||
|
@ -884,8 +889,18 @@ update_dialogs(){
|
|||
}
|
||||
|
||||
main() {
|
||||
|
||||
for var in "$@"
|
||||
do
|
||||
case "$var" in
|
||||
"--reconfigure" ) skipRepoUpdate=true;;
|
||||
"--i_do_not_follow_recommendations" ) skipSpaceCheck=false;;
|
||||
"--unattended" ) runUnattended=true;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [[ -f ${setupVars} ]];then
|
||||
if [ "$1" == "pihole" ]; then
|
||||
if [ "$runUnattended" = true ]; then
|
||||
useUpdateVars=true
|
||||
else
|
||||
update_dialogs
|
||||
|
@ -894,7 +909,7 @@ fi
|
|||
|
||||
# Start the installer
|
||||
# Verify there is enough disk space for the install
|
||||
if [[ $1 = "--i_do_not_follow_recommendations" ]]; then
|
||||
if [[ "$skipSpaceCheck" = true ]]; then
|
||||
echo "::: --i_do_not_follow_recommendations passed to script"
|
||||
echo "::: skipping free disk space verification!"
|
||||
else
|
||||
|
|
4
pihole
4
pihole
|
@ -99,7 +99,7 @@ updatePiholeFunc() {
|
|||
echo "::: Fetching latest changes from GitHub..."
|
||||
cd /etc/.pihole
|
||||
git pull origin master
|
||||
/etc/.pihole/automated\ install/basic-install.sh pihole
|
||||
/etc/.pihole/automated\ install/basic-install.sh --unattended
|
||||
|
||||
echo ":::"
|
||||
echo "::: Pi-hole has been updated to version ${piholeVersionLatest}"
|
||||
|
@ -114,7 +114,7 @@ updatePiholeFunc() {
|
|||
}
|
||||
|
||||
reconfigurePiholeFunc() {
|
||||
/etc/.pihole/automated\ install/basic-install.sh
|
||||
/etc/.pihole/automated\ install/basic-install.sh --reconfigure
|
||||
exit 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue