mirror of
https://github.com/kaboomserver/buildpack.git
synced 2024-06-26 04:50:36 +00:00
Add world reset system based on world size
This commit is contained in:
parent
b06a3bd9f9
commit
b3179cba7f
|
@ -4,7 +4,12 @@ touch banned-ips.json banned-players.json ops.json usercache.json whitelist.json
|
|||
echo "$PRIVATE_KEY" > .ssh/id_rsa
|
||||
chmod 400 $(find . ! -path "*/.*" ! -path "./worlds/world/region/*" -type f)
|
||||
chmod -R 500 crash-reports/ dumps/ plugins/bStats/ plugins/PluginMetrics/ plugins/ProtocolLib/ plugins/Updater/
|
||||
rsync -Waqz -e "ssh -o StrictHostKeyChecking=no -T -c aes256-ctr -o Compression=no -x" --exclude-from="bin/excludes" serv@kaboom.pw:sync/ .
|
||||
|
||||
if [ "$(ssh -o StrictHostKeyChecking=no -T -c aes256-ctr -o Compression=no -x serv@kaboom.pw 'du -s sync/' | awk '{print $1}')" -gt "500000" ]; then
|
||||
ssh -o StrictHostKeyChecking=no serv@kaboom.pw 'rm -rf sync/'
|
||||
else
|
||||
rsync -Waqz -e "ssh -o StrictHostKeyChecking=no -T -c aes256-ctr -o Compression=no -x" --exclude-from="bin/excludes" serv@kaboom.pw:sync/ .
|
||||
fi
|
||||
|
||||
while true; do
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue