gameservergame-servergame-servershacktoberfestdedicated-game-serversgamelinuxgsmserverbashgaminglinuxmultiplayer-game-servershell
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.5 KiB
57 lines
1.5 KiB
#!/bin/bash
|
|
# LGSM fn_serverconfig function
|
|
# Author: Daniel Gibbs
|
|
# Website: http://danielgibbs.co.uk
|
|
# Version: 011214
|
|
|
|
fn_arma3config(){
|
|
echo ""
|
|
echo "Loading Configs"
|
|
echo "================================="
|
|
sleep 1
|
|
cp -v lgsm-default.cfg ${servercfgfullpath}
|
|
sleep 1
|
|
}
|
|
|
|
fn_sourceconfig(){
|
|
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}"
|
|
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="${rconpass}"
|
|
fi
|
|
sed -i "s/\"hostname\"/\"${servername}\"/g" ${servercfgfullpath}
|
|
sed -i "s/\"rconpassword\"/\"${rconpass}\"/g" ${servercfgfullpath}
|
|
}
|
|
|
|
|
|
echo "Downloading lgsm-default.cfg"
|
|
echo "================================="
|
|
sleep 1
|
|
cd "${servercfgdir}"
|
|
if [ "${gamename}" == "ARMA 3" ]; then
|
|
wget --no-check-certificate -nv -N https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/Arma3/cfg/lgsm-config.cfg
|
|
fn_arma3config
|
|
elif [ "${gamename}" == "Counter Strike: Source" ]; then
|
|
wget --no-check-certificate -nv -N https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/CounterStrikeSource/cfg/lgsm-config.cfg
|
|
fn_sourceconfig
|
|
fi
|