summaryrefslogtreecommitdiffstats
path: root/redhat
diff options
context:
space:
mode:
Diffstat (limited to 'redhat')
-rwxr-xr-xredhat/scripts/bcfg2-server.init8
-rw-r--r--redhat/systemd/bcfg2.service3
2 files changed, 9 insertions, 2 deletions
diff --git a/redhat/scripts/bcfg2-server.init b/redhat/scripts/bcfg2-server.init
index c4412d1c3..7fd1bd906 100755
--- a/redhat/scripts/bcfg2-server.init
+++ b/redhat/scripts/bcfg2-server.init
@@ -49,7 +49,13 @@ start () {
stop () {
echo -n $"Stopping $prog: "
- killproc ${prog} && success || failure
+ # we do NOT want to specify the pidfile to killproc; if we do, and
+ # it has to kill -9 the server, it only kills the master and the
+ # child processes stay running (if the multiprocessing core is in
+ # use). By not specifying a pidfile, it looks in the process
+ # table for all bcfg2-server processes, and kill -9's them all if
+ # necessary.
+ killproc -d 30 ${prog} && success || failure
RETVAL=$?
echo
rm -f /var/lock/subsys/$prog
diff --git a/redhat/systemd/bcfg2.service b/redhat/systemd/bcfg2.service
index 6cbad2e5a..245c80cce 100644
--- a/redhat/systemd/bcfg2.service
+++ b/redhat/systemd/bcfg2.service
@@ -3,11 +3,12 @@ Description=Bcfg2 configuration client
After=syslog.target network.target
[Service]
-Type=forking
+Type=oneshot
StandardOutput=syslog
StandardError=syslog
EnvironmentFile=-/etc/sysconfig/bcfg2
ExecStart=/usr/sbin/bcfg2 $BCFG2_OPTIONS
+RemainAfterExit=yes
[Install]
WantedBy=multi-user.target