Skip to content

Commit

Permalink
Issue #10904 Reorder pid and state file checks
Browse files Browse the repository at this point in the history
  • Loading branch information
joakime committed Jul 23, 2024
1 parent 58d651a commit 71c80e0
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions jetty-home/src/main/resources/bin/jetty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -593,6 +593,18 @@ case "$ACTION" in

testFileSystemPermissions

if running $JETTY_PID
then
echo "Already Running $(cat $JETTY_PID)!"
exit 1
fi

# remove any lingering state file
if [ -f $JETTY_STATE ]
then
rm $JETTY_STATE
fi

echo -n "Starting Jetty: "

# Startup from a service file
Expand All @@ -616,13 +628,6 @@ case "$ACTION" in
--
(( DEBUG )) && echo "Starting: start-stop-daemon"
else

if running $JETTY_PID
then
echo "Already Running $(cat $JETTY_PID)!"
exit 1
fi

# Startup if switching users (not as a service, or from root)
if [ -n "$JETTY_USER" ] && [ `whoami` != "$JETTY_USER" ]
then
Expand Down

0 comments on commit 71c80e0

Please sign in to comment.