Debian Codegraph @

debian/postinst

raw symbols SCIP
1 #!/bin/sh
2 set -e
3
4 #DEBHELPER#
5
6 # Stolen from an example section generated by dh_installsystemd/13.11.4
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 # Inspired from an example section generated by dh_installsystemd/13.11.4
23 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
24 if [ -d /run/systemd/system ]; then
25 systemctl --system daemon-reload >/dev/null || 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