Closed marcosfrm closed 9 months ago
RPM after:
Enabled? | Running? | |
---|---|---|
Install | Yes | Yes |
Upgrade | If it was before | If it was before |
Removal | No | No |
DEB after:
Enabled? | Running? | |
---|---|---|
Install (not installed or purged) | Yes | Yes |
Install (previously removed) | If it was before[*] | Yes |
Upgrade | If it was before[*] | Yes |
Removal | If it was before[†] | No |
Purge | No | No |
[*] Special case: if previous version < 8.2.1, it will be enabled. [†] Not useful until the package is installed again.
systemctl refuses to disable inexistent units. deb-systemd-helper can do the job for us, preserving enablement state on removal.
try-restart on upgrade is problematic because if the package is removed without purge, the next install is considered an upgrade as the version is still passed as postinst's second command line argument, leading to a stopped service. Let's just restart unconditionally. DEB package will diverge slightly from RPM in this regard.