From e34696dadae01f7ab5cb64deef169f2fa6a49c38 Mon Sep 17 00:00:00 2001 From: Developer Date: Tue, 21 Apr 2026 19:29:54 -0400 Subject: [PATCH] Fix: Use 'return' instead of 'exit' in launcher.sh since it's sourced Issue: launcher.sh uses 'exit 0' when user selects cleanup option. Since launcher.sh is sourced (not executed), 'exit' terminates the entire shell abruptly, preventing run.sh cleanup code from executing and crashing the SSH connection. Solution: Change 'exit 0' to 'return 0' so launcher.sh returns control to run.sh for proper cleanup handling. This allows: - run.sh to catch the return code - Cleanup flag to be processed - Toolkit directory to be deleted properly - Shell to remain active and return cleanly to user --- launcher.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launcher.sh b/launcher.sh index 5f37f61..5f640da 100755 --- a/launcher.sh +++ b/launcher.sh @@ -676,7 +676,7 @@ main() { echo -e "${GREEN}Thanks for using Server Management Toolkit!${NC}" echo "" fi - exit 0 + return 0 ;; *) echo -e "${RED}Invalid option${NC}"