mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Fix privacy level whiptail option format
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
parent
c22e94c9c7
commit
6a26a05dbf
1 changed files with 6 additions and 25 deletions
|
@ -1020,39 +1020,20 @@ setLogging() {
|
||||||
setPrivacyLevel() {
|
setPrivacyLevel() {
|
||||||
local LevelCommand
|
local LevelCommand
|
||||||
local LevelOptions
|
local LevelOptions
|
||||||
local LevelChoice
|
|
||||||
|
|
||||||
LevelCommand=(whiptail --separate-output --radiolist "Select a privacy mode for FTL." "${r}" "${c}" 6)
|
LevelCommand=(whiptail --separate-output --radiolist "Select a privacy mode for FTL." "${r}" "${c}" 6)
|
||||||
|
|
||||||
# The default selection is level 0
|
# The default selection is level 0
|
||||||
LevelOptions=(
|
LevelOptions=(
|
||||||
"0 - Show everything" on
|
"0" "Show everything" on
|
||||||
"1 - Hide domains" off
|
"1" "Hide domains" off
|
||||||
"2 - Hide domains and clients" off
|
"2" "Hide domains and clients" off
|
||||||
"3 - Anonymous mode" off
|
"3" "Anonymous mode" off
|
||||||
"4 - Disabled statistics" off
|
"4" "Disabled statistics" off
|
||||||
)
|
)
|
||||||
|
|
||||||
# Get the user's choice
|
# Get the user's choice
|
||||||
LevelChoice=$("${LevelCommand[@]}" "${LevelOptions[@]}" 2>&1 >/dev/tty) || (echo -e " ${COL_LIGHT_RED}Cancel was selected, exiting installer${COL_NC}" && exit 1)
|
PRIVACY_LEVEL=$("${LevelCommand[@]}" "${LevelOptions[@]}" 2>&1 >/dev/tty) || (echo -e " ${COL_LIGHT_RED}Cancel was selected, exiting installer${COL_NC}" && exit 1)
|
||||||
|
|
||||||
case "${LevelChoice}" in
|
|
||||||
"0 - Show everything")
|
|
||||||
PRIVACY_LEVEL=0
|
|
||||||
;;
|
|
||||||
"1 - Hide domains")
|
|
||||||
PRIVACY_LEVEL=1
|
|
||||||
;;
|
|
||||||
"2 - Hide domains and clients")
|
|
||||||
PRIVACY_LEVEL=2
|
|
||||||
;;
|
|
||||||
"3 - Anonymous mode")
|
|
||||||
PRIVACY_LEVEL=3
|
|
||||||
;;
|
|
||||||
"4 - Disabled statistics")
|
|
||||||
PRIVACY_LEVEL=4
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
echo -en " ${INFO} Privacy level ${PRIVACY_LEVEL}"
|
echo -en " ${INFO} Privacy level ${PRIVACY_LEVEL}"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue