Skip to content

Commit

Permalink
fix(sdtdserver): config parsing for the port (#3007)
Browse files Browse the repository at this point in the history
  • Loading branch information
h3o66 committed Sep 15, 2020
1 parent a99cc53 commit 1bd8194
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lgsm/functions/info_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1247,7 +1247,7 @@ fn_info_config_sdtd(){
else
servername=$(grep "ServerName" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"")
serverpassword=$(grep "ServerPassword" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"")
port=$(grep "ServerPort" "${servercfgfullpath}" | tr -cd '[:digit:]')
port=$(grep "ServerPort" "${servercfgfullpath}" | egrep -o 'value="[0-9]+"' | tr -cd '[:digit:]')
queryport=${port:-"0"}

webadminenabled=$(grep "ControlPanelEnabled" "${servercfgfullpath}" | sed 's/^.*value="//' | cut -f1 -d"\"")
Expand Down

0 comments on commit 1bd8194

Please sign in to comment.