diff --git a/04rel64/start.sh b/04rel64/start.sh new file mode 100644 index 0000000..a86bbea --- /dev/null +++ b/04rel64/start.sh @@ -0,0 +1,41 @@ +#!/bin/bash +CHK_FILE="/home/container/mpsvrrel64" +if [ -f $CHK_FILE ]; then + echo "VC:MP executable exists, not downloading. To update, delete mpsvrrel64." +else + wget -q http://v04.thijn.ovh/server/VCMP04_server_${VCMP_VERSION}_linux64.zip + unzip VCMP04_server_${VCMP_VERSION}_linux64.zip + rm -f VCMP04_server_${VCMP_VERSION}_linux64.zip + echo "Downloaded VC:MP Server version ${VCMP_VERSION}" + + mkdir plugins + cd plugins/ + wget -q http://v04.thijn.ovh/allplugins_04rel004_${VCMP_PLUGIN_PATCH}.7z + p7zip -d allplugins_04rel004_${VCMP_PLUGIN_PATCH}.7z + chmod 700 * + rm -f allplugins_04rel004_${VCMP_PLUGIN_PATCH}.7z + rm -f *rel32.* + rm -f *.dll + + cd /home/container + chmod +x mpsvrrel64 + find +fi + +if [ -f "/home/container/server.cfg" ]; then + echo "server.cfg exists, not generating file." +else + echo " +gamemode Default mode +plugins squirrel04rel64 sqlite04rel64 hashing04rel64 sockets04rel64 +port ${SERVER_PORT} +sqgamemode main.nut +maxplayers ${MAX_SLOTS} +" > server.cfg +fi + + +MODIFIED_STARTUP=`echo ${STARTUP} | perl -pe 's@\{\{(.*?)\}\}@$ENV{$1}@g'` +./mpsvrrel64 ${MODIFIED_STARTUP} + +exit 0