diff --git a/script/init.sh b/script/init.sh index cfae952..013f883 100755 --- a/script/init.sh +++ b/script/init.sh @@ -13,18 +13,6 @@ chmod 600 .ssh/proxy echo "$SCHEMATIC_KEY" > .ssh/id_rsa ssh-keyscan github.com >> .ssh/known_hosts -# Make certain files read-only - -echo "[]" > banned-ips.json -echo "[]" > banned-players.json -echo "[]" > ops.json -echo "[]" > whitelist.json - -chmod 400 banned-ips.json -chmod 400 banned-players.json -chmod 400 ops.json -chmod 400 whitelist.json - # Run scripts for starting the Minecraft server, reverse proxy and schematic # checker in the background diff --git a/script/server.sh b/script/server.sh index 298027f..9829b8f 100755 --- a/script/server.sh +++ b/script/server.sh @@ -3,7 +3,21 @@ # The alive checker and Minecraft server is started at the same time. For performance reasons, the # OpenJ9 JVM is used instead of Java's default Hotspot JVM. -chmod -R 500 $HOME/plugins/bStats/ $HOME/plugins/PluginMetrics/ +mkdir -p $HOME/plugins/Essentials/userdata/ +chmod -R 500 $HOME/plugins/bStats/ $HOME/plugins/Essentials/userdata/ $HOME/plugins/PluginMetrics/ + +# Make certain files read-only + +echo "[]" > banned-ips.json +echo "[]" > banned-players.json +echo "[]" > ops.json +echo "[]" > whitelist.json + +chmod 400 banned-ips.json +chmod 400 banned-players.json +chmod 400 ops.json +chmod 400 whitelist.json + dtach -n alivecheck $HOME/script/alivecheck.sh while true; do