mirror of
https://github.com/kaboomserver/buildpack.git
synced 2025-08-05 20:02:52 +00:00
Move watchdog away from tmux
This commit is contained in:
parent
00a14f814b
commit
16eabb36c1
1 changed files with 7 additions and 10 deletions
17
bin/start
17
bin/start
|
@ -19,16 +19,6 @@ done'
|
||||||
|
|
||||||
sleep 60
|
sleep 60
|
||||||
|
|
||||||
.bin/tmux new -d -s watchdog 'while true; do
|
|
||||||
sleep 120
|
|
||||||
if [ "$(echo -n -e '\xFE' | nc -w 1 localhost 25565 | wc -m)" -eq 0 ]; then
|
|
||||||
echo -n -e '\xFE' | nc -w 1 localhost 25565 | wc -m
|
|
||||||
kill -9 $(pgrep java)
|
|
||||||
echo "killed"
|
|
||||||
echo -n -e '\xFE' | nc -w 1 localhost 25565 | wc -m
|
|
||||||
fi
|
|
||||||
done'
|
|
||||||
|
|
||||||
.bin/tmux new -d -s schematics 'while true; do
|
.bin/tmux new -d -s schematics 'while true; do
|
||||||
cd $HOME/plugins/WorldEdit/schematics/
|
cd $HOME/plugins/WorldEdit/schematics/
|
||||||
if [ "git status --porcelain" ]; then
|
if [ "git status --porcelain" ]; then
|
||||||
|
@ -39,4 +29,11 @@ done'
|
||||||
sleep 1
|
sleep 1
|
||||||
done'
|
done'
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
sleep 120
|
||||||
|
if [ "$(echo -n -e '\xFE' | nc -w 1 localhost 25565 | wc -m)" -eq 0 ]; then
|
||||||
|
kill -9 $(pgrep java)
|
||||||
|
fi
|
||||||
|
done &
|
||||||
|
|
||||||
sleep infinity
|
sleep infinity
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue