Minecraft server packaged for cloudron
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

29 lines
778 B

#!/bin/bash
set -eu
echo "=> Ensure directories"
mkdir -p /app/data/
echo "=> creating mods folder"
mkdir -p /app/data/mods/
echo "=> creating instances folder"
mkdir -p /app/data/instances/
echo "=> Configuring instance"
if ! [ -f /app/data/instances.json ]; then
echo "Fresh installation, setting up default instance..."
touch /app/data/instances.json
echo "{\"activeInstance\": \"default\"}" > /app/data/instances.json
echo "Done."
fi
echo "=> Accept EULA"
echo "eula=true" > /app/data/eula.txt
echo "=> Ensure permissions"
chown -R cloudron:cloudron /app/data /app/data/mods /app/data/instances /app/data/instances.json
chmod -R ugo+rwx /app/data/instances
echo "=> Starting management server"
exec /usr/local/bin/gosu cloudron:cloudron node /app/code/index.js