diff options
author | Renken <renken@shione.net> | 2024-01-20 21:26:36 +0100 |
---|---|---|
committer | Renken <renken@shione.net> | 2024-05-12 16:49:35 +0200 |
commit | 53d2c6716e6fcedc9c21fb3933ffa4a007654dc2 (patch) | |
tree | 4db3ddcfb245efb08d259e9708f1b59248bd5282 | |
parent | efd70116f17350310a7093b78faaa0eaafa471d5 (diff) | |
download | shione-53d2c6716e6fcedc9c21fb3933ffa4a007654dc2.tar.gz shione-53d2c6716e6fcedc9c21fb3933ffa4a007654dc2.zip |
split into two commits one for nftables and one for srb2kart
-rw-r--r-- | config/shione/nftables/files/etc/nftables.conf | 2 | ||||
-rw-r--r-- | deploy/shione/srb2kart/dconfig.cfg | 5 | ||||
-rwxr-xr-x | deploy/shione/srb2kart/deploy.sh | 8 | ||||
-rw-r--r-- | deploy/shione/srb2kart/dkartconfig.cfg | 45 | ||||
-rwxr-xr-x | deploy/shione/srb2kart/generate_dkartconfig.sh | 9 | ||||
-rw-r--r-- | deploy/shione/srb2kart/mods/000-pre/p1 | 0 | ||||
-rw-r--r-- | deploy/shione/srb2kart/setup.sh | 3 | ||||
-rw-r--r-- | deploy/shione/srb2kart/srb2kart.service | 17 |
8 files changed, 82 insertions, 7 deletions
diff --git a/config/shione/nftables/files/etc/nftables.conf b/config/shione/nftables/files/etc/nftables.conf index 516718d..3365e34 100644 --- a/config/shione/nftables/files/etc/nftables.conf +++ b/config/shione/nftables/files/etc/nftables.conf @@ -8,6 +8,7 @@ define wg_port = 51820 define dns_port = 53 define srt_input_udp_port = 60001 define srt_output_port = 60000 +define srb2kart_port = 5029 table inet filter { chain input_ipv4 { @@ -66,6 +67,7 @@ table inet filter { udp dport { $srt_output_port, + $srb2kart_port, } accept # allow loopback traffic, anything else jump to chain for further evaluation diff --git a/deploy/shione/srb2kart/dconfig.cfg b/deploy/shione/srb2kart/dconfig.cfg deleted file mode 100644 index 7d2695b..0000000 --- a/deploy/shione/srb2kart/dconfig.cfg +++ /dev/null @@ -1,5 +0,0 @@ -addfile mods/000-pre/p1 -addfile mods/001-chars/c1 -addfile mods/001-chars/c2 -addfile mods/002-tracks/t1 -addfile mods/003-post/po1 diff --git a/deploy/shione/srb2kart/deploy.sh b/deploy/shione/srb2kart/deploy.sh new file mode 100755 index 0000000..0209dd6 --- /dev/null +++ b/deploy/shione/srb2kart/deploy.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +set -eu + +./generate_dkartconfig.sh + +rsync -a --progress srb2kart.service srb2kart@shione:/home/srb2kart/.config/systemd/user +rsync -a --delete --progress dkartconfig.cfg mods srb2kart@shione:/home/srb2kart/.srb2kart diff --git a/deploy/shione/srb2kart/dkartconfig.cfg b/deploy/shione/srb2kart/dkartconfig.cfg new file mode 100644 index 0000000..39c9205 --- /dev/null +++ b/deploy/shione/srb2kart/dkartconfig.cfg @@ -0,0 +1,45 @@ +// SRB2Kart configuration file. +execversion "10" +flipcam4 "No" +flipcam3 "No" +flipcam2 "No" +flipcam "No" +homremoval "Yes" +discordinvites "Everyone" +pingmeasurement "Frames" +showping "Always" +maxdelaytimeout "10" +maxdelay "20" +cpusleep "1" +skipmapcheck "Off" +kicktime "10" +jointimeout "210" +nettimeout "210" +blamecfail "Off" +showjoinaddress "On" +allowjoin "On" +http_source "http://shione.net/srb2kart/assets" +downloadspeed "32" +noticedownload "Off" +maxsend "51200" +resynchattempts "2" +maxplayers "16" +kartvoices "Tasteful" +kartdisplayspeed "Off" +kartinvinsfx "SFX" +kartcheck "Yes" +kartminimap "4" +server_contact "renken@shione.net" +servername "shione" +holepunchserver "relay.kartkrew.org" +masterserver_nagattempts "5" +masterserver_token "" +masterserver_debug "Off" +masterserver_timeout "5" +masterserver_update_rate "15" +masterserver "https://ms.kartkrew.org/ms/api" +addfile mods/000-pre/p1 +addfile mods/001-chars/c1 +addfile mods/001-chars/c2 +addfile mods/002-tracks/t1 +addfile mods/003-post/po1 diff --git a/deploy/shione/srb2kart/generate_dkartconfig.sh b/deploy/shione/srb2kart/generate_dkartconfig.sh index e2799d9..23d2d4a 100755 --- a/deploy/shione/srb2kart/generate_dkartconfig.sh +++ b/deploy/shione/srb2kart/generate_dkartconfig.sh @@ -27,10 +27,17 @@ if [ -e dkartconfig.cfg ]; then rm -- dkartconfig.cfg fi +if [ -e dkartconfig_generated.cfg ]; then + rm -- dkartconfig_generated.cfg +fi + cp -- dkartconfig_base.cfg dkartconfig.cfg # NOTE: `find` does not offer a way to guarantee a desired sort of its output. -find mods -type f -printf 'addfile %p\n' | sort >dkartconfig.cfg +find mods -type f -printf 'addfile %p\n' | sort >dkartconfig_generated.cfg + +cat -- dkartconfig_generated.cfg >>dkartconfig.cfg +rm -- dkartconfig_generated.cfg if [ -e mods/index ]; then rm -rf -- mods/index diff --git a/deploy/shione/srb2kart/mods/000-pre/p1 b/deploy/shione/srb2kart/mods/000-pre/p1 deleted file mode 100644 index e69de29..0000000 --- a/deploy/shione/srb2kart/mods/000-pre/p1 +++ /dev/null diff --git a/deploy/shione/srb2kart/setup.sh b/deploy/shione/srb2kart/setup.sh index 70eb956..1a814bd 100644 --- a/deploy/shione/srb2kart/setup.sh +++ b/deploy/shione/srb2kart/setup.sh @@ -15,7 +15,8 @@ apt install \ libpng-dev \ libcurl4-openssl-dev \ libgme-dev \ - libopenmpt-dev + libopenmpt-dev \ + byobu # The user `srb2kart` is used by default here. su srb2kart diff --git a/deploy/shione/srb2kart/srb2kart.service b/deploy/shione/srb2kart/srb2kart.service new file mode 100644 index 0000000..d9806ba --- /dev/null +++ b/deploy/shione/srb2kart/srb2kart.service @@ -0,0 +1,17 @@ +[Unit] +Description=SRB2Kart Server +After=network.target +StartLimitIntervalSec=0 + +[Service] +PermissionsStartOnly=false +Environment=LC_ALL=C +ExecStart=/usr/bin/byobu new-session -ds srb2kart srb2kartd +Type=forking +RemainAfterExit=false +Restart=always +RestartSec=1s +TimeoutSec=180 + +[Install] +WantedBy=default.target |