Skip to content

Commit

Permalink
feat(ns2): update start parameters to add mod server
Browse files Browse the repository at this point in the history
also removed mod2 as no longer required as per NS2 dedi server docs
  • Loading branch information
dgibbs64 committed Nov 26, 2023
1 parent 3ebc5fe commit 28abd36
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
7 changes: 4 additions & 3 deletions lgsm/config-default/config-lgsm/ns2server/_default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@ ip="0.0.0.0"
port="27015"
defaultmap="ns2_summit"
maxplayers="24"
maxspectators="0"
servername="LinuxGSM"
httpuser="admin"
httppassword="admin"
httpport="8080"
mods=""
modserverport="27031"
serverpassword=""
# Add the following line to the parms if you want a private server. Ensuring
# that the password variable above is not left empty.
# -password \"${serverpassword}\"
# -password '${serverpassword}'

## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
startparameters="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser ${httpuser} -webpassword \"${httppassword}\" -webport ${httpport} -map ${defaultmap} -limit ${maxplayers} -config_path \"${servercfgdir}\" -logdir \"${gamelogdir}\" -modstorage \"${modstoragedir}\" -mods2 \"${mods}\""
startparameters="-name '${servername}' -port ${port} -webadmin -webdomain ${ip} -webuser ${httpuser} -webpassword '${httppassword}' -webport ${httpport} -startmodserver -modserverport ${modserverport} -map ${defaultmap} -limit ${maxplayers} -speclimit ${maxspectators} -config_path '${servercfgdir}' -logdir '${gamelogdir}' -modstorage '${modstoragedir}'"

#### LinuxGSM Settings ####

Expand Down
7 changes: 4 additions & 3 deletions lgsm/modules/info_game.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2033,14 +2033,15 @@ fn_info_game_source() {

fn_info_game_spark() {
defaultmap="${defaultmap:-"NOT SET"}"
httppassword="${httppassword:-"NOT SET"}"
httpport="${httpport:-"0"}"
httpuser="${httpuser:-"NOT SET"}"
maxplayers="${maxplayers:-"0"}"
modserverport=${modserverport:-"0"}
port="${port:-"0"}"
queryport="$((port + 1))"
servername="${servername:-"NOT SET"}"
serverpassword="${serverpassword:-"NOT SET"}"
httpuser="${httpuser:-"NOT SET"}"
httppassword="${httppassword:-"NOT SET"}"
httpport="${httpport:-"0"}"
}

# Config Type: Custom (key-value pairs)
Expand Down
1 change: 1 addition & 0 deletions lgsm/modules/info_messages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1468,6 +1468,7 @@ fn_info_messages_spark() {
fn_port "header"
fn_port "Game" port udp
fn_port "Query" queryport udp
fn_port "Mod Server" modserverport tcp
fn_port "Web Interface" httpport tcp
} | column -s $'\t' -t
echo -e ""
Expand Down

0 comments on commit 28abd36

Please sign in to comment.