Add Wasted and update SuperTuxKart

This commit is contained in:
DeathByDenim 2024-01-19 02:56:50 -05:00
parent 19bfb4303a
commit f6d1b21f80
Signed by: DeathByDenim
GPG Key ID: 4A475283D925365B
5 changed files with 131 additions and 42 deletions

View File

@ -47,6 +47,7 @@ export unvanquished_version="latest"
export xonotic_version="0.8.6" export xonotic_version="0.8.6"
export lix_version="latest" export lix_version="latest"
export shatteredparadise_version="latest" export shatteredparadise_version="latest"
export wasted_version="0.3.0"
export systemuser="onfoss" export systemuser="onfoss"
export letsencryptemail="tzz953vin5nzp60pw6okqh2v0s24n48@onfoss.org" export letsencryptemail="tzz953vin5nzp60pw6okqh2v0s24n48@onfoss.org"
@ -108,7 +109,8 @@ armagetron_advanced \
opensoldat \ opensoldat \
supertuxparty \ supertuxparty \
ufoai \ ufoai \
shatteredparadise" shatteredparadise \
wasted"
failed_games="" failed_games=""
for game in $games; do for game in $games; do
if ! "$(dirname "$0")"/scripts/deploy_${game}.sh; then if ! "$(dirname "$0")"/scripts/deploy_${game}.sh; then

View File

@ -36,28 +36,28 @@ fi
stk_dir="/opt/SuperTuxKart-${stk_version}" stk_dir="/opt/SuperTuxKart-${stk_version}"
mkdir -p ${stk_dir} mkdir -p ${stk_dir}
curl --location "https://github.com/supertuxkart/stk-code/releases/download/${stk_version}/SuperTuxKart-${stk_version}-linux-x86_64.tar.xz" | tar --extract --xz --no-same-owner --strip-components=1 --directory=${stk_dir} curl --location "https://github.com/supertuxkart/stk-code/releases/download/${stk_version}/SuperTuxKart-${stk_version}-linux-x86_64.tar.xz" | tar --extract --xz --no-same-owner --strip-components=1 --directory=${stk_dir}
#
builddir=""${TMPDIR:-/tmp}/stk-build"" # builddir=""${TMPDIR:-/tmp}/stk-build""
if [ -d "$builddir" ]; then # if [ -d "$builddir" ]; then
rm -rf "$builddir" # rm -rf "$builddir"
fi # fi
mkdir -p "$builddir" # mkdir -p "$builddir"
curl --location "https://github.com/supertuxkart/stk-code/archive/refs/tags/${stk_version}.tar.gz" | tar --extract --gz --no-same-owner --directory=$builddir # curl --location "https://github.com/supertuxkart/stk-code/archive/refs/tags/${stk_version}.tar.gz" | tar --extract --gz --no-same-owner --directory=$builddir
svn co https://svn.code.sf.net/p/supertuxkart/code/stk-assets ${builddir}/stk-assets # svn co https://svn.code.sf.net/p/supertuxkart/code/stk-assets ${builddir}/stk-assets
patch -p1 -d "$builddir"/stk-code-${stk_version}/ < "$(dirname $0)"/../configs/stkranking.patch # patch -p1 -d "$builddir"/stk-code-${stk_version}/ < "$(dirname $0)"/../configs/stkranking.patch
mkdir -p "$builddir"/build # mkdir -p "$builddir"/build
cd "$builddir"/build # cd "$builddir"/build
cmake ../stk-code-${stk_version}/ -DCMAKE_INSTALL_PREFIX=/opt/SuperTuxKart-${stk_version}/ -DSERVER_ONLY=On # cmake ../stk-code-${stk_version}/ -DCMAKE_INSTALL_PREFIX=/opt/SuperTuxKart-${stk_version}/ -DSERVER_ONLY=On
make -j 2 # make -j 2
make install # make install
rm -rf "$builddir" # rm -rf "$builddir"
ln -s ${stk_dir}/bin/supertuxkart /usr/games/supertuxkart ln -s ${stk_dir}/bin/supertuxkart /usr/games/supertuxkart
# Configuration # Configuration
mkdir -p /etc/supertuxkart mkdir -p /etc/supertuxkart
cp "$(dirname $0)"/../configs/supertuxkart.xml /etc/supertuxkart/supertuxkart.xml cp "$(dirname $0)"/../configs/supertuxkart.xml /etc/supertuxkart/supertuxkart.xml
touch /etc/supertuxkart/stkservers.db # touch /etc/supertuxkart/stkservers.db
chown -R ${systemuser}: /etc/supertuxkart chown -R ${systemuser}: /etc/supertuxkart
# Create SystemD unit # Create SystemD unit
@ -65,6 +65,7 @@ cat > /etc/systemd/system/supertuxkart.service <<EOF
[Unit] [Unit]
Description=SuperTuxKart server Description=SuperTuxKart server
After=network.target After=network.target
Conflicts=wasted.service
[Service] [Service]
ExecStart=${stk_dir}/bin/supertuxkart --server-config=/etc/supertuxkart/supertuxkart.xml --lan-server=onFOSS ExecStart=${stk_dir}/bin/supertuxkart --server-config=/etc/supertuxkart/supertuxkart.xml --lan-server=onFOSS
@ -78,28 +79,28 @@ EOF
# SuperTuxKart scoring # SuperTuxKart scoring
cp "$(dirname $0)"/../services/supertuxkartscores.py ${stk_dir} cp "$(dirname $0)"/../services/supertuxkartscores.py ${stk_dir}
cat > /etc/nginx/gameserver.d/supertuxkart.conf <<EOF # cat > /etc/nginx/gameserver.d/supertuxkart.conf <<EOF
location /dynamic/supertuxkartscore.json { # location /dynamic/supertuxkartscore.json {
proxy_pass http://localhost:9985/; # proxy_pass http://localhost:9985/;
} # }
EOF # EOF
#
cat > /etc/systemd/system/supertuxkartscores.service <<EOF # cat > /etc/systemd/system/supertuxkartscores.service <<EOF
[Unit] # [Unit]
Description=SuperTuxKart score service # Description=SuperTuxKart score service
After=network.target supertuxkart.service # After=network.target supertuxkart.service
#
[Service] # [Service]
ExecStart=${stk_dir}/supertuxkartscores.py # ExecStart=${stk_dir}/supertuxkartscores.py
Restart=on-failure # Restart=on-failure
User=${systemuser} # User=${systemuser}
#
[Install] # [Install]
WantedBy=multi-user.target # WantedBy=multi-user.target
EOF # EOF
systemctl daemon-reload systemctl daemon-reload
systemctl enable --now supertuxkart.service supertuxkartscores.service systemctl enable --now supertuxkart.service #supertuxkartscores.service
# Add firewall rules # Add firewall rules
firewall-cmd --zone=public --add-port=2757/udp --permanent firewall-cmd --zone=public --add-port=2757/udp --permanent

59
scripts/deploy_wasted.sh Executable file
View File

@ -0,0 +1,59 @@
#!/bin/sh
# Collection of scripts to deploy a server hosting several open-source games
# Copyright (C) 2022 Jarno van der Kolk
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
set -e
apt install --assume-yes fuse3
echo "Installing Wasted ${wasted_version}"
if [ -e /etc/systemd/system/wasted.service ]; then
systemctl stop wasted
fi
# Install Wasted
wasted_dir="/opt/Wasted-${wasted_version}"
mkdir -p ${wasted_dir}
curl --location "https://codeberg.org/wastedgames/wasted-releases/raw/branch/main/${wasted_version}/wasted-64bit.AppImage" > "${wasted_dir}"/wasted-64bit.AppImage
chmod +x "${wasted_dir}"/wasted-64bit.AppImage
# Configuration
mkdir -p /etc/wasted
chown -R ${systemuser}: /etc/wasted
# Create SystemD unit
cat > /etc/systemd/system/wasted.service <<EOF
[Unit]
Description=Wasted server
After=network.target
Conflicts=supertuxkart.service
[Service]
ExecStart="${wasted_dir}"/wasted-64bit.AppImage --server-config=/etc/wasted/wasted.xml --lan-server=onFOSS
Restart=on-failure
User=${systemuser}
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
#systemctl enable --now wasted.service
# Add firewall rules
firewall-cmd --zone=public --add-port=2757/udp --permanent
firewall-cmd --zone=public --add-port=2759/udp --permanent

