From c5b686d4da5311fee33c1401aa40fba3c612a53c Mon Sep 17 00:00:00 2001 From: mathiascode Date: Tue, 11 Feb 2020 00:15:38 +0200 Subject: [PATCH] Wrap proxy in infinite loop --- script/init.sh | 6 +++--- script/proxy.sh | 15 +++++++++------ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/script/init.sh b/script/init.sh index 013f883..c8b881e 100755 --- a/script/init.sh +++ b/script/init.sh @@ -17,9 +17,9 @@ ssh-keyscan github.com >> .ssh/known_hosts # checker in the background while true; do - dtach -n server script/server.sh - dtach -n proxy script/proxy.sh - dtach -n schematics script/schematics.sh + dtach -n server script/server.sh > /dev/null 2>&1 + dtach -n proxy script/proxy.sh > /dev/null 2>&1 + dtach -n schematics script/schematics.sh > /dev/null 2>&1 sleep 5 done & diff --git a/script/proxy.sh b/script/proxy.sh index 1685395..84513b5 100755 --- a/script/proxy.sh +++ b/script/proxy.sh @@ -6,9 +6,12 @@ set -x -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 +while true; do + 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 + sleep 1 +done