Deploy Xonotic Batte Royale git branch
This commit is contained in:
parent
f11d151924
commit
e92539c4fc
|
@ -77,6 +77,7 @@ cp console2web/console2web.py /usr/bin/console2web
|
||||||
"$(dirname "$0")"/scripts/deploy_teeworlds.sh
|
"$(dirname "$0")"/scripts/deploy_teeworlds.sh
|
||||||
"$(dirname "$0")"/scripts/deploy_unvanquished.sh
|
"$(dirname "$0")"/scripts/deploy_unvanquished.sh
|
||||||
"$(dirname "$0")"/scripts/deploy_xonotic.sh
|
"$(dirname "$0")"/scripts/deploy_xonotic.sh
|
||||||
|
"$(dirname "$0")"/scripts/deploy_xonotic-br.sh
|
||||||
"$(dirname "$0")"/scripts/deploy_armagetron_advanced.sh
|
"$(dirname "$0")"/scripts/deploy_armagetron_advanced.sh
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
|
|
@ -0,0 +1,72 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ -e /etc/systemd/system/xonotic-br.service ]; then
|
||||||
|
systemctl stop xonotic-br
|
||||||
|
fi
|
||||||
|
|
||||||
|
apt install autoconf automake build-essential curl git libtool libgmp-dev \
|
||||||
|
libjpeg62-turbo-dev libsdl2-dev libxpm-dev xserver-xorg-dev \
|
||||||
|
zlib1g-dev unzip zip
|
||||||
|
|
||||||
|
# Xonotic Battle Royale branch
|
||||||
|
xonotic_directory="/opt/xonotic-br"
|
||||||
|
mkdir -p "${xonotic_directory}"
|
||||||
|
git clone https://gitlab.com/xonotic/xonotic.git ${xonotic_directory}
|
||||||
|
cd ${xonotic_directory}
|
||||||
|
./all update -l best
|
||||||
|
./all checkout Juhu/battle-royale
|
||||||
|
./all compile -r dedicated
|
||||||
|
|
||||||
|
mkdir -p ${systemuserhome}/xonotic-br/data
|
||||||
|
chown -R ${systemuser}: ${systemuserhome}/xonotic-br
|
||||||
|
|
||||||
|
cat > ${systemuserhome}/xonotic-br/data/server.cfg <<EOF
|
||||||
|
sv_public 0
|
||||||
|
hostname "onFOSS"
|
||||||
|
maxplayers 64
|
||||||
|
port 26000
|
||||||
|
log_file "server.log"
|
||||||
|
g_start_delay 15
|
||||||
|
g_maplist "implosion glowplant dance geoplanetary"
|
||||||
|
g_maplist_shuffle 1
|
||||||
|
gametype br
|
||||||
|
rcon_password "onFOSS"
|
||||||
|
bot_number 4
|
||||||
|
skill 8
|
||||||
|
minplayers 4
|
||||||
|
bot_prefix [BOT]
|
||||||
|
g_maplist_votable 6
|
||||||
|
sv_weaponstats_file http://www.xonotic.org/weaponbalance/
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat > /etc/systemd/system/xonotic-br.service <<EOF
|
||||||
|
[Unit]
|
||||||
|
Description=Xonotic Battle Royale server
|
||||||
|
After=network.target
|
||||||
|
Conflicts=xonotic.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
WorkingDirectory=${xonotic_directory}
|
||||||
|
ExecStart=/usr/bin/console2web -p 62550 ${xonotic_directory}/all run dedicated +serverconfig server.cfg -userdir ${systemuserhome}/xonotic-br
|
||||||
|
Restart=on-failure
|
||||||
|
User=${systemuser}
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
|
||||||
|
systemctl daemon-reload
|
||||||
|
#systemctl enable --now xonotic-br.service
|
||||||
|
|
||||||
|
cat > /etc/nginx/gameserver.d/xonotic.conf <<EOF
|
||||||
|
location /xonotic {
|
||||||
|
proxy_pass http://localhost:62550/;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade \$http_upgrade;
|
||||||
|
proxy_set_header Connection "Upgrade";
|
||||||
|
proxy_set_header Host \$host;
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
firewall-cmd --zone=public --add-port=26000/udp --permanent
|
|
@ -41,6 +41,7 @@ cat > /etc/systemd/system/xonotic.service <<EOF
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Xonotic server
|
Description=Xonotic server
|
||||||
After=network.target
|
After=network.target
|
||||||
|
Conflicts=xonotic-br.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
WorkingDirectory=${xonotic_directory}/Xonotic
|
WorkingDirectory=${xonotic_directory}/Xonotic
|
||||||
|
|
Reference in New Issue