Prototype `whiptails` so they don't fall to shell. Need to do this to all functions.
This commit is contained in:
parent
b22d03b586
commit
e9f1259abe
|
@ -506,8 +506,7 @@ setLogging() {
|
||||||
LogToggleCommand=(whiptail --separate-output --radiolist "Do you want to log queries?\n (Disabling will render graphs on the Admin page useless):" ${r} ${c} 6)
|
LogToggleCommand=(whiptail --separate-output --radiolist "Do you want to log queries?\n (Disabling will render graphs on the Admin page useless):" ${r} ${c} 6)
|
||||||
LogChooseOptions=("On (Reccomended)" "" on
|
LogChooseOptions=("On (Reccomended)" "" on
|
||||||
Off "" off)
|
Off "" off)
|
||||||
LogChoices=$("${LogToggleCommand[@]}" "${LogChooseOptions[@]}" 2>&1 >/dev/tty)
|
LogChoices=$("${LogToggleCommand[@]}" "${LogChooseOptions[@]}" 2>&1 >/dev/tty) || (echo "::: Cancel selected. Exiting..." && exit 1)
|
||||||
if [[ $? = 0 ]];then
|
|
||||||
case ${LogChoices} in
|
case ${LogChoices} in
|
||||||
"On (Recommended)")
|
"On (Recommended)")
|
||||||
echo "::: Logging On."
|
echo "::: Logging On."
|
||||||
|
@ -518,11 +517,6 @@ setLogging() {
|
||||||
QUERYLOGGING=false
|
QUERYLOGGING=false
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
|
||||||
# Well never see this, `set -e` kicked in already and dropped us.
|
|
||||||
echo "::: Cancel selected. Exiting..."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue