Add Wasted and update SuperTuxKart
This commit is contained in:
parent
19bfb4303a
commit
f6d1b21f80
|
@ -47,6 +47,7 @@ export unvanquished_version="latest"
|
|||
export xonotic_version="0.8.6"
|
||||
export lix_version="latest"
|
||||
export shatteredparadise_version="latest"
|
||||
export wasted_version="0.3.0"
|
||||
|
||||
export systemuser="onfoss"
|
||||
export letsencryptemail="tzz953vin5nzp60pw6okqh2v0s24n48@onfoss.org"
|
||||
|
@ -108,7 +109,8 @@ armagetron_advanced \
|
|||
opensoldat \
|
||||
supertuxparty \
|
||||
ufoai \
|
||||
shatteredparadise"
|
||||
shatteredparadise \
|
||||
wasted"
|
||||
failed_games=""
|
||||
for game in $games; do
|
||||
if ! "$(dirname "$0")"/scripts/deploy_${game}.sh; then
|
||||
|
|
|
@ -36,28 +36,28 @@ fi
|
|||
stk_dir="/opt/SuperTuxKart-${stk_version}"
|
||||
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}
|
||||
|
||||
builddir=""${TMPDIR:-/tmp}/stk-build""
|
||||
if [ -d "$builddir" ]; then
|
||||
rm -rf "$builddir"
|
||||
fi
|
||||
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
|
||||
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
|
||||
mkdir -p "$builddir"/build
|
||||
cd "$builddir"/build
|
||||
cmake ../stk-code-${stk_version}/ -DCMAKE_INSTALL_PREFIX=/opt/SuperTuxKart-${stk_version}/ -DSERVER_ONLY=On
|
||||
make -j 2
|
||||
make install
|
||||
rm -rf "$builddir"
|
||||
#
|
||||
# builddir=""${TMPDIR:-/tmp}/stk-build""
|
||||
# if [ -d "$builddir" ]; then
|
||||
# rm -rf "$builddir"
|
||||
# fi
|
||||
# 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
|
||||
# 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
|
||||
# mkdir -p "$builddir"/build
|
||||
# cd "$builddir"/build
|
||||
# cmake ../stk-code-${stk_version}/ -DCMAKE_INSTALL_PREFIX=/opt/SuperTuxKart-${stk_version}/ -DSERVER_ONLY=On
|
||||
# make -j 2
|
||||
# make install
|
||||
# rm -rf "$builddir"
|
||||
|
||||
ln -s ${stk_dir}/bin/supertuxkart /usr/games/supertuxkart
|
||||
|
||||
# Configuration
|
||||
mkdir -p /etc/supertuxkart
|
||||
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
|
||||
|
||||
# Create SystemD unit
|
||||
|
@ -65,6 +65,7 @@ cat > /etc/systemd/system/supertuxkart.service <<EOF
|
|||
[Unit]
|
||||
Description=SuperTuxKart server
|
||||
After=network.target
|
||||
Conflicts=wasted.service
|
||||
|
||||
[Service]
|
||||
ExecStart=${stk_dir}/bin/supertuxkart --server-config=/etc/supertuxkart/supertuxkart.xml --lan-server=onFOSS
|
||||
|
@ -78,28 +79,28 @@ EOF
|
|||
# SuperTuxKart scoring
|
||||
cp "$(dirname $0)"/../services/supertuxkartscores.py ${stk_dir}
|
||||
|
||||
cat > /etc/nginx/gameserver.d/supertuxkart.conf <<EOF
|
||||
location /dynamic/supertuxkartscore.json {
|
||||
proxy_pass http://localhost:9985/;
|
||||
}
|
||||
EOF
|
||||
|
||||
cat > /etc/systemd/system/supertuxkartscores.service <<EOF
|
||||
[Unit]
|
||||
Description=SuperTuxKart score service
|
||||
After=network.target supertuxkart.service
|
||||
|
||||
[Service]
|
||||
ExecStart=${stk_dir}/supertuxkartscores.py
|
||||
Restart=on-failure
|
||||
User=${systemuser}
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
# cat > /etc/nginx/gameserver.d/supertuxkart.conf <<EOF
|
||||
# location /dynamic/supertuxkartscore.json {
|
||||
# proxy_pass http://localhost:9985/;
|
||||
# }
|
||||
# EOF
|
||||
#
|
||||
# cat > /etc/systemd/system/supertuxkartscores.service <<EOF
|
||||
# [Unit]
|
||||
# Description=SuperTuxKart score service
|
||||
# After=network.target supertuxkart.service
|
||||
#
|
||||
# [Service]
|
||||
# ExecStart=${stk_dir}/supertuxkartscores.py
|
||||
# Restart=on-failure
|
||||
# User=${systemuser}
|
||||
#
|
||||
# [Install]
|
||||
# WantedBy=multi-user.target
|
||||
# EOF
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl enable --now supertuxkart.service supertuxkartscores.service
|
||||
systemctl enable --now supertuxkart.service #supertuxkartscores.service
|
||||
|
||||
# Add firewall rules
|
||||
firewall-cmd --zone=public --add-port=2757/udp --permanent
|
||||
|
|
|
@ -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
|
|
@ -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
|
||||
intro: "onFOSS-LAN hosted by DeathByDenim"
|
||||
intro: "onFOSS-LAN hosted by DeathByDenim livestream by SporeTec"
|
||||
games:
|
||||
- time: "12:00"
|
||||
title: "Get and chill together"
|
||||
|
@ -21,7 +44,7 @@
|
|||
- time: "19:30"
|
||||
title: "Free Play!"
|
||||
- date: 2023-05-06T12:00:00UTC
|
||||
intro: "onFOSS-LAN hosted by hribhrib"
|
||||
intro: "onFOSS-LAN hosted and livestream by hribhrib"
|
||||
games:
|
||||
- time: "12:00"
|
||||
title: "Get and chill together"
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
download_link: "https://www.hedgewars.org/download.html"
|
||||
- name: 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/"
|
||||
- name: lix
|
||||
title: "Lix"
|
||||
|
@ -52,8 +52,8 @@
|
|||
- ["runwave", "Trigger the next wave"]
|
||||
- ["kick <name>", "Kick a person by name"]
|
||||
- name: minetest
|
||||
title: "Minetest (Blockbomber)"
|
||||
description: "The classic Bomberman game in 3D as a mod for Minetest"
|
||||
title: "Minetest"
|
||||
description: "Minetest is a sandbox game with great mod support"
|
||||
download_link: "https://www.minetest.net/downloads/"
|
||||
- name: odamex
|
||||
title: "Odamex"
|
||||
|
@ -112,6 +112,10 @@
|
|||
- ["/listplayers", "List current players in-game"]
|
||||
- ["/kick <name>", "Kick the player"]
|
||||
- ["/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
|
||||
title: "Xonotic"
|
||||
description: "First-person shooter where players compete in a 3D world. It features Battle Royale mode."
|
||||
|
|
Loading…
Reference in New Issue