Browse Source

added goldsource config

pull/254/merge
Daniel Gibbs 10 years ago
parent
commit
1a4a06754e
  1. 53
      functions/fn_serverconfig

53
functions/fn_serverconfig

@ -14,6 +14,42 @@ sleep 1
echo ""
}
fn_goldsourceconfig(){
echo ""
echo "Loading Configs"
echo "================================="
sleep 1
echo "creating ${servicename}.cfg config file."
cp -v lgsm-default.cfg "${servercfgfullpath}"
sleep 1
echo "creating server.cfg."
touch "${defaultcfg}"
sleep 1
echo "creating redirect."
echo "server.cfg > ${servercfg}."
echo "exec ${servercfg}" > "${defaultcfg}"
echo "creating listip.cfg."
sleep 1
touch "${systemdir}/listip.cfg"
echo "creating banned.cfg."
touch "${systemdir}/banned.cfg"
sleep 1
echo ""
echo "Configuring ${gamename} Server"
echo "================================="
sleep 1
if [ -z "${autoinstall}" ]; then
read -p "Enter server name: " servername
read -p "Enter rcon password: " rconpass
else
servername="${servicename}"
rconpass="rconpassword"
fi
sed -i "s/\"hostname\"/\"${servername}\"/g" "${servercfgfullpath}"
sed -i "s/\"rconpassword\"/\"${rconpass}\"/g" "${servercfgfullpath}"
echo ""
}
fn_jc2config(){
echo ""
echo "Loading Configs"
@ -49,7 +85,7 @@ if [ -z "${autoinstall}" ]; then
read -p "Enter rcon password: " rconpass
else
servername="${servicename}"
rconpass="${rconpass}"
rconpass="rconpassword"
fi
sed -i "s/\"hostname\"/\"${servername}\"/g" "${servercfgfullpath}"
sed -i "s/\"rconpassword\"/\"${rconpass}\"/g" "${servercfgfullpath}"
@ -87,13 +123,20 @@ cd "${servercfgdir}"
if [ "${gamename}" == "ARMA 3" ]; then
wget --no-check-certificate -nv -N https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/Arma3/cfg/lgsm-default.cfg
fn_arma3config
elif [ "${gamename}" == "Just Cause 2" ]; then
echo "lgsm-default.cfg not required"
fn_jc2config
elif [ "${gamename}" == "Blade Symphony" ]; then
wget --no-check-certificate -nv -N https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/BladeSymphony/cfg/lgsm-default.cfg
fn_goldsourceconfig
elif [ "${gamename}" == "Counter Strike 1.6" ]; then
wget --no-check-certificate -nv -N https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/CounterStrike/cfg/lgsm-default.cfg
fn_goldsourceconfig
elif [ "${gamename}" == "Counter Strike: Source" ]; then
wget --no-check-certificate -nv -N https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/CounterStrikeSource/cfg/lgsm-default.cfg
fn_sourceconfig
elif [ "${gamename}" == "Just Cause 2" ]; then
echo "lgsm-default.cfg not required."
fn_jc2config
elif [ "${gamename}" == "Unreal Tournament 2004" ]; then
echo "lgsm-default.cfg not required"
echo "lgsm-default.cfg not required."
fn_ut2k4config
fi
Loading…
Cancel
Save