summaryrefslogtreecommitdiff
path: root/autoscripts
diff options
context:
space:
mode:
authorFelipe Sateler <fsateler@debian.org>2016-10-22 20:49:12 -0300
committerNiels Thykier <niels@thykier.net>2016-12-15 07:17:59 +0000
commit43c01e83a51bcfc31480f0ba955dcb25c4181eae (patch)
tree4ef538a03115756b2c799677eccc086476cdacea /autoscripts
parentad4f021fd47d29db2216e02eb033788687ee8b63 (diff)
downloaddebhelper-43c01e83a51bcfc31480f0ba955dcb25c4181eae.tar.gz
systemd_start: do not start when --no-start and --restart-after-upgrade are combined
But do restart on upgrades Signed-off-by: Niels Thykier <niels@thykier.net>
Diffstat (limited to 'autoscripts')
-rw-r--r--autoscripts/postinst-systemd-restartnostart6
1 files changed, 6 insertions, 0 deletions
diff --git a/autoscripts/postinst-systemd-restartnostart b/autoscripts/postinst-systemd-restartnostart
new file mode 100644
index 00000000..eb52e273
--- /dev/null
+++ b/autoscripts/postinst-systemd-restartnostart
@@ -0,0 +1,6 @@
+if [ -d /run/systemd/system ]; then
+ systemctl --system daemon-reload >/dev/null || true
+ if [ -n "$2" ]; then
+ deb-systemd-invoke try-restart #UNITFILES# >/dev/null || true
+ fi
+fi