mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-06-16 14:58:28 +00:00
Update 1.2.2.2 bate
This commit is contained in:
@@ -254,6 +254,32 @@ format_menu_item() {
|
||||
echo "${description}${spacing}${source}"
|
||||
}
|
||||
|
||||
post_install_label() {
|
||||
case "$1" in
|
||||
"Automated post-installation script")
|
||||
translate "Automated post-installation script"
|
||||
;;
|
||||
"Customizable post-installation script")
|
||||
translate "Customizable post-installation script"
|
||||
;;
|
||||
"Uninstall optimizations")
|
||||
translate "Uninstall optimizations"
|
||||
;;
|
||||
"Proxmox VE Post Install")
|
||||
echo "Proxmox VE Post Install"
|
||||
;;
|
||||
"Proxmox VE Microcode")
|
||||
echo "Proxmox VE Microcode"
|
||||
;;
|
||||
"Community Scripts")
|
||||
translate "Community Scripts"
|
||||
;;
|
||||
*)
|
||||
translate "$1"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# ==========================================================
|
||||
show_menu() {
|
||||
while true; do
|
||||
@@ -276,10 +302,8 @@ show_menu() {
|
||||
# above "Uninstall optimizations" so it sits next to the
|
||||
# related rollback action and not buried in the middle.
|
||||
if [[ "$name" == "Uninstall optimizations" && "$update_count" -gt 0 ]]; then
|
||||
local update_label
|
||||
update_label="Apply available updates ($update_count)"
|
||||
local translated_update
|
||||
translated_update="$(translate "$update_label")"
|
||||
translated_update="$(translate "Apply available updates") ($update_count)"
|
||||
local formatted_update
|
||||
formatted_update=$(format_menu_item "$translated_update" "ProxMenux")
|
||||
menu_items+=("$counter" "$formatted_update")
|
||||
@@ -287,7 +311,8 @@ show_menu() {
|
||||
((counter++))
|
||||
fi
|
||||
|
||||
local translated_name="$(translate "$name")"
|
||||
local translated_name
|
||||
translated_name="$(post_install_label "$name")"
|
||||
local formatted_item
|
||||
formatted_item=$(format_menu_item "$translated_name" "$source")
|
||||
menu_items+=("$counter" "$formatted_item")
|
||||
@@ -297,13 +322,14 @@ show_menu() {
|
||||
|
||||
|
||||
menu_items+=("" "")
|
||||
menu_items+=("-" "───────────────────── Community Scripts ──────────────────────")
|
||||
menu_items+=("-" "───────────────────── $(post_install_label "Community Scripts") ──────────────────────")
|
||||
menu_items+=("" "")
|
||||
|
||||
|
||||
for script in "${COMMUNITY_SCRIPTS[@]}"; do
|
||||
IFS='|' read -r name source command <<< "$script"
|
||||
local translated_name="$(translate "$name")"
|
||||
local translated_name
|
||||
translated_name="$(post_install_label "$name")"
|
||||
local formatted_item
|
||||
formatted_item=$(format_menu_item "$translated_name" "$source")
|
||||
menu_items+=("$counter" "$formatted_item")
|
||||
|
||||
@@ -1184,6 +1184,56 @@ format_menu_item() {
|
||||
echo "${description}${spacing}${source}"
|
||||
}
|
||||
|
||||
network_menu_label() {
|
||||
case "$1" in
|
||||
"Real-time network usage (iftop)")
|
||||
translate "Real-time network usage (iftop)"
|
||||
;;
|
||||
"Network monitoring tool (iptraf-ng)")
|
||||
translate "Network monitoring tool (iptraf-ng)"
|
||||
;;
|
||||
"Bandwidth test (iperf3)")
|
||||
translate "Bandwidth test (iperf3)"
|
||||
;;
|
||||
"Show Routing Table")
|
||||
translate "Show Routing Table"
|
||||
;;
|
||||
"Test Connectivity")
|
||||
translate "Test Connectivity"
|
||||
;;
|
||||
"Advanced Diagnostics")
|
||||
translate "Advanced Diagnostics"
|
||||
;;
|
||||
"Analyze Bridge Configuration")
|
||||
translate "Analyze Bridge Configuration"
|
||||
;;
|
||||
"Analyze Network Configuration")
|
||||
translate "Analyze Network Configuration"
|
||||
;;
|
||||
"Setup Persistent Network Names")
|
||||
translate "Setup Persistent Network Names"
|
||||
;;
|
||||
"Restart Network Service")
|
||||
translate "Restart Network Service"
|
||||
;;
|
||||
"Show Network Config File")
|
||||
translate "Show Network Config File"
|
||||
;;
|
||||
"Create Network Backup")
|
||||
translate "Create Network Backup"
|
||||
;;
|
||||
"Restore Network Backup")
|
||||
translate "Restore Network Backup"
|
||||
;;
|
||||
"Disable NIC Offloading (Intel e1000e)")
|
||||
translate "Disable NIC Offloading (Intel e1000e)"
|
||||
;;
|
||||
*)
|
||||
translate "$1"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# ==========================================================
|
||||
show_menu() {
|
||||
while true; do
|
||||
@@ -1195,7 +1245,8 @@ show_menu() {
|
||||
|
||||
for script in "${PROXMENUX_SCRIPTS[@]}"; do
|
||||
IFS='|' read -r name source command <<< "$script"
|
||||
local translated_name="$(translate "$name")"
|
||||
local translated_name
|
||||
translated_name="$(network_menu_label "$name")"
|
||||
local formatted_item
|
||||
formatted_item=$(format_menu_item "$translated_name" "$source")
|
||||
menu_items+=("$counter" "$formatted_item")
|
||||
@@ -1211,7 +1262,8 @@ show_menu() {
|
||||
|
||||
for script in "${COMMUNITY_SCRIPTS[@]}"; do
|
||||
IFS='|' read -r name source command <<< "$script"
|
||||
local translated_name="$(translate "$name")"
|
||||
local translated_name
|
||||
translated_name="$(network_menu_label "$name")"
|
||||
local formatted_item
|
||||
formatted_item=$(format_menu_item "$translated_name" "$source")
|
||||
menu_items+=("$counter" "$formatted_item")
|
||||
|
||||
Reference in New Issue
Block a user