[Qa-jenkins-scm] [jenkins.debian.net] 01/01: update to initscript from jenkins 2.19.2, keep our modifications to store HeapDumps

Holger Levsen holger at layer-acht.org
Wed Nov 2 10:31:45 UTC 2016


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 56dfb70b7c95376e4586ae054799b4db998a00d0
Author: Holger Levsen <holger at layer-acht.org>
Date:   Wed Nov 2 11:31:34 2016 +0100

    update to initscript from jenkins 2.19.2, keep our modifications to store HeapDumps
---
 hosts/jenkins/etc/init.d/jenkins | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/hosts/jenkins/etc/init.d/jenkins b/hosts/jenkins/etc/init.d/jenkins
index 51783a8..47a783f 100755
--- a/hosts/jenkins/etc/init.d/jenkins
+++ b/hosts/jenkins/etc/init.d/jenkins
@@ -71,18 +71,26 @@ check_tcp_port() {
     local service=$1
     local assigned=$2
     local default=$3
+    local assigned_address=$4
+    local default_address=$5
 
-    if [ -n "$assigned" ]; then 
+    if [ -n "$assigned" ]; then
         port=$assigned
     else
         port=$default
     fi
-    
-    count=`netstat --listen --numeric-ports | grep \:$port[[:space:]] | grep -c . `
+
+    if [ -n "$assigned_address" ]; then
+        address=$assigned_address
+    else
+        address=$default_address
+    fi
+
+    count=`netstat --listen --numeric-ports | grep $address\:$port[[:space:]] | grep -c . `
     
     if [ $count -ne 0 ]; then
-        echo "The selected $service port ($port) seems to be in use by another program "
-        echo "Please select another port to use for $NAME"
+        echo "The selected $service port ($port) on address $address seems to be in use by another program "
+        echo "Please select another address/port combination to use for $NAME"
         return 1
     fi
 }
@@ -108,7 +116,7 @@ do_start()
 
     # Verify that the jenkins port is not already in use, winstone does not exit
     # even for BindException
-    check_tcp_port "http" "$HTTP_PORT" "8080" || return 2
+    check_tcp_port "http" "$HTTP_PORT" "8080" "$HTTP_HOST" "0.0.0.0" || return 2
     
     # If the var MAXOPENFILES is enabled in /etc/default/jenkins then set the max open files to the 
     # proper value

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list