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
This commit is contained in:
Developer
2026-04-21 19:29:54 -04:00
parent 106ebbd089
commit e34696dada
+1 -1
View File
@@ -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}"