mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +00:00
List fix: no reload (#3981)
* scripts/list: Fixed --noreload options We should differentiate the ability and the needings. Signed-off-by: Andras Tim <andras.tim@gmail.com> * scripts/list: Removed unnecessary tailing whitespaces Signed-off-by: Andras Tim <andras.tim@gmail.com> * Update advanced/Scripts/list.sh Signed-off-by: Andras Tim <andras.tim@gmail.com> * Merge bash conditions according to MichaIng suggestion Co-authored-by: micha@dietpi.com Signed-off-by: Andras Tim <andras.tim@gmail.com>
This commit is contained in:
parent
80560d4a4a
commit
541257849d
1 changed files with 6 additions and 5 deletions
|
@ -23,7 +23,7 @@ fi
|
||||||
# have changed
|
# have changed
|
||||||
gravityDBfile="${GRAVITYDB}"
|
gravityDBfile="${GRAVITYDB}"
|
||||||
|
|
||||||
reload=false
|
noReloadRequested=false
|
||||||
addmode=true
|
addmode=true
|
||||||
verbose=true
|
verbose=true
|
||||||
wildcard=false
|
wildcard=false
|
||||||
|
@ -35,6 +35,7 @@ typeId=""
|
||||||
comment=""
|
comment=""
|
||||||
declare -i domaincount
|
declare -i domaincount
|
||||||
domaincount=0
|
domaincount=0
|
||||||
|
reload=false
|
||||||
|
|
||||||
colfile="/opt/pihole/COL_TABLE"
|
colfile="/opt/pihole/COL_TABLE"
|
||||||
source ${colfile}
|
source ${colfile}
|
||||||
|
@ -268,7 +269,7 @@ while (( "$#" )); do
|
||||||
"--white-wild" | "white-wild" ) typeId=2; wildcard=true;;
|
"--white-wild" | "white-wild" ) typeId=2; wildcard=true;;
|
||||||
"--wild" | "wildcard" ) typeId=3; wildcard=true;;
|
"--wild" | "wildcard" ) typeId=3; wildcard=true;;
|
||||||
"--regex" | "regex" ) typeId=3;;
|
"--regex" | "regex" ) typeId=3;;
|
||||||
"-nr"| "--noreload" ) reload=false;;
|
"-nr"| "--noreload" ) noReloadRequested=true;;
|
||||||
"-d" | "--delmode" ) addmode=false;;
|
"-d" | "--delmode" ) addmode=false;;
|
||||||
"-q" | "--quiet" ) verbose=false;;
|
"-q" | "--quiet" ) verbose=false;;
|
||||||
"-h" | "--help" ) helpFunc;;
|
"-h" | "--help" ) helpFunc;;
|
||||||
|
@ -294,6 +295,6 @@ if $web; then
|
||||||
echo "DONE"
|
echo "DONE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${reload}" != false ]]; then
|
if [[ ${reload} == true && ${noReloadRequested} == false ]]; then
|
||||||
pihole restartdns reload-lists
|
pihole restartdns reload-lists
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue