7 if test -n "$2"; then # upgrade
8 dh_action
="reload-or-try-restart";
14 if systemctl
-q is-enabled
"$unit"; then
15 systemctl
--system daemon-reload
>/dev
/null || true
16 deb-systemd-invoke
$dh_action "$unit"
22 # Copied from dh_installsystemd/12.1.1
23 if [ "$1" = "configure" ] ||
[ "$1" = "abort-upgrade" ] ||
[ "$1" = "abort-deconfigure" ] ||
[ "$1" = "abort-remove" ] ; then
24 # This will only remove masks created by d-s-h on package removal.
25 deb-systemd-helper unmask
'lxcfs.service' >/dev
/null || true
27 # was-enabled defaults to true, so new installations run enable.
28 if deb-systemd-helper
--quiet was-enabled
'lxcfs.service'; then
29 # Enables the unit on first installation, creates new
30 # symlinks on upgrades if the unit file has changed.
31 deb-systemd-helper
enable 'lxcfs.service' >/dev
/null || true
33 # Update the statefile to add new symlinks (if any), which need to be
34 # cleaned up on purge. Also remove old symlinks.
35 deb-systemd-helper update-state
'lxcfs.service' >/dev
/null || true
39 # dh_installsystemd cannot do a reload, you can only choose between stop-start,
40 # restart and try-restart. NONE of which are acceptable!