View File

@ -1,5 +1,28 @@
- date: 2024-02-17T12:00:00UTC
intro: "onFOSS-LAN hosted by hribhrib"
games:
- time: "12:00"
title: "Get and chill together"
- time: "13:00"
title: "Minetest CTF"
- time: "14:30"
title: "Wasted (LIVESTREAM)"
- time: "15:30"
title: "Break"
- time: "16:00"
title: "Armagetron Advanced Tournament (LIVESTREAM)"
tournament: true
- time: "17:00"
title: "Break"
- time: "17:30"
title: "Community Pick"
- time: "18:30"
title: "Hedgewars"
- time: "19:30"
title: "Free Play!"
extras: ["OpenSpades", "OpenHV"]
- date: 2023-09-23T12:00:00UTC - date: 2023-09-23T12:00:00UTC
intro: "onFOSS-LAN hosted by DeathByDenim" intro: "onFOSS-LAN hosted by DeathByDenim livestream by SporeTec"
games: games:
- time: "12:00" - time: "12:00"
title: "Get and chill together" title: "Get and chill together"
@ -21,7 +44,7 @@
- time: "19:30" - time: "19:30"
title: "Free Play!" title: "Free Play!"
- date: 2023-05-06T12:00:00UTC - date: 2023-05-06T12:00:00UTC
intro: "onFOSS-LAN hosted by hribhrib" intro: "onFOSS-LAN hosted and livestream by hribhrib"
games: games:
- time: "12:00" - time: "12:00"
title: "Get and chill together" title: "Get and chill together"

View File

@ -33,7 +33,7 @@
download_link: "https://www.hedgewars.org/download.html" download_link: "https://www.hedgewars.org/download.html"
- name: hypersomnia - name: hypersomnia
title: "Hypersomnia" title: "Hypersomnia"
description: "Hypersomnia is a fast-paced top-down arena." description: "Hypersomnia is a fast-paced top-down arena shooter."
download_link: "https://hypersomnia.xyz/" download_link: "https://hypersomnia.xyz/"
- name: lix - name: lix
title: "Lix" title: "Lix"
@ -52,8 +52,8 @@
- ["runwave", "Trigger the next wave"] - ["runwave", "Trigger the next wave"]
- ["kick <name>", "Kick a person by name"] - ["kick <name>", "Kick a person by name"]
- name: minetest - name: minetest
title: "Minetest (Blockbomber)" title: "Minetest"
description: "The classic Bomberman game in 3D as a mod for Minetest" description: "Minetest is a sandbox game with great mod support"
download_link: "https://www.minetest.net/downloads/" download_link: "https://www.minetest.net/downloads/"
- name: odamex - name: odamex
title: "Odamex" title: "Odamex"
@ -112,6 +112,10 @@
- ["/listplayers", "List current players in-game"] - ["/listplayers", "List current players in-game"]
- ["/kick <name>", "Kick the player"] - ["/kick <name>", "Kick the player"]
- ["/nextmap", "Go to the next map in the rotation"] - ["/nextmap", "Go to the next map in the rotation"]
- name: wasted
title: "Wasted"
description: "Wasted is a cool derby destruction online game where your objective is to push off the map your enemies. Last one standing is the winner. "
download_link: "https://codeberg.org/wastedgames/wasted-code/releases"
- name: xonotic - name: xonotic
title: "Xonotic" title: "Xonotic"
description: "First-person shooter where players compete in a 3D world. It features Battle Royale mode." description: "First-person shooter where players compete in a 3D world. It features Battle Royale mode."