Add support for sv_cheats, fix sed
parent
376c645423
commit
bab03fcca4
|
@ -48,6 +48,7 @@ ENV CS2_SERVERNAME="cs2 private server" \
|
|||
CS2_SERVER_HIBERNATE=0 \
|
||||
CS2_RCON_PORT="" \
|
||||
CS2_MAXPLAYERS=10 \
|
||||
CS2_CHEATS=0 \
|
||||
CS2_RCONPW="changeme" \
|
||||
CS2_PW="changeme" \
|
||||
CS2_MAPGROUP="mg_active" \
|
||||
|
|
|
@ -13,16 +13,18 @@ ln -sfT ${STEAMCMDDIR}/linux64/steamclient.so ~/.steam/sdk64/steamclient.so
|
|||
|
||||
# Install server.cfg
|
||||
cp /etc/server.cfg "${STEAMAPPDIR}"/game/csgo/cfg/server.cfg
|
||||
sed -i -e "s/hostname.*/hostname ${CS2_SERVERNAME}/g" "${STEAMAPPDIR}"/game/csgo/cfg/server.cfg \
|
||||
-e "s/sv_password.*/sv_password ${CS2_PW}/g" "${STEAMAPPDIR}"/game/csgo/cfg/server.cfg \
|
||||
-e "s/rcon_password.*/rcon_password ${CS2_RCONPW}/g" "${STEAMAPPDIR}"/game/csgo/cfg/server.cfg \
|
||||
-e "s/tv_enable./tv_enable ${TV_ENABLE}/g" "${STEAMAPPDIR}"/game/csgo/cfg/server.cfg \
|
||||
-e "s/tv_port.*/tv_port ${TV_PORT}/g" "${STEAMAPPDIR}"/game/csgo/cfg/server.cfg \
|
||||
-e "s/tv_autorecord.*/tv_autorecord ${TV_AUTORECORD}/g" "${STEAMAPPDIR}"/game/csgo/cfg/server.cfg \
|
||||
-e "s/tv_enable.*/tv_enable ${TV_PW}/g" "${STEAMAPPDIR}"/game/csgo/cfg/server.cfg \
|
||||
-e "s/tv_relay_pw.*/tv_relay_pw ${TV_RELAY_PW}/g" "${STEAMAPPDIR}"/game/csgo/cfg/server.cfg \
|
||||
-e "s/tv_maxrate.*/tv_maxrate ${TV_MAXRATE}/g" "${STEAMAPPDIR}"/game/csgo/cfg/server.cfg \
|
||||
-e "s/tv_delay.*/tv_delay ${TV_DELAY}/g" "${STEAMAPPDIR}"/game/csgo/cfg/server.cfg
|
||||
sed -i -e "s/hostname.*/hostname ${CS2_SERVERNAME}/g" \
|
||||
-e "s/sv_cheats.*/sv_cheats ${CS2_CHEATS}/g" \
|
||||
-e "s/sv_password.*/sv_password ${CS2_PW}/g" \
|
||||
-e "s/rcon_password.*/rcon_password ${CS2_RCONPW}/g" \
|
||||
-e "s/tv_enable./tv_enable ${TV_ENABLE}/g" \
|
||||
-e "s/tv_port.*/tv_port ${TV_PORT}/g" \
|
||||
-e "s/tv_autorecord.*/tv_autorecord ${TV_AUTORECORD}/g" \
|
||||
-e "s/tv_enable.*/tv_enable ${TV_PW}/g" \
|
||||
-e "s/tv_relay_pw.*/tv_relay_pw ${TV_RELAY_PW}/g" \
|
||||
-e "s/tv_maxrate.*/tv_maxrate ${TV_MAXRATE}/g" \
|
||||
-e "s/tv_delay.*/tv_delay ${TV_DELAY}/g" \
|
||||
"${STEAMAPPDIR}"/game/csgo/cfg/server.cfg
|
||||
|
||||
# Install hooks
|
||||
if [[ ! -f "${STEAMAPPDIR}/pre.sh" ]] ; then
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
// Server Defaults
|
||||
|
||||
hostname "changeme" // Set server hostname
|
||||
sv_cheats 0 // Enable or disable cheats
|
||||
sv_hibernate_when_empty 0 // Disable server hibernation
|
||||
|
||||
// Passwords
|
||||
|
|
Loading…
Reference in New Issue