From 575bb8858150feec77a961fb48a854e8a679511f Mon Sep 17 00:00:00 2001 From: DAProgs Date: Thu, 12 Mar 2026 23:34:57 -0400 Subject: [PATCH] 2303.3 update 2 --- network-config.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/network-config.sh b/network-config.sh index 7b7d28e..f3f65a0 100755 --- a/network-config.sh +++ b/network-config.sh @@ -367,7 +367,9 @@ shell_access() { echo "" echo " Access granted. Type 'exit' to return to the menu." echo "" + reset_colors bash + set_colors return else echo " Incorrect password.$( (( attempts > 0 )) && echo " $attempts attempt(s) remaining." || echo "" )" @@ -417,6 +419,20 @@ main_menu() { done } +# ── terminal colors ─────────────────────────────────────────────────────────── + +# Dark blue background (4), yellow text (3) +set_colors() { + tput setab 4 + tput setaf 3 + tput clear +} + +reset_colors() { + tput sgr0 + tput clear +} + # ── entry point ─────────────────────────────────────────────────────────────── if [ "$EUID" -ne 0 ]; then @@ -424,4 +440,8 @@ if [ "$EUID" -ne 0 ]; then exit 1 fi +trap 'reset_colors; exit 0' EXIT +trap 'reset_colors; exit 130' INT + +set_colors main_menu