Browse Source

Added webadmin for ut3

pull/1639/head
Daniel Gibbs 8 years ago
parent
commit
0c45328828
  1. 10
      lgsm/functions/info_config.sh

10
lgsm/functions/info_config.sh

@ -629,6 +629,7 @@ fn_info_config_unreal3(){
maxplayers="${unavailable}"
webadminenabled="${unavailable}"
webadminport="${zero}"
webadminuser="${unavailable}"
webadminpass="${unavailable}"
else
servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
@ -636,14 +637,19 @@ fn_info_config_unreal3(){
serverpassword=$(grep "GamePassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/GamePassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
adminpassword=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
maxplayers=$(grep "MaxPlayers" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
webadminenabled=$(grep -oh"bEnabled" "${servercfgdir}"/* | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
webadminport=$(grep -oh "ListenPort" "${servercfgdir}"/* | grep -v "#" | tr -cd '[:digit:]')
webadminenabled=$(grep -h "bEnabled" "${servercfgdir}/UTWeb.ini" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
webadminport=$(grep -h "ListenPort" "${servercfgdir}/UTWeb.ini" | grep -v "#" | tr -cd '[:digit:]')
webadminuser="admin"
webadminpass=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
# Not Set
servername=${servername:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"}
adminpassword=${adminpassword:-"NOT SET"}
maxplayers=${maxplayers:-"NOT SET"}
webadminenabled=${webadminenabled:-"NOT SET"}
webadminuser=${webadminuser:-"NOT SET"}
webadminpass=${webadminpass:-"NOT SET"}
webadminport=${webadminport:-"0"}
fi

Loading…
Cancel
Save