split into two commits one for nftables and one for srb2kart
This commit is contained in:
parent
efd70116f1
commit
53d2c6716e
8 changed files with 82 additions and 7 deletions
|
@ -8,6 +8,7 @@ define wg_port = 51820
|
||||||
define dns_port = 53
|
define dns_port = 53
|
||||||
define srt_input_udp_port = 60001
|
define srt_input_udp_port = 60001
|
||||||
define srt_output_port = 60000
|
define srt_output_port = 60000
|
||||||
|
define srb2kart_port = 5029
|
||||||
|
|
||||||
table inet filter {
|
table inet filter {
|
||||||
chain input_ipv4 {
|
chain input_ipv4 {
|
||||||
|
@ -66,6 +67,7 @@ table inet filter {
|
||||||
|
|
||||||
udp dport {
|
udp dport {
|
||||||
$srt_output_port,
|
$srt_output_port,
|
||||||
|
$srb2kart_port,
|
||||||
} accept
|
} accept
|
||||||
|
|
||||||
# allow loopback traffic, anything else jump to chain for further evaluation
|
# allow loopback traffic, anything else jump to chain for further evaluation
|
||||||
|
|
|
@ -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
|
|
8
deploy/shione/srb2kart/deploy.sh
Executable file
8
deploy/shione/srb2kart/deploy.sh
Executable file
|
@ -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
|
45
deploy/shione/srb2kart/dkartconfig.cfg
Normal file
45
deploy/shione/srb2kart/dkartconfig.cfg
Normal file
|
@ -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
|
|
@ -27,10 +27,17 @@ if [ -e dkartconfig.cfg ]; then
|
||||||
rm -- dkartconfig.cfg
|
rm -- dkartconfig.cfg
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -e dkartconfig_generated.cfg ]; then
|
||||||
|
rm -- dkartconfig_generated.cfg
|
||||||
|
fi
|
||||||
|
|
||||||
cp -- dkartconfig_base.cfg dkartconfig.cfg
|
cp -- dkartconfig_base.cfg dkartconfig.cfg
|
||||||
|
|
||||||
# NOTE: `find` does not offer a way to guarantee a desired sort of its output.
|
# 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
|
if [ -e mods/index ]; then
|
||||||
rm -rf -- mods/index
|
rm -rf -- mods/index
|
||||||
|
|
|
@ -15,7 +15,8 @@ apt install \
|
||||||
libpng-dev \
|
libpng-dev \
|
||||||
libcurl4-openssl-dev \
|
libcurl4-openssl-dev \
|
||||||
libgme-dev \
|
libgme-dev \
|
||||||
libopenmpt-dev
|
libopenmpt-dev \
|
||||||
|
byobu
|
||||||
|
|
||||||
# The user `srb2kart` is used by default here.
|
# The user `srb2kart` is used by default here.
|
||||||
su srb2kart
|
su srb2kart
|
||||||
|
|
17
deploy/shione/srb2kart/srb2kart.service
Normal file
17
deploy/shione/srb2kart/srb2kart.service
Normal file
|
@ -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
|
Loading…
Reference in a new issue