Show firewall settings on control panel

This commit is contained in:
Bob Mottram 2016-10-22 10:52:33 +01:00
parent 80ed13fba0
commit 78fd192b97
1 changed files with 49 additions and 34 deletions

View File

@ -1559,6 +1559,19 @@ function reinstall_mariadb {
--msgbox $"MariaDB has been reinstalled" 6 40 --msgbox $"MariaDB has been reinstalled" 6 40
} }
function show_firewall {
clear
echo $"Firewall Settings"
echo ''
while read line; do
firewall_name=$(echo "$line" | awk -F '=' '{print $1}')
firewall_port=$(echo "$line" | awk -F '=' '{print $2}')
echo -n -e "$(pad_string '$firewall_name')"
echo "${firewall_port}"
done < $FIREWALL_CONFIG
any_key
}
function menu_backup_restore { function menu_backup_restore {
while true while true
do do
@ -1758,23 +1771,24 @@ function menu_top_level {
--radiolist $"Choose an operation:" 29 70 22 \ --radiolist $"Choose an operation:" 29 70 22 \
1 $"About this system" off \ 1 $"About this system" off \
2 $"Backup and Restore" off \ 2 $"Backup and Restore" off \
3 $"Reset Tripwire" off \ 3 $"Show Firewall" off \
4 $"App Settings" off \ 4 $"Reset Tripwire" off \
5 $"Add/Remove Apps" off \ 5 $"App Settings" off \
6 $"Logging on/off" off \ 6 $"Add/Remove Apps" off \
7 $"Ping enable/disable" off \ 7 $"Logging on/off" off \
8 $"Manage Users" off \ 8 $"Ping enable/disable" off \
9 $"Email Filtering Rules" off \ 9 $"Manage Users" off \
10 $"Outgoing Email Proxy" off \ 10 $"Email Filtering Rules" off \
11 $"Security Settings" off \ 11 $"Outgoing Email Proxy" off \
12 $"Set the main repository (repo mirrors)" off \ 12 $"Security Settings" off \
13 $"Change the name of this system" off \ 13 $"Set the main repository (repo mirrors)" off \
14 $"Set a static local IP address" off \ 14 $"Change the name of this system" off \
15 $"Wifi menu" off \ 15 $"Set a static local IP address" off \
16 $"Check for updates" off \ 16 $"Wifi menu" off \
17 $"Power off the system" off \ 17 $"Check for updates" off \
18 $"Restart the system" off \ 18 $"Power off the system" off \
19 $"Exit" on 2> $data 19 $"Restart the system" off \
20 $"Exit" on 2> $data
sel=$? sel=$?
case $sel in case $sel in
1) exit 1;; 1) exit 1;;
@ -1783,23 +1797,24 @@ function menu_top_level {
case $(cat $data) in case $(cat $data) in
1) show_about;; 1) show_about;;
2) menu_backup_restore;; 2) menu_backup_restore;;
3) reset_tripwire;; 3) show_firewall;;
4) menu_app_settings;; 4) reset_tripwire;;
5) ${PROJECT_NAME}-addremove;; 5) menu_app_settings;;
6) logging_on_off;; 6) ${PROJECT_NAME}-addremove;;
7) ping_enable_disable;; 7) logging_on_off;;
8) menu_users;; 8) ping_enable_disable;;
9) menu_email;; 9) menu_users;;
10) smtp_proxy;; 10) menu_email;;
11) security_settings;; 11) smtp_proxy;;
12) set_main_repo;; 12) security_settings;;
13) change_system_name;; 13) set_main_repo;;
14) set_static_IP;; 14) change_system_name;;
15) menu_wifi;; 15) set_static_IP;;
16) check_for_updates;; 16) menu_wifi;;
17) shut_down_system;; 17) check_for_updates;;
18) restart_system;; 18) shut_down_system;;
19) break;; 19) restart_system;;
20) break;;
esac esac
done done
} }