Merge remote-tracking branch 'origin/jetty-8'
This commit is contained in:
commit
662de165a4
|
@ -106,7 +106,7 @@ findDirectory()
|
||||||
|
|
||||||
running()
|
running()
|
||||||
{
|
{
|
||||||
local PID=$(head -n 1 "$1" 2>/dev/null) || return 1
|
local PID=$(cat "$1" 2>/dev/null) || return 1
|
||||||
kill -0 "$PID" 2>/dev/null
|
kill -0 "$PID" 2>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ started()
|
||||||
[ -z "$(grep STARTED $1)" ] || return 0
|
[ -z "$(grep STARTED $1)" ] || return 0
|
||||||
[ -z "$(grep STOPPED $1)" ] || return 1
|
[ -z "$(grep STOPPED $1)" ] || return 1
|
||||||
[ -z "$(grep FAILED $1)" ] || return 1
|
[ -z "$(grep FAILED $1)" ] || return 1
|
||||||
local PID=$(head -n 1 "$1" 2>/dev/null) || return 1
|
local PID=$(cat "$2" 2>/dev/null) || return 1
|
||||||
kill -0 "$PID" 2>/dev/null || return 1
|
kill -0 "$PID" 2>/dev/null || return 1
|
||||||
echo -n ". "
|
echo -n ". "
|
||||||
done
|
done
|
||||||
|
@ -342,7 +342,9 @@ if [ -z "$JETTY_PID" ]
|
||||||
then
|
then
|
||||||
JETTY_PID="$JETTY_RUN/jetty.pid"
|
JETTY_PID="$JETTY_RUN/jetty.pid"
|
||||||
fi
|
fi
|
||||||
JAVA_OPTIONS+=("-Djetty.pid=$JETTY_PID")
|
JETTY_STATE=$(dirname $JETTY_PID)/jetty.state
|
||||||
|
JAVA_OPTIONS+=("-Djetty.state=$JETTY_STATE")
|
||||||
|
rm -f $JETTY_STATE
|
||||||
|
|
||||||
##################################################
|
##################################################
|
||||||
# Setup JAVA if unset
|
# Setup JAVA if unset
|
||||||
|
@ -473,12 +475,16 @@ case "$ACTION" in
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if started "$JETTY_PID"
|
if expr "${CONFIGS[*]}" : '.*etc/jetty-started.xml.*' >/dev/null
|
||||||
|
then
|
||||||
|
if started "$JETTY_STATE" "$JETTY_PID"
|
||||||
then
|
then
|
||||||
echo "OK `date`"
|
echo "OK `date`"
|
||||||
else
|
else
|
||||||
echo "FAILED `date`"
|
echo "FAILED `date`"
|
||||||
exit 1
|
fi
|
||||||
|
else
|
||||||
|
echo "ok `date`"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
;;
|
;;
|
||||||
|
@ -500,7 +506,7 @@ case "$ACTION" in
|
||||||
rm -f "$JETTY_PID"
|
rm -f "$JETTY_PID"
|
||||||
echo OK
|
echo OK
|
||||||
else
|
else
|
||||||
PID=$(head -n 1 "$JETTY_PID" 2>/dev/null)
|
PID=$(cat "$JETTY_PID" 2>/dev/null)
|
||||||
kill "$PID" 2>/dev/null
|
kill "$PID" 2>/dev/null
|
||||||
|
|
||||||
TIMEOUT=30
|
TIMEOUT=30
|
||||||
|
|
Loading…
Reference in New Issue