-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #633 from Kegeruneku/bug_5653/int/5653_fix_jetty_i…
…nit_ouputting_wrong_failed_messages Fixes #5653: Prevent the rudder-jetty init script from outputting false ...
- Loading branch information
Showing
3 changed files
with
71 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
rudder-jetty/SOURCES/jetty-init-prevent-false-failed-starts.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
--- jetty7/bin/jetty.sh 2015-03-31 12:08:37.319515629 +0200 | ||
+++ jetty7/bin/jetty.sh 2015-03-31 12:12:16.660886179 +0200 | ||
@@ -117,10 +117,10 @@ | ||
do | ||
sleep 4 | ||
[ -z "$(grep STARTED $1 2>/dev/null)" ] || return 0 | ||
+ | ||
[ -z "$(grep STOPPED $1 2>/dev/null)" ] || return 1 | ||
[ -z "$(grep FAILED $1 2>/dev/null)" ] || return 1 | ||
- local PID=$(cat "$2" 2>/dev/null) || return 1 | ||
- kill -0 "$PID" 2>/dev/null || return 1 | ||
+ | ||
echo -n ". " | ||
done | ||
|
||
@@ -358,8 +358,8 @@ | ||
then | ||
JETTY_STATE=$JETTY_HOME/jetty.state | ||
fi | ||
+ | ||
JAVA_OPTIONS+=("-Djetty.state=$JETTY_STATE") | ||
-rm -f $JETTY_STATE | ||
|
||
################################################## | ||
# Set default JVM parameters, to be | ||
@@ -487,7 +487,15 @@ | ||
exit | ||
fi | ||
|
||
- if [ $UID -eq 0 ] && type start-stop-daemon > /dev/null 2>&1 | ||
+ if [ $(ps aux|grep -cE "[j]ava .* /opt/rudder/jetty7/start.jar") -ne 0 ] | ||
+ then | ||
+ echo "already running." | ||
+ exit 0 | ||
+ fi | ||
+ | ||
+ rm -f ${JETTY_STATE} | ||
+ | ||
+ if [ $UID -eq 0 ] && type start-stop-daemon > /dev/null 2>&1 | ||
then | ||
unset CH_USER | ||
if [ -n "$JETTY_USER" ] | ||
@@ -561,7 +569,9 @@ | ||
sleep 1 | ||
done | ||
|
||
+ rm -f ${JETTY_STATE} | ||
rm -f "$JETTY_PID" | ||
+ | ||
echo OK | ||
else | ||
PID=$(cat "$JETTY_PID" 2>/dev/null) | ||
@@ -580,7 +590,9 @@ | ||
sleep 1 | ||
done | ||
|
||
+ rm -f ${JETTY_STATE} | ||
rm -f "$JETTY_PID" | ||
+ | ||
echo OK | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters