- debian/control: Package metadata with dependencies - debian/postinst: Service user, dirs, JWT key gen, config, cron setup - debian/prerm: Graceful service stop before upgrade - debian/postrm: Purge cleanup (user, data, config, cron) - debian/changelog: 1.0.0-1 initial release - debian/install: File manifest - scripts/build-package.sh: Full build pipeline (cargo release, frontend, dpkg-deb) - .gitignore: Exclude *.deb and package-build/
21 lines
392 B
Bash
21 lines
392 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
case "$1" in
|
|
remove|upgrade|deconfigure)
|
|
# Stop services gracefully
|
|
if systemctl is-active --quiet patch-manager.target 2>/dev/null; then
|
|
systemctl stop patch-manager.target 2>/dev/null || true
|
|
fi
|
|
;;
|
|
|
|
failed-upgrade)
|
|
;;
|
|
|
|
*)
|
|
echo "prerm called with unknown argument \`$1'" >&2
|
|
;;
|
|
esac
|
|
|
|
exit 0
|