Crispy Doom server behind doom.jerryaldrichiii.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

27 lines
645 B

#!/bin/bash
set -e
BOT_COUNT=${BOT_COUNT:-0}
if [ -n "$SV_HOSTNAME" ]; then
echo "set sv_hostname $SV_HOSTNAME" >> /srv/server.cfg
fi
if [ -n "$RCON_PASSWORD" ]; then
echo "set sv_rconpassword $RCON_PASSWORD" >> /srv/server.cfg
fi
# As of Zandrodum 3.0.0 we have to use `+addbot` instead using server.cfg
# https://zandronum.com/forum/viewtopic.php?t=8073<Paste>
ADDBOT_CMDS=""
for _ in $(seq $BOT_COUNT); do
ADDBOT_CMDS+='+addbot "" '
done
PORT=${PORT:-10666}
GAMETYPE=${GAMETYPE:-Deathmatch}
SV_ARGS="+exec server.cfg -port $PORT $ADDBOT_CMDS +$GAMETYPE true"
cd /srv/ && LD_LIBRARY_PATH=libs sh -c "./zandronum-server $SV_ARGS"