2018-05-25 16:49:13 +00:00
|
|
|
#!/bin/bash
|
|
|
|
mkdir -p crash-reports/ dumps/
|
2018-06-10 11:38:18 +00:00
|
|
|
echo "$PRIVATE_KEY" > .ssh/id_rsa
|
2018-07-11 03:52:20 +00:00
|
|
|
chmod 400 $(find . ! -path "*/.*" -type f)
|
2018-06-10 14:01:27 +00:00
|
|
|
chmod -R 500 crash-reports/ dumps/ plugins/bStats/ plugins/PluginMetrics/ plugins/ProtocolLib/ plugins/Updater/
|
2018-07-05 20:51:43 +00:00
|
|
|
|
2018-07-05 21:33:37 +00:00
|
|
|
if [ "$(ssh -o StrictHostKeyChecking=no -T -c aes256-ctr -o Compression=no -x serv@kaboom.pw 'du -s sync/worlds/' | awk '{print $1}')" -gt "500000" ]; then
|
2018-07-05 21:46:18 +00:00
|
|
|
ssh -o StrictHostKeyChecking=no serv@kaboom.pw 'cd sync/ && find . ! -path './plugins/WorldEdit/schematics' -type d -exec rm -rf {} +'
|
2018-07-05 20:51:43 +00:00
|
|
|
fi
|
2018-08-05 13:12:41 +00:00
|
|
|
rsync -Waqz -e "ssh -o StrictHostKeyChecking=no -T -c aes256-ctr -o Compression=no -x" --exclude-from=".bin/excludes" serv@kaboom.pw:sync/plugins serv@kaboom.pw:sync/worlds .
|
2018-05-25 16:49:13 +00:00
|
|
|
|
|
|
|
while true; do
|
2018-07-11 14:33:17 +00:00
|
|
|
rsync -Waq -e "ssh -o StrictHostKeyChecking=no -T -c aes256-ctr -o Compression=no -x" --exclude-from=".bin/excludes" plugins worlds serv@kaboom.pw:sync/ > /dev/null 2>&1
|
2018-06-10 11:26:10 +00:00
|
|
|
sleep 5
|
2018-05-25 16:49:13 +00:00
|
|
|
done &
|
|
|
|
|
2018-06-10 09:27:51 +00:00
|
|
|
while true; do
|
2018-07-11 16:59:26 +00:00
|
|
|
ssh -o StrictHostKeyChecking=no -S none -N -T -R 64518:localhost:25565 serv@kaboom.pw > /dev/null 2>&1
|
2018-06-10 09:27:51 +00:00
|
|
|
sleep 1
|
|
|
|
done &
|
|
|
|
|
2018-07-11 14:36:14 +00:00
|
|
|
.bin/tmux new -d -s server 'while true; do
|
2018-08-17 16:18:39 +00:00
|
|
|
.bin/java/bin/java -Xms0m -Xmx512m -Xss512k -XX:MinHeapFreeRatio=1 -XX:MaxHeapFreeRatio=10 -Dcom.mojang.eula.agree=true -Dlog4j.configurationFile=log4j2.xml -jar minecraft-server.jar --world-dir=worlds
|
2018-05-25 16:49:13 +00:00
|
|
|
sleep 1
|
2018-07-11 14:10:41 +00:00
|
|
|
done' &
|
2018-05-25 16:49:13 +00:00
|
|
|
|
2018-06-10 05:22:56 +00:00
|
|
|
sleep infinity
|