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