Browse Source

Added rcon and query enabled to details

pull/1657/head
Daniel Gibbs 8 years ago
parent
commit
6c21917583
  1. 2
      lgsm/functions/command_monitor.sh
  2. 4
      lgsm/functions/info_config.sh
  3. 10
      lgsm/functions/info_messages.sh

2
lgsm/functions/command_monitor.sh

@ -84,7 +84,7 @@ fn_monitor_tmux(){
do
if [ "${allowed_engine}" == "starbound" ]; then
info_config.sh
if [ "${rconenabled}" == "true" ]; then
if [ "${queryenabled}" == "true" ]; then
monitor_gsquery.sh
fi
elif [ "${allowed_engine}" == "${engine}" ]; then

4
lgsm/functions/info_config.sh

@ -455,6 +455,7 @@ fn_info_config_source(){
fn_info_config_starbound(){
if [ ! -f "${servercfgfullpath}" ]; then
servername="${unavailable}"
queryenabled="${unavailable}"
rconenabled="${unavailable}"
rconpassword="${unavailable}"
port="21025"
@ -463,7 +464,8 @@ fn_info_config_starbound(){
maxplayers="8"
else
servername=$(grep "serverName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e 's/serverName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
rconenabled=$(grep "runQueryServer" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e 's/runQueryServer//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
queryenabled=$(grep "runQueryServer" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e 's/runQueryServer//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
rconenabled=$(grep "runRconServer" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e 's/runRconServer//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
rconpassword=$(grep "rconServerPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e 's/rconServerPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//')
port=$(grep "gameServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]')
queryport=$(grep "queryServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]')

10
lgsm/functions/info_messages.sh

@ -146,6 +146,16 @@ fn_info_message_gameserver(){
echo -e "${blue}Server password:\t${default}${serverpassword}"
fi
# Query enabled (Starbound)
if [ -n "${queryenabled}" ]; then
echo -e "${blue}Query enabled:\t${default}${rconpassword}"
fi
# RCON enabled (Starbound)
if [ -n "${rconenabled}" ]; then
echo -e "${blue}RCON enabled:\t${default}${rconpassword}"
fi
# RCON password
if [ -n "${rconpassword}" ]; then
echo -e "${blue}RCON password:\t${default}${rconpassword}"

Loading…
Cancel
Save