From 6dae8ad5e1b81fdb07e17955bb0f6bc077b3ca86 Mon Sep 17 00:00:00 2001 From: mathias Date: Tue, 6 Aug 2019 21:08:06 +0300 Subject: [PATCH] It works! --- bin/start | 2 +- script/alivecheck | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/start b/bin/start index b18c103..b15475c 100755 --- a/bin/start +++ b/bin/start @@ -15,7 +15,7 @@ tmux new -d -s server 'sh -x script/server' tmux new -d -s remote 'sh -x script/remote' tmux new -d -s schematics 'sh -x script/schematics' -#sleep 90 +sleep 30 tmux new -d -s alivecheck 'sh -x script/alivecheck' diff --git a/script/alivecheck b/script/alivecheck index 56dd431..d1de0ae 100755 --- a/script/alivecheck +++ b/script/alivecheck @@ -1,6 +1,6 @@ #!/bin/sh while true; do - sleep 12 + sleep 180 date="$(tail -1 $HOME/logs/latest.log | grep -oP '(?<=\[).*?(?=\])' | head -1 | date -f - +%s)" if [ "$(env printf '\xFE' | nc -w 5 localhost 25565 | wc -m)" -eq 1 ] || [ "$(( $(date +%s) - ${date:=$(date +%s)} ))" -gt 180 ]; then