summaryrefslogtreecommitdiff
path: root/autoscripts/postinst-init-restart
diff options
context:
space:
mode:
Diffstat (limited to 'autoscripts/postinst-init-restart')
-rw-r--r--autoscripts/postinst-init-restart6
1 files changed, 6 insertions, 0 deletions
diff --git a/autoscripts/postinst-init-restart b/autoscripts/postinst-init-restart
index 35bba20..862f9cc 100644
--- a/autoscripts/postinst-init-restart
+++ b/autoscripts/postinst-init-restart
@@ -1,4 +1,10 @@
if [ -x "/etc/init.d/#SCRIPT#" ]; then
+ # In case this system is running systemd, we need to ensure that all
+ # necessary tmpfiles (if any) are created before starting.
+ if [ -d /sys/fs/cgroup/systemd ] ; then
+ systemd-tmpfiles --create >/dev/null || true
+ fi
+
update-rc.d #SCRIPT# #INITPARMS# >/dev/null
if [ -n "$2" ]; then
_dh_action=restart