[Lsb-messages] /var/www/bzr/lsb/devel/puppet-lsb r704: Fix systemd interaction problem with the buildbot init script.

Jeff Licquia licquia at linuxfoundation.org
Wed May 3 14:06:24 UTC 2017


------------------------------------------------------------
revno: 704
committer: Jeff Licquia <licquia at linuxfoundation.org
branch nick: puppet-lsb
timestamp: Wed 2017-05-03 10:06:24 -0400
message:
  Fix systemd interaction problem with the buildbot init script.
modified:
  modules/buildbot/files/buildbot.init
-------------- next part --------------
=== modified file 'modules/buildbot/files/buildbot.init'
--- a/modules/buildbot/files/buildbot.init	2013-01-24 00:00:15 +0000
+++ b/modules/buildbot/files/buildbot.init	2017-05-03 14:06:24 +0000
@@ -14,13 +14,20 @@
 PRG=buildbot
 DAEMON=/opt/buildbot/bin/$PRG
 USER=buildbot
+MASTERDIR=/opt/buildbot/lsb-master
 
 test -x $DAEMON || exit 0
 
+if [ -e $MASTERDIR/twistd.pid ]; then
+    if [ -d /proc/$(cat $MASTERDIR/twistd.pid) ]; then
+        exit 0
+    fi
+fi
+
 case "$1" in
   start)
     echo -n "Checking configuration for $PRG: "
-    /bin/su -c "$DAEMON checkconfig /opt/buildbot/lsb-master >> /tmp/buildbot-start.log 2>&1" $USER
+    /bin/su -c "$DAEMON checkconfig $MASTERDIR >> /tmp/buildbot-start.log 2>&1" $USER
     if [ $? -eq 0 ]; then
         echo "done"
     else
@@ -28,13 +35,13 @@
         exit 1
     fi
     echo -n "Starting $PRG: "
-    /bin/su -c "$DAEMON start /opt/buildbot/lsb-master 2>>/tmp/buildbot-start.log >/dev/null" $USER
+    /bin/su -c "$DAEMON start $MASTERDIR 2>>/tmp/buildbot-start.log >/dev/null" $USER
     RETVAL=$?
     echo "done"
     ;;
   stop)
     echo -n "Stopping $PRG: "
-    /bin/su -c "$DAEMON stop /opt/buildbot/lsb-master >> /tmp/buildbot-start.log 2>&1" $USER
+    /bin/su -c "$DAEMON stop $MASTERDIR >> /tmp/buildbot-start.log 2>&1" $USER
     RETVAL=$?
     echo "done"
     ;;



More information about the lsb-messages mailing list