diff --git a/Terraria/cfg/terraria-server.txt b/Terraria/cfg/lgsm-default.txt similarity index 100% rename from Terraria/cfg/terraria-server.txt rename to Terraria/cfg/lgsm-default.txt diff --git a/Terraria/terrariaserver b/Terraria/terrariaserver index 57392162c..a32af02d7 100644 --- a/Terraria/terrariaserver +++ b/Terraria/terrariaserver @@ -46,6 +46,7 @@ executable="./TerrariaServer" servercfg="${servicename}.txt" servercfgdir="${filesdir}" servercfgfullpath="${servercfgdir}/${servercfg}" +servercfgdefault="${servercfgdir}/lgsm-default.txt" backupdir="${rootdir}/backups" # Logging diff --git a/functions/fn_install_config b/functions/fn_install_config index 27b5586ae..a3b6b3d2a 100644 --- a/functions/fn_install_config +++ b/functions/fn_install_config @@ -116,6 +116,13 @@ sed -i "s/\"rconpassword\"/\"${rconpass}\"/g" "${servercfgfullpath}" echo "" } +fn_terrariaconfig(){ +echo "creating ${servercfg} config file." +cp -v "${servercfgdefault}" "${servercfgfullpath}" +sleep 1 +echo "" +} + fn_ts3config(){ echo "creating blank ${servercfg} config file." sleep 1 @@ -322,6 +329,11 @@ elif [ "${gamename}" == "Team Fortress Classic" ]; then wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/TeamFortressClassic/cfg/lgsm-default.cfg 2>&1 | grep -F HTTP | cut -c45- | uniq sleep 1 fn_goldsourceconfig +elif [ "${gamename}" == "Terraria" ]; then + echo -e "downloading lgsm-default.txt...\c" + wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/Terraria/cfg/lgsm-default.txt 2>&1 | grep -F HTTP | cut -c45- | uniq + sleep 1 + fn_terrariaconfig elif [ "${gamename}" == "Unreal Tournament 2004" ]; then fn_unreal2config elif [ "${gamename}" == "Unreal Tournament 99" ]; then