Added uninstall script

main
Anthony 2025-01-08 01:24:44 +08:00
parent 594bef7381
commit 96aa4e1e5b
1 changed files with 11 additions and 1 deletions

View File

@ -360,4 +360,14 @@ actions:
- curl -O https://deploy-proxy.mightybox.io/addons/mb-backup-manager/raw/branch/main/scripts/imports/check_backup_repo.sh
- curl -O https://deploy-proxy.mightybox.io/addons/mb-backup-manager/raw/branch/main/scripts/imports/check_repo_stats.sh
- chmod +x /home/litespeed/mb-backups/*.sh
- sudo chown -R litespeed:litespeed /home/litespeed/mb-backups
- sudo chown -R litespeed:litespeed /home/litespeed/mb-backups
removeScripts:
- cmd[cp]:
user: root
commands:
# Remove the crontab entry for the add-on
- (crontab -l | grep -v "${globals.scriptPath}/manage_backup_schedule.sh" | crontab -) || true
- rm -rf "${globals.scriptPath}" # Use globals.scriptPath
- rm -f /etc/restic-password
- rm -f /etc/logrotate.d/backup-addon