aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/shione
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/shione')
-rw-r--r--deploy/shione/srb2kart/dconfig.cfg5
-rwxr-xr-xdeploy/shione/srb2kart/deploy.sh8
-rw-r--r--deploy/shione/srb2kart/dkartconfig.cfg45
-rwxr-xr-xdeploy/shione/srb2kart/generate_dkartconfig.sh9
-rw-r--r--deploy/shione/srb2kart/mods/000-pre/p10
-rw-r--r--deploy/shione/srb2kart/setup.sh3
-rw-r--r--deploy/shione/srb2kart/srb2kart.service17
7 files changed, 80 insertions, 7 deletions
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