| 1 |
#!/bin/sh |
| 2 |
set -e |
| 3 |
|
| 4 |
# Copied from /usr/share/debhelper/autoscripts/postinst-systemd-enable |
| 5 |
# from debhelper 13.11.8. |
| 6 |
# This can go once #889635 is fixed. |
| 7 |
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then |
| 8 |
# The following line should be removed in trixie or trixie+1 |
| 9 |
deb-systemd-helper unmask [email protected] >/dev/null || true |
| 10 |
|
| 11 |
# was-enabled defaults to true, so new installations run enable. |
| 12 |
if deb-systemd-helper --quiet was-enabled [email protected]; then |
| 13 |
# Enables the unit on first installation, creates new |
| 14 |
# symlinks on upgrades if the unit file has changed. |
| 15 |
deb-systemd-helper enable [email protected] >/dev/null || true |
| 16 |
else |
| 17 |
# Update the statefile to add new symlinks (if any), which need to be |
| 18 |
# cleaned up on purge. Also remove old symlinks. |
| 19 |
deb-systemd-helper update-state [email protected] >/dev/null || true |
| 20 |
fi |
| 21 |
fi |
| 22 |
|
| 23 |
#DEBHELPER# |