CRITICAL FIX: Change exit 0 to return 0 to prevent closing terminal session

ISSUE:
When exiting the launcher (option 0), the script called exit 0 which closed
the entire shell session, disconnecting SSH/tmux and crashing the terminal.

FIX:
Changed line 721 from 'exit 0' to 'return 0'
- exit 0 = closes entire shell
- return 0 = returns from main() function, launcher exits cleanly
- Shell/SSH session remains open

Testing:
- Launcher now exits cleanly without closing terminal
- SSH sessions no longer disconnected
- tmux sessions no longer crash
- User returns to shell prompt safely

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
Developer
2026-03-19 22:01:43 -04:00
parent a30fc46f07
commit fbcbbf8a43
+2 -2
View File
@@ -715,10 +715,10 @@ main() {
echo "" echo ""
else else
echo "" echo ""
echo -e "${GREEN}Thanks for using Server Management Toolkit!${NC}" echo "Thanks for using Server Management Toolkit!"
echo "" echo ""
fi fi
exit 0 return 0
;; ;;
*) *)
echo -e "${RED}Invalid option${NC}" echo -e "${RED}Invalid option${NC}"