CRITICAL FIX: Use return instead of exit - prevent SSH session termination
This commit is contained in:
+3
-5
@@ -709,11 +709,9 @@ main() {
|
|||||||
show_main_menu
|
show_main_menu
|
||||||
|
|
||||||
# Read from terminal (use /dev/tty directly for interaction)
|
# Read from terminal (use /dev/tty directly for interaction)
|
||||||
if read -r choice 2>/dev/null </dev/tty; then
|
if ! read -r choice 2>/dev/null </dev/tty; then
|
||||||
: # Input read successfully
|
# No terminal available, return from function gracefully
|
||||||
else
|
return 0
|
||||||
# No terminal available, exit gracefully
|
|
||||||
exit 0
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case $choice in
|
case $choice in
|
||||||
|
|||||||
Reference in New Issue
Block a user