public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in dev-util/jenkins-bin/files: jenkins-bin.logrotate jenkins-bin.init2
@ 2014-10-21  8:38 Tony Vroon (chainsaw)
  0 siblings, 0 replies; only message in thread
From: Tony Vroon (chainsaw) @ 2014-10-21  8:38 UTC (permalink / raw
  To: gentoo-commits

chainsaw    14/10/21 08:38:20

  Added:                jenkins-bin.logrotate jenkins-bin.init2
  Log:
  Logrotate snippet as written by Travis Hansen in bug #526166. Stop attempting to create a /var/run directory structure, those sands have shifted. Enhance init script to create home directory if missing. Do not assign the jenkins user a shell as it is not needed, as per Agostino "ago" Sarubbo on #gentoo-dev. Remove older revision.
  
  (Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 0xB5058F9A)

Revision  Changes    Path
1.1                  dev-util/jenkins-bin/files/jenkins-bin.logrotate

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/jenkins-bin/files/jenkins-bin.logrotate?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/jenkins-bin/files/jenkins-bin.logrotate?rev=1.1&content-type=text/plain

Index: jenkins-bin.logrotate
===================================================================
/var/log/jenkins/jenkins.log /var/log/jenkins/access_log {
    compress
    dateext
    maxage 365
    rotate 99
    size=+4096k
    notifempty
    missingok
    create 644
    postrotate
        [ -r /etc/conf.d/jenkins ] && source /etc/conf.d/jenkins
        if [ -s /var/run/jenkins/jenkins.pid ]; then
            JPID=`cat /var/run/jenkins/jenkins.pid`
            test -n "`find /proc/$JPID -maxdepth 0 -user ${RUN_AS:-jenkins} 2>/dev/null`" && kill -s ALRM $JPID || :
        fi
    endscript
}



1.1                  dev-util/jenkins-bin/files/jenkins-bin.init2

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/jenkins-bin/files/jenkins-bin.init2?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-util/jenkins-bin/files/jenkins-bin.init2?rev=1.1&content-type=text/plain

Index: jenkins-bin.init2
===================================================================
#!/sbin/runscript

depend() {
    need net
    use dns logger mysql postgresql
}

checkconfig() {
    if [ ! -n "$JENKINS_HOME" ] ; then
        eerror "JENKINS_HOME not configured"
        return 1
    fi
    if [ ! -d "$JENKINS_HOME" ] ; then
        checkpath -q -d -o jenkins:jenkins -m 0755 "$JENKINS_HOME" || return 1
    fi
    return 0
}

start() {
    checkconfig || return 1

    JAVA_HOME=`java-config --jre-home`
    COMMAND=$JAVA_HOME/bin/java

    JAVA_PARAMS="$JENKINS_JAVA_OPTIONS -DJENKINS_HOME=$JENKINS_HOME -jar $JENKINS_WAR"

    # Don't use --daemon here, because in this case stop will not work
    PARAMS="--logfile=/var/log/jenkins/jenkins.log"
    [ -n "$JENKINS_PORT" ] && PARAMS="$PARAMS --httpPort=$JENKINS_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_ARGS" ] && PARAMS="$PARAMS $JENKINS_ARGS"

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

    ebegin "Starting ${SVCNAME}"
    start-stop-daemon --start --quiet --background \
        --make-pidfile --pidfile $JENKINS_PIDFILE \
        --user ${JENKINS_USER} \
        --exec "${COMMAND}" -- $JAVA_PARAMS $PARAMS
    eend $?
}

stop() {
    ebegin "Stopping ${SVCNAME}"
    start-stop-daemon --stop --quiet --pidfile $JENKINS_PIDFILE
    eend $?
}





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-10-21  8:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-21  8:38 [gentoo-commits] gentoo-x86 commit in dev-util/jenkins-bin/files: jenkins-bin.logrotate jenkins-bin.init2 Tony Vroon (chainsaw)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox