|
@@ -14,6 +14,42 @@ sleep 1
|
|
|
echo ""
|
|
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(){
|
|
fn_jc2config(){
|
|
|
echo ""
|
|
echo ""
|
|
|
echo "Loading Configs"
|
|
echo "Loading Configs"
|
|
@@ -49,7 +85,7 @@ if [ -z "${autoinstall}" ]; then
|
|
|
read -p "Enter rcon password: " rconpass
|
|
read -p "Enter rcon password: " rconpass
|
|
|
else
|
|
else
|
|
|
servername="${servicename}"
|
|
servername="${servicename}"
|
|
|
- rconpass="${rconpass}"
|
|
|
|
|
|
|
+ rconpass="rconpassword"
|
|
|
fi
|
|
fi
|
|
|
sed -i "s/\"hostname\"/\"${servername}\"/g" "${servercfgfullpath}"
|
|
sed -i "s/\"hostname\"/\"${servername}\"/g" "${servercfgfullpath}"
|
|
|
sed -i "s/\"rconpassword\"/\"${rconpass}\"/g" "${servercfgfullpath}"
|
|
sed -i "s/\"rconpassword\"/\"${rconpass}\"/g" "${servercfgfullpath}"
|
|
@@ -87,13 +123,20 @@ cd "${servercfgdir}"
|
|
|
if [ "${gamename}" == "ARMA 3" ]; then
|
|
if [ "${gamename}" == "ARMA 3" ]; then
|
|
|
wget --no-check-certificate -nv -N https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/Arma3/cfg/lgsm-default.cfg
|
|
wget --no-check-certificate -nv -N https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/Arma3/cfg/lgsm-default.cfg
|
|
|
fn_arma3config
|
|
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
|
|
elif [ "${gamename}" == "Counter Strike: Source" ]; then
|
|
|
wget --no-check-certificate -nv -N https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/CounterStrikeSource/cfg/lgsm-default.cfg
|
|
wget --no-check-certificate -nv -N https://raw.githubusercontent.com/dgibbs64/linuxgameservers/master/CounterStrikeSource/cfg/lgsm-default.cfg
|
|
|
fn_sourceconfig
|
|
fn_sourceconfig
|
|
|
|
|
+elif [ "${gamename}" == "Just Cause 2" ]; then
|
|
|
|
|
+ echo "lgsm-default.cfg not required."
|
|
|
|
|
+ fn_jc2config
|
|
|
|
|
+
|
|
|
elif [ "${gamename}" == "Unreal Tournament 2004" ]; then
|
|
elif [ "${gamename}" == "Unreal Tournament 2004" ]; then
|
|
|
- echo "lgsm-default.cfg not required"
|
|
|
|
|
|
|
+ echo "lgsm-default.cfg not required."
|
|
|
fn_ut2k4config
|
|
fn_ut2k4config
|
|
|
fi
|
|
fi
|