From 8a1e1cf8633d9d6c48abbdb676a794227c51b860 Mon Sep 17 00:00:00 2001 From: "Vogt, Jonathan" Date: Wed, 2 Dec 2015 11:15:22 +0100 Subject: [PATCH] Fix problems with running node and hub on one system under Debian --- templates/init.d/debian.selenium.erb | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/templates/init.d/debian.selenium.erb b/templates/init.d/debian.selenium.erb index e5519ad..4ba5241 100644 --- a/templates/init.d/debian.selenium.erb +++ b/templates/init.d/debian.selenium.erb @@ -28,9 +28,6 @@ SELENIUM_LOG="${SELENIUM_INSTALL_ROOT}/log/${SELENIUM_LOG_NAME}_stdout.log" SELENIUM_ERROR_LOG="${SELENIUM_INSTALL_ROOT}/log/${SELENIUM_LOG_NAME}_stderr.log" SELENIUM_DISPLAY='<%= @display %>' SELENIUM_OPTIONS='<%= @options %>' -HTTP_PORT=4444 -SELENIUM_ARGS="-port $HTTP_PORT" -SELENIUM_JAVA='<%= @java %>' [ -r /etc/default/$NAME ] && . /etc/default/$NAME @@ -64,26 +61,6 @@ if [ `id -u` -ne 0 ]; then exit 1 fi -check_tcp_port() { - local service=$1 - local assigned=$2 - local default=$3 - - if [ -n "$assigned" ]; then - port=$assigned - else - port=$default - fi - - count=`netstat --listen --numeric-ports | grep \:$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" - return 1 - fi -} - # # Function that starts the daemon/service # @@ -98,9 +75,6 @@ do_start() # 2 if daemon could not be started $DAEMON $DAEMON_ARGS --running && return 1 - # Verify that the seleniumserver port is not already in use - check_tcp_port "http" "$HTTP_PORT" "4444" || return 1 - # --user in daemon doesn't prepare environment variables like HOME, USER, LOGNAME or USERNAME, # so we let su do so for us now $SU -l $SELENIUM_USER --shell=/bin/bash -c "$DAEMON $DAEMON_ARGS -- java -jar ${SELENIUM_JAR} ${SELENIUM_OPTIONS} > ${SELENIUM_LOG} 2> ${SELENIUM_ERROR_LOG}" || return 2