From e4f278928f547d60d58afcbaf0f3c7d8ddaae962 Mon Sep 17 00:00:00 2001 From: Jonathan Billings Date: Tue, 15 Jan 2013 14:03:06 -0500 Subject: Systemd: Fix server systemd unit * Run the daemon with -D /run/bcfg2-server.pid. If you don't run it with -D PID, it doesn't fork, and since the unit file is Type=forking, the service eventually times out and fails. * Use the PIDFile unit option to give systemd a hint where the PID file is located. This is recommended when using Type=forking by the systemd documentation. * Use $BCFG2_SERVER_OPTIONS, which is defined in /etc/sysconfig/bcfg2-server, instead of $OPTIONS, which is not. --- redhat/systemd/bcfg2-server.service | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'redhat') diff --git a/redhat/systemd/bcfg2-server.service b/redhat/systemd/bcfg2-server.service index 43788f215..ff0c52835 100644 --- a/redhat/systemd/bcfg2-server.service +++ b/redhat/systemd/bcfg2-server.service @@ -7,7 +7,8 @@ Type=forking StandardOutput=syslog StandardError=syslog EnvironmentFile=-/etc/sysconfig/bcfg2-server -ExecStart=/usr/sbin/bcfg2-server $OPTIONS +PIDFile=/run/bcfg2-server.pid +ExecStart=/usr/sbin/bcfg2-server -D /run/bcfg2-server.pid $BCFG2_SERVER_OPTIONS [Install] WantedBy=multi-user.target -- cgit v1.2.3-1-g7c22