summaryrefslogtreecommitdiffstats
path: root/redhat
diff options
context:
space:
mode:
authorJonathan Billings <jsbillin@umich.edu>2013-01-15 14:03:06 -0500
committerJonathan Billings <jsbillin@umich.edu>2013-01-15 14:03:06 -0500
commite4f278928f547d60d58afcbaf0f3c7d8ddaae962 (patch)
treedf7d3aab3749169f977fff6d84a606428342a303 /redhat
parent029ff311c5560ac7231c6852d872b951aad9b0e6 (diff)
downloadbcfg2-e4f278928f547d60d58afcbaf0f3c7d8ddaae962.tar.gz
bcfg2-e4f278928f547d60d58afcbaf0f3c7d8ddaae962.tar.bz2
bcfg2-e4f278928f547d60d58afcbaf0f3c7d8ddaae962.zip
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.
Diffstat (limited to 'redhat')
-rw-r--r--redhat/systemd/bcfg2-server.service3
1 files changed, 2 insertions, 1 deletions
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