Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

puppet: Skip systemd daemon-reload when systemd is not booted.

Alex Vandiverdbe4330fda51
diff --git a/puppet/zulip/manifests/systemd_daemon_reload.pp b/puppet/zulip/manifests/systemd_daemon_reload.pp
index d6a18707883..2861937fc78 100644
--- a/puppet/zulip/manifests/systemd_daemon_reload.pp
+++ b/puppet/zulip/manifests/systemd_daemon_reload.pp
@@ -1,6 +1,9 @@
class zulip::systemd_daemon_reload {
exec { 'reload systemd':
- command => 'sh -c "! command -v systemctl > /dev/null || systemctl daemon-reload"',
+ # /run/systemd/system only exists if systemd is the running init
+ # system (see sd_booted(3)), as opposed to merely installed, as may
+ # be the case in containers.
+ command => 'sh -c "! test -d /run/systemd/system || systemctl daemon-reload"',
refreshonly => true,
}
}