|
|
@ -753,20 +753,25 @@ fn_info_config_squad(){ |
|
|
|
servername="${unavailable}" |
|
|
|
maxplayers="${unavailable}" |
|
|
|
else |
|
|
|
servername="$(cat ${servercfgfullpath} | grep "ServerName=" | cut -c13- | rev | cut -c3- | rev)" |
|
|
|
maxplayers="$(cat ${servercfgfullpath} | grep "MaxPlayers=" | cut -c12- | tr -cd '[:digit:]')" |
|
|
|
servername="$(cat ${servercfgfullpath} | grep "ServerName=" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')" |
|
|
|
maxplayers="$(cat ${servercfgfullpath} | grep "MaxPlayers=" | tr -cd '[:digit:]')" |
|
|
|
fi |
|
|
|
|
|
|
|
if [ ! -f "${servercfgdir}/Rcon.cfg" ]; then |
|
|
|
rconport=${unavailable} |
|
|
|
rconpassword=${unavailable} |
|
|
|
else |
|
|
|
rconport=$(cat ${servercfgdir}/Rcon.cfg | grep "Port=" | cut -c6- | tr -cd '[:digit:]') |
|
|
|
rconpassword=$(cat ${servercfgdir}/Rcon.cfg | grep "Password=" | cut -c10-) |
|
|
|
if [ -z "${rconpassword}" ]||[ ${#rconpassword} == 1 ]; then |
|
|
|
rconpassword="${yellow}DISABLED${default}" |
|
|
|
fi |
|
|
|
rconport=$(cat ${servercfgdir}/Rcon.cfg | grep "Port=" | tr -cd '[:digit:]') |
|
|
|
rconpassword=$(cat ${servercfgdir}/Rcon.cfg | grep "Password=" | sed -e 's/^[ \t]*//g' -e '/^\//d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') |
|
|
|
fi |
|
|
|
|
|
|
|
rconport=${rconport:-"0"} |
|
|
|
if [ -z "${rconpassword}" ]||[ ${#rconpassword} == 1 ]; then |
|
|
|
rconpassword="NOT SET" |
|
|
|
fi |
|
|
|
servername=${servername:-"NOT SET"} |
|
|
|
serverpassword=${serverpassword:-"NOT SET"} |
|
|
|
maxplayers=${maxplayers:-"0"} |
|
|
|
} |
|
|
|
|
|
|
|
# Just Cause 2 |
|
|
|