#!/bin/bash set -e if [ -e /etc/systemd/system/xonotic.service ]; then systemctl stop xonotic fi # Xonotic xonotic_directory="/opt/xonotic-${xonotic_version}" curl --location https://dl.xonotic.org/xonotic-${xonotic_version}.zip > ${TMPDIR:-/tmp}/xonotic.zip mkdir -p "${xonotic_directory}" unzip -o -d ${xonotic_directory} ${TMPDIR:-/tmp}/xonotic.zip rm -f ${TMPDIR:-/tmp}/xonotic.zip mkdir -p ${systemuserhome}/xonotic/data chown -R ${systemuser}: ${systemuserhome}/xonotic cat > ${systemuserhome}/xonotic/data/server.cfg < /etc/systemd/system/xonotic.service < /etc/nginx/gameserver.d/xonotic.conf <