File jenkins.sh of Package jenkins

#!/bin/sh
#
#     SUSE system statup script for Jenkins
#     Copyright (C) 2007 Pascal Bleser
#     Copyright (C) 2013 SUSE Linux Products GmbH
#
#     This library is free software; you can redistribute it and/or modify it
#     under the terms of the GNU Lesser General Public License as published by
#     the Free Software Foundation; either version 2.1 of the License, or (at
#     your option) any later version.
#
#     This library is distributed in the hope that it will be useful, but
#     WITHOUT ANY WARRANTY; without even the implied warranty of
#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#     Lesser General Public License for more details.
#
#     You should have received a copy of the GNU Lesser General Public
#     License along with this library; if not, write to the Free Software
#     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301,
#     USA
#
JENKINS_WAR="@LIBEXECDIR@/jenkins/jenkins.war"
JENKINS_CONFIG=/etc/sysconfig/jenkins
JENKINS_HOME="/var/lib/jenkins"
JENKINS_LOG_DIR="/var/log/jenkins"

# Read config
. "$JENKINS_CONFIG"

JAVA_CMD="/usr/bin/java $JENKINS_JAVA_OPTIONS -DJENKINS_HOME=$JENKINS_HOME -jar $JENKINS_WAR"
PARAMS="--logfile=$JENKINS_LOG_DIR/jenkins.log"
[ -n "$JENKINS_HOST" ] && PARAMS="$PARAMS --httpListenAddress=$JENKINS_HOST"
[ -n "$JENKINS_PORT" ] && PARAMS="$PARAMS --httpPort=$JENKINS_PORT"
[ -n "$JENKINS_HTTPS_HOST" ] && PARAMS="$PARAMS --httpsListenAddress=$JENKINS_HTTPS_HOST"
[ -n "$JENKINS_HTTPS_PORT" ] && PARAMS="$PARAMS --httpsPort=$JENKINS_HTTPS_PORT"
[ -n "$JENKINS_DEBUG_LEVEL" ] && PARAMS="$PARAMS --debug=$JENKINS_DEBUG_LEVEL"
[ -n "$JENKINS_HANDLER_STARTUP" ] && PARAMS="$PARAMS --handlerCountStartup=$JENKINS_HANDLER_STARTUP"
[ -n "$JENKINS_HANDLER_MAX" ] && PARAMS="$PARAMS --handlerCountMax=$JENKINS_HANDLER_MAX"
[ -n "$JENKINS_HANDLER_IDLE" ] && PARAMS="$PARAMS --handlerCountMaxIdle=$JENKINS_HANDLER_IDLE"
[ -n "$JENKINS_PREFIX" ] && PARAMS="$PARAMS --prefix=$JENKINS_PREFIX"

if [ "$JENKINS_ENABLE_ACCESS_LOG" = "yes" ]; then
    PARAMS="$PARAMS --accessLoggerClassName=winstone.accesslog.SimpleAccessLogger --simpleAccessLogger.format=combined --simpleAccessLogger.file=$JENKINS_LOG_DIR/access.log"
fi

ulimit -e "$JENKINS_NICE"
[ -n "$JENKINS_ULIMIT" ] && ulimit -n "$JENKINS_ULIMIT"

$JAVA_CMD $PARAMS
openSUSE Build Service is sponsored by