Make userdata read only

This commit is contained in:
mathiascode 2020-01-05 03:15:44 +02:00
parent ab1974184b
commit 3ce042e6f9
2 changed files with 15 additions and 13 deletions

View file

@ -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

View file

@ -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