Skip to content

Commit

Permalink
Removed write to /var/log/knocked-source during autopause resume (#2749)
Browse files Browse the repository at this point in the history
  • Loading branch information
itzg authored Mar 31, 2024
1 parent a46a506 commit 00e04fc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
6 changes: 1 addition & 5 deletions files/auto/autopause-daemon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,7 @@ do
STATE=E
else
TIME_THRESH=$(($(current_uptime)+$AUTOPAUSE_TIMEOUT_KN))
from=unknown
if [ -e /var/log/knocked-source ]; then
from=$(cat /var/log/knocked-source)
fi
logAutopause "Server was knocked from $from - waiting for clients or timeout"
logAutopause "Server was knocked - waiting for clients or timeout"
STATE=K
fi
fi
Expand Down
2 changes: 0 additions & 2 deletions files/auto/resume.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ if isTrue "${DEBUG_AUTOPAUSE}"; then
fi

if [[ $( ps -ax -o stat,comm | grep 'java' | awk '{ print $1 }') =~ ^T.*$ ]] ; then
logAutopauseAction "Knocked from $1, resuming Java process"
echo "$1" > /var/log/knocked-source
pkill -CONT java

# remove .paused file from data directory
Expand Down

0 comments on commit 00e04fc

Please sign in to comment.