feat: add bump-version.sh script for version management
Automates version bumps across all version source files: - Cargo.toml (PRIMARY - workspace.package.version) - debian/changelog (prepend new entry) - debian/control (update Version field) - scripts/build-package.sh (update VERSION variable) - frontend/package.json (update version field) - Stale references check after bump Usage: ./scripts/bump-version.sh <new_version> <old_version>
This commit is contained in:
36
debian/postrm
vendored
Normal file
36
debian/postrm
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
purge)
|
||||
# Remove service user (only if purge)
|
||||
if id patch-manager &>/dev/null; then
|
||||
userdel patch-manager 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Remove runtime data
|
||||
rm -rf /var/log/patch-manager
|
||||
rm -rf /opt/patch-manager
|
||||
rm -rf /var/backups/patch-manager
|
||||
|
||||
# Remove configuration and keys (purge only)
|
||||
rm -rf /etc/patch-manager
|
||||
|
||||
# Remove backup cron
|
||||
crontab -l 2>/dev/null | grep -vF "backup.sh" | crontab - 2>/dev/null || true
|
||||
|
||||
# Reload systemd
|
||||
systemctl daemon-reload
|
||||
;;
|
||||
|
||||
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
|
||||
# On remove (not purge), keep config and keys
|
||||
systemctl daemon-reload 2>/dev/null || true
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postrm called with unknown argument \`$1'" >&2
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user