Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jetty-distribution/src/main/resources/bin/jetty.sh')
-rwxr-xr-xjetty-distribution/src/main/resources/bin/jetty.sh13
1 files changed, 7 insertions, 6 deletions
diff --git a/jetty-distribution/src/main/resources/bin/jetty.sh b/jetty-distribution/src/main/resources/bin/jetty.sh
index da6f571a6e..9dd1a49773 100755
--- a/jetty-distribution/src/main/resources/bin/jetty.sh
+++ b/jetty-distribution/src/main/resources/bin/jetty.sh
@@ -69,7 +69,7 @@ NAME=$(echo $(basename $0) | sed -e 's/^[SK][0-9]*//' -e 's/\.sh$//')
# JETTY_ARGS
# The default arguments to pass to jetty.
# For example
-# JETTY_ARGS=jetty.port=8080 jetty.spdy.port=8443 jetty.secure.port=443
+# JETTY_ARGS=jetty.http.port=8080 jetty.ssl.port=8443
#
# JETTY_USER
# if set, then used as a username to run the server as
@@ -166,7 +166,7 @@ then
ETC=$HOME/etc
fi
-for CONFIG in $ETC/default/${NAME}{,9} $HOME/.${NAME}rc; do
+for CONFIG in {/etc,~/etc}/default/${NAME}{,9} $HOME/.${NAME}rc; do
if [ -f "$CONFIG" ] ; then
readConfig "$CONFIG"
fi
@@ -350,7 +350,7 @@ then
CYGWIN*) JETTY_LOGS="`cygpath -w $JETTY_LOGS`";;
esac
- JAVA_OPTIONS=(${JAVA_OPTIONS[*]} "-Djetty.logs=$JETTY_LOGS")
+ JAVA_OPTIONS=(${JAVA_OPTIONS[*]} "-Djetty.logging.dir=$JETTY_LOGS")
fi
#####################################################
@@ -445,7 +445,7 @@ case "$ACTION" in
exit 1
fi
- if [ -n "$JETTY_USER" ]
+ if [ -n "$JETTY_USER" ] && [ `whoami` != "$JETTY_USER" ]
then
unset SU_SHELL
if [ "$JETTY_SHELL" ]
@@ -457,11 +457,11 @@ case "$ACTION" in
chown "$JETTY_USER" "$JETTY_PID"
# FIXME: Broken solution: wordsplitting, pathname expansion, arbitrary command execution, etc.
su - "$JETTY_USER" $SU_SHELL -c "
- exec ${RUN_CMD[*]} start-log-file="$JETTY_LOGS/start.log" &
+ exec ${RUN_CMD[*]} start-log-file="$JETTY_LOGS/start.log" > /dev/null &
disown \$!
echo \$! > '$JETTY_PID'"
else
- "${RUN_CMD[@]}" &
+ "${RUN_CMD[@]}" > /dev/null &
disown $!
echo $! > "$JETTY_PID"
fi
@@ -527,6 +527,7 @@ case "$ACTION" in
restart)
JETTY_SH=$0
+ > "$JETTY_STATE"
if [ ! -f $JETTY_SH ]; then
if [ ! -f $JETTY_HOME/bin/jetty.sh ]; then
echo "$JETTY_HOME/bin/jetty.sh does not exist."

Back to the top