Skip to content

Commit

Permalink
Merge pull request #308 from iammattcoleman/monitor.pid-not-found
Browse files Browse the repository at this point in the history
suppress error when crash detection is not used
  • Loading branch information
sandain authored Feb 14, 2022
2 parents 039051f + 7f8b265 commit 8118d10
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion msctl
Original file line number Diff line number Diff line change
Expand Up @@ -1337,9 +1337,13 @@ stopServerMonitor() {
local WORLD_DIR MONITOR_LOG MONITOR_PID MONITOR_LOCK_FILE ACQUIRED_LOCK
WORLD_DIR="$WORLDS_LOCATION/$1"
MONITOR_LOG="$WORLD_DIR/logs/mscs.monitor.log"
MONITOR_PID=$(cat "$WORLD_DIR/monitor.pid")
MONITOR_LOCK_FILE="$WORLD_DIR/monitor.lock"
# Check if server monitor instance currently running.
MONITOR_PID_PATH="$WORLD_DIR/monitor.pid"
if [ ! -f "$MONITOR_PID_PATH" ]; then
return
fi
MONITOR_PID=$(cat "$MONITOR_PID_PATH")
(
$FLOCK -n 9
ACQUIRED_LOCK=$?
Expand Down

0 comments on commit 8118d10

Please sign in to comment.