diff --git a/deploy.sh b/deploy.sh index ab4ad70..1b229f5 100755 --- a/deploy.sh +++ b/deploy.sh @@ -83,6 +83,7 @@ cp console2web/console2web.py /usr/bin/console2web "$(dirname "$0")"/scripts/deploy_xonotic.sh "$(dirname "$0")"/scripts/deploy_xonotic-br.sh "$(dirname "$0")"/scripts/deploy_armagetron_advanced.sh +"$(dirname "$0")"/scripts/deploy_soldat.sh # Apply all pending firewall rules. NGINX shouldn't have to be restarted, but it seems to help. firewall-cmd --reload diff --git a/scripts/deploy_soldat.sh b/scripts/deploy_soldat.sh new file mode 100755 index 0000000..200062b --- /dev/null +++ b/scripts/deploy_soldat.sh @@ -0,0 +1,167 @@ +#!/bin/bash +set -e + +if [ -e /etc/systemd/system/soldat.service ]; then + systemctl stop soldat +fi + +# Install dependencies +sudo apt-get install build-essential g++ cmake git fpc libprotobuf-dev protobuf-compiler libssl-dev libsdl2-dev libopenal-dev libphysfs-dev libfreetype6 + +# Install BZFlag +builddir=${TMPDIR:-/tmp}/soldat-build +mkdir -p ${builddir} +cd ${builddir} +if [ -d soldat ]; then + rm -rf soldat +fi +git clone https://github.com/Soldat/soldat.git +git clone https://github.com/Soldat/base.git +cd soldat +mkdir build && cd build +cmake -DCMAKE_INSTALL_PREFIX=/opt/soldat .. +make +make install +mkdir -p /opt/soldat/bin/configs +cp -r ${builddir}/base/server/configs/bots /opt/soldat/bin/configs/bots + +if ! [ -L /usr/games/soldatserver ]; then + ln -s /opt/soldat/bin/soldatserver /usr/games/ +fi + +rm -rf ${builddir} + +cat > /opt/soldat/bin/configs/server.cfg < /opt/soldat/bin/configs/mapslist.txt < /etc/systemd/system/soldat.service <