Browse Source

Added conditional server salt setting for Rust

We don't have the range, but it doesn't prevent users from setting a salt to a known value on an existing server, that they can know running rcon command: server.salt

Fixes #1364

Also fixed an unneeded space line 22.
pull/1849/head
UltimateByte 7 years ago
parent
commit
0dc2b645f3
  1. 12
      lgsm/config-default/config-lgsm/rustserver/_default.cfg

12
lgsm/config-default/config-lgsm/rustserver/_default.cfg

@ -19,7 +19,8 @@ servername="Rust"
maxplayers="50"
# Advanced Start Settings
seed="" # default random; range : 1 to 2147483647 ; used to change or reproduce a procedural map
seed="" # default random; range : 1 to 2147483647 ; used to change or reproduce a procedural map
salt="" # default random; range : unknown range ; used to recover a known setting from an existing map
worldsize="3000" # default 3000; range : 1000 to 6000 ; map size in meters
saveinterval="300" # Auto-save in seconds
tickrate="30" # default 30; range : 15 to 100
@ -34,7 +35,14 @@ else
# Keep randomness of the number if not set
conditionalseed=""
fi
parms="-batchmode +server.ip ${ip} +server.port ${port} +server.tickrate ${tickrate} +server.hostname \"${servername}\" +server.identity \"${servicename}\" ${conditionalseed} +server.maxplayers ${maxplayers} +server.worldsize ${worldsize} +server.saveinterval ${saveinterval} +rcon.web ${rconweb} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" -logfile \"${gamelogdate}\""
if [ -n "${salt}" ]; then
# If set, then add to start parms
conditionalsalt="+server.salt ${salt}"
else
# Keep randomness of the number if not set
conditionalsalt=""
fi
parms="-batchmode +server.ip ${ip} +server.port ${port} +server.tickrate ${tickrate} +server.hostname \"${servername}\" +server.identity \"${servicename}\" ${conditionalseed} ${conditionalsalt} +server.maxplayers ${maxplayers} +server.worldsize ${worldsize} +server.saveinterval ${saveinterval} +rcon.web ${rconweb} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" -logfile \"${gamelogdate}\""
}
#### LinuxGSM Settings ####

Loading…
Cancel
Save