Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ns2): update start parameters to add mod server #4396

Merged
merged 1 commit into from
Nov 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading