This commit is contained in:
mathiascode 2019-11-30 18:18:45 +02:00
parent 0916ed5ef6
commit af97487c0a
3 changed files with 11 additions and 12 deletions

View file

@ -7,7 +7,7 @@ chmod 600 .ssh/remote
ssh-keyscan github.com >> .ssh/known_hosts
chmod -R 500 plugins/bStats/ plugins/PluginMetrics/ plugins/ProtocolLib/
chmod -R 500 plugins/bStats/ plugins/PluginMetrics/
git clone git@github.com:kaboomserver/schematics.git plugins/FastAsyncWorldEdit/schematics/

View file

@ -2,15 +2,10 @@
while true; do
sleep 420
logfile=$HOME/logs/latest.log
if [ "$(env printf '\xFE' | nc -w 5 localhost 25565 | wc -m)" -eq 0 ]; then
if [ -f "$logfile" ]; then
if [ "$(tail -20 $logfile | grep -c 'ERROR]: Requested chunk')" -eq 1 ]; then
rm -rf $HOME/worlds/
fi
fi
pkill -9 java
elif [ -f "$logfile" ]; then
if [ "$(( $(date +%s) - $(date -r $logfile +%s) ))" -gt 180 ]; then
if [ -f "$logfile" ]; then
if [ "$(env printf '\xFE' | nc -w 5 localhost 25565 | wc -m)" -eq 0 ] ||
[ "$(( $(date +%s) - $(date -r $logfile +%s) ))" -gt 180 ]; then
if [ "$(tail -20 $logfile | grep -c 'ERROR]: Requested chunk')" -eq 1 ]; then
rm -rf $HOME/worlds/
fi

View file

@ -1,3 +1,7 @@
#!/bin/sh
#export AUTOSSH_POLL=30
ssh -i ~/.ssh/remote -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
ssh -i ~/.ssh/remote \
-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