Add wrapper script for automatic cleanup with zero manual steps

New workflow:
1. User runs: source run.sh (instead of bash launcher.sh)
2. Launcher runs normally
3. On exit with cleanup=yes, launcher sets flag file
4. Wrapper detects flag and does ALL cleanup automatically:
   - Cleans ~/.bash_history file
   - Clears current shell's in-memory history
   - Removes toolkit directory
   - No manual commands needed

The key: wrapper is SOURCED so it runs in parent shell and can modify history.

User experience: answer "yes" and cleanup happens instantly, automatically.
This commit is contained in:
cschantz
2025-11-11 18:22:10 -05:00
parent 8d98e7f79e
commit fae334384e
3 changed files with 61 additions and 44 deletions
+3 -3
View File
@@ -75,14 +75,14 @@ server-toolkit/
### Installation & Running
```bash
curl -sL https://git.mull.lol/cschantz/Linux-Server-Management-Toolkit/archive/main.tar.gz | tar xz && cd linux-server-management-toolkit && bash launcher.sh
curl -sL https://git.mull.lol/cschantz/Linux-Server-Management-Toolkit/archive/main.tar.gz | tar xz && cd linux-server-management-toolkit && source run.sh
```
**Privacy:** When exiting (option 0), answer "yes" to cleanup and run the source command shown to remove all traces.
**Privacy:** When exiting (option 0), answer "yes" - cleanup happens automatically with no extra steps.
Or if already downloaded:
```bash
bash /root/server-toolkit/launcher.sh
source /root/server-toolkit/run.sh
```
## ✨ Key Features