Skip to content

Commit 7e08514

Browse files
committed
Execute systemd stuff if ran by systemd
Signed-off-by: Amin Vakil <[email protected]>
1 parent 9afae98 commit 7e08514

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

cpack/debian/postinst.in

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#!/bin/sh
22
set -e
33
@LDCONFIG_POSTINST_CMDS@
4-
if [ "$1" = "configure" ]; then
5-
systemctl --system daemon-reload >/dev/null || true
6-
systemctl try-restart @[email protected] >/dev/null || true
4+
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
5+
if [ -d /run/systemd/system ]; then
6+
systemctl --system daemon-reload >/dev/null || true
7+
systemctl try-restart @[email protected] >/dev/null || true
8+
fi
79
fi

0 commit comments

Comments
 (0)