From 68e57224bbf1cd6991b734b027390d2f158ef056 Mon Sep 17 00:00:00 2001 From: Gethec <4926029+Gethec@users.noreply.github.com> Date: Wed, 22 Jun 2022 22:02:49 -0500 Subject: [PATCH] Initial commit --- Terraria/tModLoader/startServer.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Terraria/tModLoader/startServer.sh diff --git a/Terraria/tModLoader/startServer.sh b/Terraria/tModLoader/startServer.sh new file mode 100644 index 0000000..7e47b92 --- /dev/null +++ b/Terraria/tModLoader/startServer.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +if [ "$WORLD_SIZE" == "0" ] +then + if [ -e ~/saves/Worlds/${WORLD_NAME}.wld ] + then + echo \n | ./DedicatedServerUtils/Setup_tModLoaderServer.sh && ./LaunchUtils/ScriptCaller.sh -server -ip 0.0.0.0 -port ${SERVER_PORT} -noupnp -maxplayers ${MAX_PLAYERS} -password "${SERVER_PASSWORD}" -motd "${MOTD}" -world ~/saves/Worlds/${WORLD_NAME}.wld$( [ \"$SECURE_SERVER\" == \"0\" ] || printf %s ' -secure' ) -savedirectory ~/ -tmlsavedirectory ~/saves -modpath ~/mods + else + echo -e "Auto-generation is disabled and the specified world file is not present! Upload your world file with the correct name, or change startup settings to generate a world" + fi +else + echo \n | ./DedicatedServerUtils/Setup_tModLoaderServer.sh && ./LaunchUtils/ScriptCaller.sh -server -ip 0.0.0.0 -port ${SERVER_PORT} -noupnp -maxplayers ${MAX_PLAYERS} -password "${SERVER_PASSWORD}" -motd "${MOTD}" -world ~/saves/Worlds/${WORLD_NAME}.wld -autocreate ${WORLD_SIZE} -seed ${WORLD_SEED} -worldname "${WORLD_NAME}"$( [ \"$SECURE_SERVER\" == \"0\" ] || printf %s ' -secure' ) -savedirectory ~/ -tmlsavedirectory ~/saves -modpath ~/mods +fi \ No newline at end of file