We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 039051f + 7f8b265 commit 8118d10Copy full SHA for 8118d10
1 file changed
msctl
@@ -1337,9 +1337,13 @@ stopServerMonitor() {
1337
local WORLD_DIR MONITOR_LOG MONITOR_PID MONITOR_LOCK_FILE ACQUIRED_LOCK
1338
WORLD_DIR="$WORLDS_LOCATION/$1"
1339
MONITOR_LOG="$WORLD_DIR/logs/mscs.monitor.log"
1340
- MONITOR_PID=$(cat "$WORLD_DIR/monitor.pid")
1341
MONITOR_LOCK_FILE="$WORLD_DIR/monitor.lock"
1342
# Check if server monitor instance currently running.
+ MONITOR_PID_PATH="$WORLD_DIR/monitor.pid"
1343
+ if [ ! -f "$MONITOR_PID_PATH" ]; then
1344
+ return
1345
+ fi
1346
+ MONITOR_PID=$(cat "$MONITOR_PID_PATH")
1347
(
1348
$FLOCK -n 9
1349
ACQUIRED_LOCK=$?
0 commit comments