Browse Source

fix(inss): fix config to only use parameter (#3179)

pull/3199/head
Christian 4 years ago
committed by Daniel Gibbs
parent
commit
6f2c7ede4d
  1. 8
      lgsm/config-default/config-lgsm/inssserver/_default.cfg
  2. 26
      lgsm/functions/info_config.sh

8
lgsm/config-default/config-lgsm/inssserver/_default.cfg

@ -19,12 +19,13 @@ defaultscenario="Scenario_Crossing_Push_Security"
maxplayers="28"
## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
## Parameter Docs: https://sandstorm-support.newworldinteractive.com/hc/en-us/articles/360049211072-Server-Admin-Guide
fn_parms(){
# Allows serverpassword to work with parameters
if [ "${serverpassword}" != "NOT SET" ]; then
parms="${defaultmap}?Scenario=${defaultscenario}?MaxPlayers=${maxplayers}?Port=${port}?QueryPort=${queryport}?password="${serverpassword}" -hostname="${servername}" -log"
if [ "${serverpassword}" != "" ]; then
parms="${defaultmap}?Scenario=${defaultscenario}?MaxPlayers=${maxplayers}?password='${serverpassword}' -Port=${port} -QueryPort=${queryport} -hostname="${servername}" -log"
else
parms="${defaultmap}?Scenario=${defaultscenario}?MaxPlayers=${maxplayers}?Port=${port}?QueryPort=${queryport} -hostname="${servername}" -log"
parms="${defaultmap}?Scenario=${defaultscenario}?MaxPlayers=${maxplayers} -Port=${port} -QueryPort=${queryport} -hostname='${servername}' -log"
fi
}
@ -170,7 +171,6 @@ executable="./InsurgencyServer-Linux-Shipping"
servercfgdir="${systemdir}/Saved/Config/LinuxServer"
servercfg="Game.ini"
servercfgdefault="Game.ini"
servercfgfullpath="${servercfgdir}/${servercfg}"
## Backup Directory
backupdir="${lgsmdir}/backup"

26
lgsm/functions/info_config.sh

@ -405,30 +405,6 @@ fn_info_config_factorio(){
fi
}
fn_info_config_inss(){
if [ ! -f "${servercfgfullpath}" ]; then
rconenabled="${unavailable}"
rconpassword="${unavailable}"
rconport="${zero}"
maxplayers="${zero}"
port="${zero}"
queryport="${zero}"
queryenabled="${unavailable}"
rconport="${zero}"
gamemode="${unavailable}"
gameworld="${unavailable}"
else
rconenabled=$(grep "bEnabled" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
rconpassword=$(grep "Password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
rconport=$(grep "ListenPort" "${servercfgfullpath}" | tr -cd '[:digit:]')
# Not Set
rconenabled=${rconenabled:-"NOT SET"}
rconpassword=${rconpassword:-"NOT SET"}
rconport=${rconport:-"0"}
fi
}
fn_info_config_minecraft(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
@ -1623,8 +1599,6 @@ elif [ "${shortname}" == "eco" ]; then
fn_info_config_eco
elif [ "${shortname}" == "fctr" ]; then
fn_info_config_factorio
elif [ "${shortname}" == "inss" ]; then
fn_info_config_inss
elif [ "${shortname}" == "jc2" ]; then
fn_info_config_justcause2
elif [ "${shortname}" == "jc3" ]; then

Loading…
Cancel
Save