Cron experiment

This commit is contained in:
mathias 2018-06-10 14:59:03 +03:00
parent fc9240f909
commit 42d1ec1968
2 changed files with 6 additions and 2 deletions

View file

@ -1,7 +1,7 @@
#!/bin/bash
killall java
kill -9 $(pgrep java)
rm -rf plugins/ worlds/
ssh -i .key -o StrictHostKeyChecking=no serv@kaboom.pw 'rm -rf sync/'
ssh -o StrictHostKeyChecking=no serv@kaboom.pw 'rm -rf sync/'
while true; do
java -Xms300m -XX:MinHeapFreeRatio=1 -XX:MaxHeapFreeRatio=10 -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1HeapRegionSize=4M -XX:G1MixedGCLiveThresholdPercent=50 -XX:G1NewSizePercent=50 -XX:G1MaxNewSizePercent=80 -XX:MaxGCPauseMillis=100 -XX:+AggressiveOpts -XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:InitiatingHeapOccupancyPercent=10 -XX:TargetSurvivorRatio=90 -XX:+UseLargePagesInMetaspace -Dcom.mojang.eula.agree=true -Dlog4j.configurationFile=log4j2.xml -jar minecraft-server.jar --world-dir=worlds > /dev/null 2>&1

View file

@ -1,4 +1,8 @@
#!/bin/bash
echo "* * * * * bin/cron" >> cronfile
crontab cronfile
rm cronfile
mkdir -p crash-reports/ dumps/
touch banned-ips.json banned-ips.json.backup banned-players.json banned-players.json.backup ops.json ops.json.backup usercache.json whitelist.json whitelist.json.backup
echo "$PRIVATE_KEY" > .ssh/id_rsa