Browse Source

Update terraria to install default config

Update the terraria config to fit with the config convention. Update the
terrariaserver script to contain a variable to reference the default
config. Update fn_install_config to handle Terraria.
pull/494/head
Bryce Van Dyk 10 years ago
parent
commit
71533fe2c2
  1. 0
      Terraria/cfg/lgsm-default.txt
  2. 1
      Terraria/terrariaserver
  3. 12
      functions/fn_install_config

0
Terraria/cfg/terraria-server.txt → Terraria/cfg/lgsm-default.txt

1
Terraria/terrariaserver

@ -46,6 +46,7 @@ executable="./TerrariaServer"
servercfg="${servicename}.txt" servercfg="${servicename}.txt"
servercfgdir="${filesdir}" servercfgdir="${filesdir}"
servercfgfullpath="${servercfgdir}/${servercfg}" servercfgfullpath="${servercfgdir}/${servercfg}"
servercfgdefault="${servercfgdir}/lgsm-default.txt"
backupdir="${rootdir}/backups" backupdir="${rootdir}/backups"
# Logging # Logging

12
functions/fn_install_config

@ -116,6 +116,13 @@ sed -i "s/\"rconpassword\"/\"${rconpass}\"/g" "${servercfgfullpath}"
echo "" echo ""
} }
fn_terrariaconfig(){
echo "creating ${servercfg} config file."
cp -v "${servercfgdefault}" "${servercfgfullpath}"
sleep 1
echo ""
}
fn_ts3config(){ fn_ts3config(){
echo "creating blank ${servercfg} config file." echo "creating blank ${servercfg} config file."
sleep 1 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 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 sleep 1
fn_goldsourceconfig 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 elif [ "${gamename}" == "Unreal Tournament 2004" ]; then
fn_unreal2config fn_unreal2config
elif [ "${gamename}" == "Unreal Tournament 99" ]; then elif [ "${gamename}" == "Unreal Tournament 99" ]; then

Loading…
Cancel
Save