Blocking menu style
This commit is contained in:
parent
d9689e22e8
commit
6c97c1601e
|
@ -2073,33 +2073,22 @@ function domain_blocking_show {
|
||||||
function domain_blocking {
|
function domain_blocking {
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
data=$(mktemp 2>/dev/null)
|
W=(1 $"Block a domain or user"
|
||||||
dialog --backtitle $"Freedombone Control Panel" \
|
2 $"Unblock a domain or user"
|
||||||
--title $"Domain or User Blocking" \
|
3 $"Block an IP address"
|
||||||
--radiolist $"Choose an operation:" 14 60 6 \
|
4 $"Unblock an IP address"
|
||||||
1 $"Block a domain or user" off \
|
5 $"Show blocked domains and users")
|
||||||
2 $"Unblock a domain or user" off \
|
|
||||||
3 $"Block an IP address" off \
|
# shellcheck disable=SC2068
|
||||||
4 $"Unblock an IP address" off \
|
selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Domain or User Blocking" --menu $"Choose an operation, or ESC for main menu:" 13 70 6 "${W[@]}" 3>&2 2>&1 1>&3)
|
||||||
5 $"Show blocked domains and users" off \
|
|
||||||
6 $"Back to main menu" on 2> "$data"
|
case $selection in
|
||||||
sel=$?
|
|
||||||
case $sel in
|
|
||||||
1) rm -f "$data"
|
|
||||||
break;;
|
|
||||||
255) rm -f "$data"
|
|
||||||
break;;
|
|
||||||
esac
|
|
||||||
case $(cat "$data") in
|
|
||||||
1) domain_blocking_add;;
|
1) domain_blocking_add;;
|
||||||
2) domain_blocking_remove;;
|
2) domain_blocking_remove;;
|
||||||
3) ip_blocking_add;;
|
3) ip_blocking_add;;
|
||||||
4) ip_blocking_remove;;
|
4) ip_blocking_remove;;
|
||||||
5) domain_blocking_show;;
|
5) domain_blocking_show;;
|
||||||
6) rm -f "$data"
|
|
||||||
break;;
|
|
||||||
esac
|
esac
|
||||||
rm -f "$data"
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue