init commit

This commit is contained in:
root
2022-05-14 23:44:31 -05:00
parent f44fff42da
commit 78a175ddf2
5 changed files with 110 additions and 0 deletions

28
setup.sh Normal file
View File

@@ -0,0 +1,28 @@
#!/bin/bash
set -e
set +x
if [[ -z ${MODPACKID} ]];then MODPACKID='95';fi
if [[ -z ${VERSION} ]];then VERSION='LATEST';fi
cp cleanup.sh /opt/ftbmc
cd /opt/ftbmc
if [ -f "/opt/ftbmc/.updatelock" ]; then
echo "Operating in manual mode!"
echo "Updating disabled. Not overwriting files."
else
echo "Cleaning old files.."
/opt/ftbmc/cleanup.sh
echo "Downloading new files..."
cd /tmp/modpackch
/tmp/modpackch/downloadpack.sh
echo "Installing new files..."
/tmp/modpackch/serverinstall* --path /opt/ftbmc --latest --auto
cd /opt/ftbmc
touch /opt/ftbmc/.updatelock
fi
# echo "Creating Minecraft EULA file"
echo "Now starting server..."
echo "eula=true" > eula.txt
./run.sh