summaryrefslogtreecommitdiff
path: root/scripts/dm_event_systemd_red_hat.service.in
diff options
context:
space:
mode:
authorPeter Rajnoha <prajnoha@redhat.com>2014-02-03 16:07:06 +0100
committerPeter Rajnoha <prajnoha@redhat.com>2014-02-06 17:15:19 +0100
commit8a8abc5ed9358f45b127927a20f844a7ef122466 (patch)
treea9c67e9d96994e3cc96fe0719998692918dd7175 /scripts/dm_event_systemd_red_hat.service.in
parent36f9fadcb4be4091ba5fd505016d79a91037b19d (diff)
downloadlvm2-8a8abc5ed9358f45b127927a20f844a7ef122466.tar.gz
dmeventd: fix dmeventd -R to work properly with systemd
Trying to restart dmeventd as a reload action is causing problems under systemd environment. The systemd loses track of new dmeventd this way. See also https://bugzilla.redhat.com/show_bug.cgi?id=1060134 for more info. We need to call dmeventd -R directly instead of "systemctl reload dm-event.service" that was used before (the reload is aimed at configuration reload anyway, not stateful restart of the daemon - we did this before just because there's no ExecRestart in systemd and there's only ExecStart and ExecStop with which we'd lose the state). Also, use ExecStart="dmeventd -f" to run dmeventd in foreground (and let's rely on systemd to daemonize it) and change the service type from "forking" to "simple".
Diffstat (limited to 'scripts/dm_event_systemd_red_hat.service.in')
-rw-r--r--scripts/dm_event_systemd_red_hat.service.in5
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/dm_event_systemd_red_hat.service.in b/scripts/dm_event_systemd_red_hat.service.in
index 96c522561..379161866 100644
--- a/scripts/dm_event_systemd_red_hat.service.in
+++ b/scripts/dm_event_systemd_red_hat.service.in
@@ -7,9 +7,8 @@ Before=local-fs.target
DefaultDependencies=no
[Service]
-Type=forking
-ExecStart=@sbindir@/dmeventd
-ExecReload=@sbindir@/dmeventd -R
+Type=simple
+ExecStart=@sbindir@/dmeventd -f
Environment=SD_ACTIVATION=1
PIDFile=@DMEVENTD_PIDFILE@
OOMScoreAdjust=-1000