summaryrefslogtreecommitdiffstats
path: root/hosts/jenkins
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2016-11-02 11:31:34 +0100
committerHolger Levsen <holger@layer-acht.org>2016-11-02 11:31:34 +0100
commit56dfb70b7c95376e4586ae054799b4db998a00d0 (patch)
tree68037a97ee2472f1793772f4cd9b52bb4bd8a1cb /hosts/jenkins
parentbb7929db6c2cd4d6bd5639bd029c98ff61fa70ee (diff)
downloadjenkins.debian.net-56dfb70b7c95376e4586ae054799b4db998a00d0.tar.xz
update to initscript from jenkins 2.19.2, keep our modifications to store HeapDumps
Diffstat (limited to 'hosts/jenkins')
-rwxr-xr-xhosts/jenkins/etc/init.d/jenkins20
1 files changed, 14 insertions, 6 deletions
diff --git a/hosts/jenkins/etc/init.d/jenkins b/hosts/jenkins/etc/init.d/jenkins
index 51783a81..47a783fd 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