diff options
Diffstat (limited to 'autoscripts/postinst-systemd-restart')
-rw-r--r-- | autoscripts/postinst-systemd-restart | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/autoscripts/postinst-systemd-restart b/autoscripts/postinst-systemd-restart index 7d5b0da0..bf8c7d90 100644 --- a/autoscripts/postinst-systemd-restart +++ b/autoscripts/postinst-systemd-restart @@ -1,9 +1,11 @@ -if [ -d /run/systemd/system ]; then - systemctl --system daemon-reload >/dev/null || true - if [ -n "$2" ]; then - _dh_action=restart - else - _dh_action=start +if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then + if [ -d /run/systemd/system ]; then + systemctl --system daemon-reload >/dev/null || true + if [ -n "$2" ]; then + _dh_action=restart + else + _dh_action=start + fi + deb-systemd-invoke $_dh_action #UNITFILES# >/dev/null || true fi - deb-systemd-invoke $_dh_action #UNITFILES# >/dev/null || true fi |