Browse Source

Added factorio to info config

pull/1236/merge
Daniel Gibbs 8 years ago
parent
commit
712f5f0f2b
  1. 18
      lgsm/functions/info_config.sh

18
lgsm/functions/info_config.sh

@ -166,6 +166,24 @@ fn_info_config_dontstarve(){
fi fi
} }
fn_info_config_factorio(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="Factorio Server"
serverpassword="${unavailable}"
maxplayers="${zero}"
else
servername="Factorio Server"
serverpassword=$(grep "game_password" "${clustercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/game_password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
maxplayers=$(grep "\"max_players\"" "${clustercfgfullpath}" | tr -cd '[:digit:]')
# Not Set
servername=${servername:-"NOT SET"}
maxplayers==${maxplayers=:-"0"}
rconpassword=${rconpassword=:-"NOT SET"}
fi
}
fn_info_config_minecraft(){ fn_info_config_minecraft(){
if [ ! -f "${servercfgfullpath}" ]; then if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}" servername="${unavailable}"

Loading…
Cancel
Save