| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | set -e |
| 3 | |
| 4 | #DEBHELPER# |
| 5 | |
| 6 | # Stolen from an example section generated by dh_installsystemd/13.11.4 |
| 7 | if [scip-shell system . . `[`. "$1" = "configure" ] || [scip-shell system . . `[`. "$1" = "abort-upgrade" ] || [scip-shell system . . `[`. "$1" = "abort-deconfigure" ] || [scip-shell system . . `[`. "$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-helperscip-shell system . . 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-helperscip-shell system . . deb-systemd-helper. enable '[email protected]' >/dev/nullscip-shell filesystem . . `/dev/null`. || truescip-shell system . . 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-helperscip-shell system . . deb-systemd-helper. update-state '[email protected]' >/dev/nullscip-shell filesystem . . `/dev/null`. || truescip-shell system . . true. |
| 20 | fi |
| 21 | fi |
| 22 | # Inspired from an example section generated by dh_installsystemd/13.11.4 |
| 23 | if [scip-shell system . . `[`. "$1" = "configure" ] || [scip-shell system . . `[`. "$1" = "abort-upgrade" ] || [scip-shell system . . `[`. "$1" = "abort-deconfigure" ] || [scip-shell system . . `[`. "$1" = "abort-remove" ] ; then |
| 24 | if [scip-shell system . . `[`. -d /run/systemd/systemscip-shell filesystem . . `/run/systemd/system`. ]; then |
| 25 | systemctl --system daemon-reload >/dev/nullscip-shell filesystem . . `/dev/null`. || truescip-shell system . . true. |
| 26 | # Unlike the code generated by debhelper, don’t try and (re)start that unit, it won’t work on a service template. |
| 27 | #if [ -n "$2" ]; then |
| 28 | # _dh_action=restart |
| 29 | #else |
| 30 | # _dh_action=start |
| 31 | #fi |
| 32 | #deb-systemd-invoke $_dh_action '[email protected]' >/dev/null || true |
| 33 | fi |
| 34 | fi |