mirror of
https://github.com/kaboomserver/buildpack.git
synced 2024-09-28 19:23:01 +00:00
Further improvements to alive checker
This commit is contained in:
parent
0dfa4a9b5b
commit
d7a44e2f7a
|
@ -16,7 +16,7 @@ while true; do
|
|||
|
||||
if [ "$(env printf '\xFE' | nc -w 15 play.kaboom.pw 25565 | wc -m)" -eq 0 ]; then
|
||||
pkill -9 java
|
||||
kill -9 `cat $AUTOSSH_PIDFILE`
|
||||
kill -9 $PROXY_PID
|
||||
echo $(date) >> kill.log
|
||||
fi
|
||||
#fi
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
# This is the core script that Heroku uses when booting up a dyno
|
||||
|
||||
PATH="$HOME/autossh/bin/:$HOME/dtach/bin/:$HOME/java/bin/:$PATH"
|
||||
export AUTOSSH_PIDFILE=$HOME/autossh.pid
|
||||
|
||||
# Set up SSH for proxy server and schematics repository
|
||||
# Load keys from environmental variables
|
||||
|
|
|
@ -7,14 +7,12 @@
|
|||
set -x
|
||||
|
||||
while true; do
|
||||
autossh -M 0 \
|
||||
-o "ServerAliveInterval 30" \
|
||||
-o "ServerAliveCountMax 3" \
|
||||
-i ~/.ssh/proxy \
|
||||
ssh -i ~/.ssh/proxy \
|
||||
-o StrictHostKeyChecking=no -o ExitOnForwardFailure=yes -o StreamLocalBindUnlink=yes \
|
||||
-c aes128-ctr \
|
||||
-C -S none -N -T -R \
|
||||
25565:localhost:25565 \
|
||||
remote@play.kaboom.pw
|
||||
export PROXY_PID=$!
|
||||
sleep 1
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue