Compare commits

...

2 Commits

Author SHA1 Message Date
Astra 23a8b46500 Fix sed 2024-01-08 23:33:11 +00:00
Astra 02217e54d8 Newline 2024-01-08 23:33:04 +00:00
2 changed files with 15 additions and 12 deletions

View File

@ -13,17 +13,20 @@ 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" \
-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" \
sed -r -i -e "s/^(hostname) .*/\1 ${CS2_SERVERNAME}/g" \
-e "s/^(sv_cheats) .*/\1 ${CS2_CHEATS}/g" \
-e "s/^(sv_hibernate_when_empty) .*/\1 ${CS2_SERVER_HIBERNATE}/g" \
-e "s/^(sv_password) .*/\1 ${CS2_PW}/g" \
-e "s/^(rcon_password) .*/\1 ${CS2_RCONPW}/g" \
-e "s/^(tv_enable) .*/\1 ${TV_ENABLE}/g" \
-e "s/^(tv_port) .*/\1 ${TV_PORT}/g" \
-e "s/^(tv_autorecord) .*/\1 ${TV_AUTORECORD}/g" \
-e "s/^(tv_password) .*/\1 ${TV_PW}/g" \
-e "s/^(tv_relaypassword) .*/\1 ${TV_RELAY_PW}/g" \
-e "s/^(tv_maxrate) .*/\1 ${TV_MAXRATE}/g" \
-e "s/^(tv_delay) .*/\1 ${TV_DELAY}/g" \
-e "s/^(tv_name) .*/\1 ${CS2_SERVERNAME} CSTV/g" \
-e "s/^(tv_title) .*/\1${CS2_SERVERNAME} CSTV/g" \
"${STEAMAPPDIR}"/game/csgo/cfg/server.cfg
# Install hooks

View File

@ -34,4 +34,4 @@ tv_relaypassword "changeme" // CSTV password for relay proxies
tv_relayvoice 1 // Relay voice data: 0=off, 1=on
tv_timeout 60 // CSTV connection timeout in seconds.
tv_title "changeme" // Set title for CSTV spectator UI
tv_transmitall 1 // Transmit all entities (not only director view)
tv_transmitall 1 // Transmit all entities (not only director view)