Skip to content
Permalink
Browse files
[FIXED JENKINS-5020] OpenSUSE init script fix.
  • Loading branch information
kohsuke committed Feb 11, 2011
1 parent 24eb579 commit 0c1966657f3e5b932bec88e59274aed448bddce7
Showing with 6 additions and 25 deletions.
  1. +3 −0 changelog.html
  2. +3 −25 opensuse/SOURCES/jenkins.init.in
@@ -67,6 +67,9 @@
<li class=bug>
Maven deployment with uniqueVersion == true creating "new" versions for attached artifacts
(<a href="http://issues.jenkins-ci.org/browse/JENKINS-8651">issue 8651</a>)
<li class=bug>
Fixed a bug in the OpenSUSE startup script
(<a href="http://issues.jenkins-ci.org/browse/JENKINS-5020">issue 5020</a>)
</ul>
</div><!--=TRUNK-END=-->

@@ -91,35 +91,13 @@ fi
case "$1" in
start)
echo -n "Starting Jenkins "
if /sbin/startproc -l /var/log/jenkins.rc -u "$JENKINS_USER" -p "$JENKINS_PID_FILE" $JAVA_CMD $PARAMS; then
rc_status
# get own session ID
MY_SESSION_ID=`/bin/ps h -o sess -p $$`
# get PID
/bin/ps hww -u hudson -o sess,pid,cmd | grep java | grep -i jenkins | \
while read sess pid cmd; do [ "$sess" = $MY_SESSION_ID ] && echo $pid; done | \
head -1 > "$JENKINS_PID_FILE"
else
rc_failed 1
fi
JPID=`/sbin/startproc -v -s -l /var/log/jenkins.rc -u "$JENKINS_USER" -p "$JENKINS_PID_FILE" $JAVA_CMD $PARAMS`
rc_status -v
[ -s "$JENKINS_PID_FILE" ] || echo $JPID >"$JENKINS_PID_FILE"
;;
stop)
echo -n "Shutting down Jenkins "
PID=`cat "$JENKINS_PID_FILE" 2>/dev/null`
if [ -n "$PID" ]; then
if /bin/kill -0 "$PID"; then
# process exists
/bin/kill -INT "$PID"
rc=$?
[ "$rc" = "0" ] && /bin/rm -f "$JENKINS_PID_FILE"
rc_failed "$rc"
else
rc_failed 7
fi
else
rc_failed 1
fi
/sbin/killproc -p "$JENKINS_PID_FILE" $JAVA_HOME/bin/java
rc_status -v
;;
try-restart|condrestart)

0 comments on commit 0c19666

Please sign in to comment.