1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-11-18 06:08:21 +00:00

Explicitly allow only -r and --refresh in argument handler

It is already checked, but this make the code explicit.

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
Mcat12 2019-04-27 13:39:44 -07:00
parent 422680ee9f
commit add5e4ca5e
No known key found for this signature in database
GPG Key ID: ABB8FC9789AF524D

View File

@ -461,7 +461,7 @@ chronoFunc() {
fi fi
# Get refresh number # Get refresh number
if [[ "$*" == *"-r"* ]]; then if [[ "$*" == *"-r" || "$*" == *"-r "* || "$*" == *"--refresh" || "$*" == *"--refresh "* ]]; then
num="$*" num="$*"
num="${num/*-r* /}" num="${num/*-r* /}"
num_str="Refresh set for every $num seconds" num_str="Refresh set for every $num seconds"