Move firewall display to security settings
This commit is contained in:
parent
96d41e4368
commit
e509d5a196
|
@ -1775,18 +1775,6 @@ function reinstall_mariadb {
|
||||||
--msgbox $"MariaDB has been reinstalled" 6 40
|
--msgbox $"MariaDB has been reinstalled" 6 40
|
||||||
}
|
}
|
||||||
|
|
||||||
function show_firewall {
|
|
||||||
W=()
|
|
||||||
while read -r line; do
|
|
||||||
firewall_name=$(echo "$line" | awk -F '=' '{print $1}')
|
|
||||||
firewall_port=$(echo "$line" | awk -F '=' '{print $2}')
|
|
||||||
W+=("$(pad_string "${firewall_name}")" "${firewall_port}")
|
|
||||||
done < "$FIREWALL_CONFIG"
|
|
||||||
|
|
||||||
# shellcheck disable=SC2068
|
|
||||||
dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Firewall" --menu $"Press ESC to return to main menu" 28 50 28 "${W[@]}" 3>&2 2>&1 1>&3
|
|
||||||
}
|
|
||||||
|
|
||||||
function email_extra_domains {
|
function email_extra_domains {
|
||||||
email_hostnames=$(grep "dc_other_hostnames" /etc/exim4/update-exim4.conf.conf | awk -F "'" '{print $2}')
|
email_hostnames=$(grep "dc_other_hostnames" /etc/exim4/update-exim4.conf.conf | awk -F "'" '{print $2}')
|
||||||
|
|
||||||
|
@ -2242,27 +2230,26 @@ function menu_top_level {
|
||||||
W=(1 $"About this system"
|
W=(1 $"About this system"
|
||||||
2 $"Passwords"
|
2 $"Passwords"
|
||||||
3 $"Backup and Restore"
|
3 $"Backup and Restore"
|
||||||
4 $"Show Firewall"
|
4 $"Verify Tripwire Code"
|
||||||
5 $"Verify Tripwire Code"
|
5 $"Reset Tripwire"
|
||||||
6 $"Reset Tripwire"
|
6 $"App Settings"
|
||||||
7 $"App Settings"
|
7 $"Add/Remove Apps"
|
||||||
8 $"Add/Remove Apps"
|
8 $"Logging on/off"
|
||||||
9 $"Logging on/off"
|
9 $"Ping enable/disable"
|
||||||
10 $"Ping enable/disable"
|
10 $"Manage Users"
|
||||||
11 $"Manage Users"
|
11 $"Email Menu"
|
||||||
12 $"Email Menu"
|
12 $"Domain or User Blocking"
|
||||||
13 $"Domain or User Blocking"
|
13 $"Security Settings"
|
||||||
14 $"Security Settings"
|
14 $"Change the name of this system"
|
||||||
15 $"Change the name of this system"
|
15 $"Set a static local IP address"
|
||||||
16 $"Set a static local IP address"
|
16 $"Wifi menu"
|
||||||
17 $"Wifi menu"
|
17 $"Add Clacks"
|
||||||
18 $"Add Clacks"
|
18 $"Check for updates"
|
||||||
19 $"Check for updates"
|
19 $"Power off the system"
|
||||||
20 $"Power off the system"
|
20 $"Restart the system")
|
||||||
21 $"Restart the system")
|
|
||||||
|
|
||||||
# shellcheck disable=SC2068
|
# shellcheck disable=SC2068
|
||||||
selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Administrator Control Panel" --menu $"Choose an operation, or ESC to exit:" 28 60 28 "${W[@]}" 3>&2 2>&1 1>&3)
|
selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Administrator Control Panel" --menu $"Choose an operation, or ESC to exit:" 27 60 27 "${W[@]}" 3>&2 2>&1 1>&3)
|
||||||
|
|
||||||
if [ ! "$selection" ]; then
|
if [ ! "$selection" ]; then
|
||||||
break
|
break
|
||||||
|
@ -2274,28 +2261,27 @@ function menu_top_level {
|
||||||
1) show_about;;
|
1) show_about;;
|
||||||
2) view_or_change_passwords;;
|
2) view_or_change_passwords;;
|
||||||
3) menu_backup_restore;;
|
3) menu_backup_restore;;
|
||||||
4) show_firewall;;
|
4) show_tripwire_verification_code
|
||||||
5) show_tripwire_verification_code
|
|
||||||
any_key_verify;;
|
any_key_verify;;
|
||||||
6) reset_tripwire;;
|
5) reset_tripwire;;
|
||||||
7) menu_app_settings;;
|
6) menu_app_settings;;
|
||||||
8) if ! /usr/local/bin/addremove; then
|
7) if ! /usr/local/bin/addremove; then
|
||||||
any_key
|
any_key
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
9) logging_on_off;;
|
8) logging_on_off;;
|
||||||
10) ping_enable_disable;;
|
9) ping_enable_disable;;
|
||||||
11) menu_users;;
|
10) menu_users;;
|
||||||
12) menu_email;;
|
11) menu_email;;
|
||||||
13) domain_blocking;;
|
12) domain_blocking;;
|
||||||
14) security_settings;;
|
13) security_settings;;
|
||||||
15) change_system_name;;
|
14) change_system_name;;
|
||||||
16) set_static_IP;;
|
15) set_static_IP;;
|
||||||
17) menu_wifi;;
|
16) menu_wifi;;
|
||||||
18) add_clacks;;
|
17) add_clacks;;
|
||||||
19) check_for_updates;;
|
18) check_for_updates;;
|
||||||
20) shut_down_system;;
|
19) shut_down_system;;
|
||||||
21) restart_system;;
|
20) restart_system;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,6 +69,18 @@ LETSENCRYPT_SERVER='https://acme-v01.api.letsencrypt.org/directory'
|
||||||
|
|
||||||
MY_USERNAME=
|
MY_USERNAME=
|
||||||
|
|
||||||
|
function show_firewall {
|
||||||
|
W=()
|
||||||
|
while read -r line; do
|
||||||
|
firewall_name=$(echo "$line" | awk -F '=' '{print $1}')
|
||||||
|
firewall_port=$(echo "$line" | awk -F '=' '{print $2}')
|
||||||
|
W+=("$(pad_string "${firewall_name}")" "${firewall_port}")
|
||||||
|
done < "$FIREWALL_CONFIG"
|
||||||
|
|
||||||
|
# shellcheck disable=SC2068
|
||||||
|
dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Firewall" --menu $"Press ESC to return to main menu" 28 50 28 "${W[@]}" 3>&2 2>&1 1>&3
|
||||||
|
}
|
||||||
|
|
||||||
function export_passwords {
|
function export_passwords {
|
||||||
detect_usb_drive
|
detect_usb_drive
|
||||||
dialog --title $"Export passwords to USB drive $USB_DRIVE" \
|
dialog --title $"Export passwords to USB drive $USB_DRIVE" \
|
||||||
|
@ -976,10 +988,11 @@ function menu_security_settings {
|
||||||
12 $"Delete a Let's Encrypt certificate"
|
12 $"Delete a Let's Encrypt certificate"
|
||||||
13 $"Enable GPG based authentication (monkeysphere)"
|
13 $"Enable GPG based authentication (monkeysphere)"
|
||||||
14 $"Register a website with monkeysphere"
|
14 $"Register a website with monkeysphere"
|
||||||
15 $"Allow ssh login with passwords")
|
15 $"Allow ssh login with passwords"
|
||||||
|
16 $"Show firewall")
|
||||||
|
|
||||||
# shellcheck disable=SC2068
|
# shellcheck disable=SC2068
|
||||||
selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Security Settings" --menu $"Choose an operation, or ESC to exit:" 23 76 23 "${W[@]}" 3>&2 2>&1 1>&3)
|
selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Security Settings" --menu $"Choose an operation, or ESC to exit:" 24 76 24 "${W[@]}" 3>&2 2>&1 1>&3)
|
||||||
|
|
||||||
if [ ! "$selection" ]; then
|
if [ ! "$selection" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -1062,6 +1075,10 @@ function menu_security_settings {
|
||||||
change_ssh_settings
|
change_ssh_settings
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
16)
|
||||||
|
show_firewall
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
change_website_settings
|
change_website_settings
|
||||||
|
|
Loading…
Reference in New Issue