diff --git a/deploy.sh b/deploy.sh index 30764ba..84024df 100755 --- a/deploy.sh +++ b/deploy.sh @@ -21,6 +21,7 @@ export openhv_version="20220128" export teeworlds_version="0.7.5" export unvanquished_version="0.52.1" export xonotic_version="0.8.2" +export lix_version="0.9.41" export systemuser="onfoss" export letsencryptemail="jarno@jarno.ca" @@ -32,7 +33,8 @@ apt install --assume-yes \ python3-dev apt virtualenv python3-virtualenv libjpeg-dev zlib1g-dev \ fuse g++ gcc curl firewalld automake autoconf libtool \ libcurl3-dev libc-ares-dev zlib1g-dev libncurses-dev make python3-aiohttp \ - nginx-core certbot python3-certbot-nginx sudo python3-psutil + nginx-core certbot python3-certbot-nginx sudo python3-psutil \ + ldc dub libenet-dev # Create the user for running the game servers if ! getent passwd ${systemuser}; then @@ -54,6 +56,7 @@ cp console2web/console2web.py /usr/bin/console2web "$(dirname "$0")"/scripts/deploy_supertuxkart.sh "$(dirname "$0")"/scripts/deploy_bzflag.sh "$(dirname "$0")"/scripts/deploy_hedgewars.sh +"$(dirname "$0")"/scripts/deploy_lix.sh "$(dirname "$0")"/scripts/deploy_mindustry.sh "$(dirname "$0")"/scripts/deploy_openhv.sh "$(dirname "$0")"/scripts/deploy_openspades.sh diff --git a/scripts/deploy_lix.sh b/scripts/deploy_lix.sh new file mode 100644 index 0000000..171a8ac --- /dev/null +++ b/scripts/deploy_lix.sh @@ -0,0 +1,40 @@ +#!/bin/bash +set -e + +if [ -e /etc/systemd/system/lix.service ]; then + systemctl stop lix +fi + +# Install Lix +mkdir -p ${TMPDIR:-/tmp}/lix-build +cd ${TMPDIR:-/tmp}/lix-build +if [ -d LixD ]; then + rm -rf LixD +fi +git clone --branch v${lix_version} https://github.com/SimonN/LixD.git +cd LixD/src/server +dub build +mkdir -p /opt/lix-${lix_version} +cp ../../bin/server /opt/lix-${lix_version} +rm -rf ${TMPDIR:-/tmp}/lix-build + +# Create SystemD unit +cat > /etc/systemd/system/lix.service <