mirror of
https://github.com/kaboomserver/buildpack.git
synced 2025-08-03 19:05:37 +00:00
Add world reset system based on world size
This commit is contained in:
parent
b06a3bd9f9
commit
b3179cba7f
1 changed files with 6 additions and 1 deletions
|
@ -4,7 +4,12 @@ touch banned-ips.json banned-players.json ops.json usercache.json whitelist.json
|
||||||
echo "$PRIVATE_KEY" > .ssh/id_rsa
|
echo "$PRIVATE_KEY" > .ssh/id_rsa
|
||||||
chmod 400 $(find . ! -path "*/.*" ! -path "./worlds/world/region/*" -type f)
|
chmod 400 $(find . ! -path "*/.*" ! -path "./worlds/world/region/*" -type f)
|
||||||
chmod -R 500 crash-reports/ dumps/ plugins/bStats/ plugins/PluginMetrics/ plugins/ProtocolLib/ plugins/Updater/
|
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
|
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
|
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…
Add table
Add a link
Reference in a new issue