|
16 | 16 |
|
17 | 17 | # Automatically added by dh_installsystemd/13.24.2 |
18 | 18 | if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then |
19 | | - # The following line should be removed in trixie or trixie+1 |
20 | | - deb-systemd-helper unmask 'zebrasrv.service' >/dev/null || true |
| 19 | + if deb-systemd-helper debian-installed 'zebrasrv.service'; then |
| 20 | + # The following line should be removed in trixie or trixie+1 |
| 21 | + deb-systemd-helper unmask 'zebrasrv.service' >/dev/null || true |
21 | 22 |
|
22 | | - # was-enabled defaults to true, so new installations run enable. |
23 | | - if deb-systemd-helper --quiet was-enabled 'zebrasrv.service'; then |
24 | | - # Enables the unit on first installation, creates new |
25 | | - # symlinks on upgrades if the unit file has changed. |
26 | | - deb-systemd-helper enable 'zebrasrv.service' >/dev/null || true |
27 | | - else |
28 | | - # Update the statefile to add new symlinks (if any), which need to be |
29 | | - # cleaned up on purge. Also remove old symlinks. |
30 | | - deb-systemd-helper update-state 'zebrasrv.service' >/dev/null || true |
31 | | - fi |
32 | | -fi |
33 | | -# End automatically added section |
34 | | -# Automatically added by dh_installsystemd/13.24.2 |
35 | | -if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then |
36 | | - if [ -d /run/systemd/system ]; then |
37 | | - systemctl --system daemon-reload >/dev/null || true |
38 | | - if [ -n "$2" ]; then |
39 | | - _dh_action=restart |
40 | | - else |
41 | | - _dh_action=start |
| 23 | + if deb-systemd-helper --quiet was-enabled 'zebrasrv.service'; then |
| 24 | + # Create new symlinks, if any. |
| 25 | + deb-systemd-helper enable 'zebrasrv.service' >/dev/null || true |
42 | 26 | fi |
43 | | - deb-systemd-invoke $_dh_action 'zebrasrv.service' >/dev/null || true |
44 | 27 | fi |
| 28 | + |
| 29 | + # Update the statefile to add new symlinks (if any), which need to be cleaned |
| 30 | + # up on purge. Also remove old symlinks. |
| 31 | + deb-systemd-helper update-state 'zebrasrv.service' >/dev/null || true |
45 | 32 | fi |
46 | 33 | # End automatically added section |
0 commit comments