Browse Source

added webadmin details

pull/1639/head
Daniel Gibbs 8 years ago
parent
commit
a71bd1d10d
  1. 7
      lgsm/functions/info_config.sh
  2. 13
      lgsm/functions/info_messages.sh

7
lgsm/functions/info_config.sh

@ -626,10 +626,10 @@ fn_info_config_unreal3(){
servername="${unavailable}"
serverpassword="${unavailable}"
adminpassword="${unavailable}"
maxplayers="${unavailable}"
webadminenabled="${unavailable}"
webadminport="${zero}"
webadminpass="${unavailable}"
maxplayers="${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]*$//')
# Not in UT3
@ -637,14 +637,15 @@ fn_info_config_unreal3(){
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 "bEnabled" "${servercfgdir}"/* | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
webadminport=$(grep "ListenPort" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]')
webadminport=$(grep "ListenPort" "${servercfgdir}"/* | grep -v "#" | tr -cd '[:digit:]')
# Not Set
servername=${servername:-"NOT SET"}
serverpassword=${serverpassword:-"NOT SET"}
adminpassword=${adminpassword:-"NOT SET"}
maxplayers=${maxplayers:-"NOT SET"}
webadminenabled=${webadminenabled:-"NOT SET"}
webadminport=${webadminport:-"0"}
maxplayers=${maxplayers:-"NOT SET"}
fi
}

13
lgsm/functions/info_messages.sh

@ -862,13 +862,22 @@ fn_info_message_unreal(){
} | column -s $'\t' -t
}
fn_info_message_ut3(){
fn_info_message_unreal3(){
echo -e "netstat -atunp | grep ut3-bin"
echo -e ""
{
echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL"
echo -e "> Game/Query\tINBOUND\t${port}\ttcp/udp"
} | column -s $'\t' -t
echo -e ""
echo -e "${lightgreen}${servername} WebAdmin${default}"
fn_messages_separator
{
echo -e "${blue}WebAdmin enabled:\t${default}${webadminenabled}"
echo -e "${blue}WebAdmin url:\t${default}http://${ip}:${webadminport}"
echo -e "${blue}WebAdmin username:\t${default}${webadminuser}"
echo -e "${blue}WebAdmin password:\t${default}${webadminpass}"
} | column -s $'\t' -t
}
fn_info_message_wolfensteinenemyterritory(){
@ -924,7 +933,7 @@ fn_info_message_select_engine(){
elif [ "${engine}" == "unreal" ]||[ "${engine}" == "unreal2" ]; then
fn_info_message_unreal
elif [ "${engine}" == "unreal3" ]; then
fn_info_message_ut3
fn_info_message_unreal3
elif [ "${gamename}" == "7 Days To Die" ]; then
fn_info_message_sdtd
elif [ "${gamename}" == "ARK: Survival Evolved" ]; then

Loading…
Cancel
Save