summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authordplusplus2022-01-30 14:23:36 -0800
committerdplusplus2022-01-30 14:23:36 -0800
commit0bf755ec2782bd1da7a1fe64d6305def65cb3405 (patch)
treeb99c3db97816464035f5924f7de23d2a1df3657a
parent6056a0bbd16d366d879e0b1ad650d3df6eaa9ee3 (diff)
downloadaur-0bf755ec2782bd1da7a1fe64d6305def65cb3405.tar.gz
Stop putting certain log files in '/var/log/tshock', and put every TShock config and log file in '/var/lib/tshock'
'TerrariaServer.exe' provides command line arguments for specifying paths to only some files. 'TerrariaServer.exe' seems to unconditionally create files in the current working folder, with no obvious way to set other locations for many files.
-rw-r--r--PKGBUILD2
-rw-r--r--tshock.sh2
-rw-r--r--tshock.tmpfiles2
-rw-r--r--tshock@.service4
4 files changed, 4 insertions, 6 deletions
diff --git a/PKGBUILD b/PKGBUILD
index a93abec528b5..fafc6c073661 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,7 @@ pkgname=${_pkgname}-bin
pkgver=4.5.12
# Because of tag 4.2200 is 4.2.2.1228 and tag 4.2202 is 4.2.2.0224 epoch must be 1
epoch=1
-pkgrel=2
+pkgrel=3
pkgdesc="A Terraria Server administration modification that runs on the open source TerrariaAPI."
arch=("x86_64" "aarch64")
url="https://github.com/Pryaxis/TShock"
diff --git a/tshock.sh b/tshock.sh
index 021e29a3b3b5..d05cb19caf0f 100644
--- a/tshock.sh
+++ b/tshock.sh
@@ -64,7 +64,7 @@ case "$1" in
else
echo "starting '${INSTANCE}'"
tmux new-session -d -s "${TMUX_CONSOLE}"
- mono --server --gc=sgen -O=all /srv/tshock/TerrariaServer.exe -port ${PORT} -logpath /var/log/tshock/${INSTANCE} -worldpath ${WORLDDIR} -world ${WORLDDIR}/${WORLD}.wld -autocreate ${SIZE}
+ mono --server --gc=sgen -O=all /srv/tshock/TerrariaServer.exe -port ${PORT} -logpath ${BASEDIR}/${INSTANCE} -worldpath ${WORLDDIR} -world ${WORLDDIR}/${WORLD}.wld -autocreate ${SIZE}
if [ $? -gt 0 ]; then
echo "Could not start instance '${INSTANCE}'"
exit 1
diff --git a/tshock.tmpfiles b/tshock.tmpfiles
index ba85e355e69e..034c026ff164 100644
--- a/tshock.tmpfiles
+++ b/tshock.tmpfiles
@@ -2,5 +2,3 @@ d /srv/tshock 0755 root root -
d /var/lib/tshock 0755 terraria terraria -
d /var/lib/tshock/Terraria 0755 terraria terraria -
d /var/lib/tshock/Terraria/Worlds 0755 terraria terraria -
-d /var/log/tshock 0755 terraria terraria -
-d /var/log/tshock/serverlog 0755 terraria terraria -
diff --git a/tshock@.service b/tshock@.service
index 6fdbc9124ae6..593991fd4572 100644
--- a/tshock@.service
+++ b/tshock@.service
@@ -9,8 +9,8 @@ Group=terraria
ExecStart=/usr/bin/tshock start %i
ExecStop=/usr/bin/tshock stop %i
-# `TerrariaServer.exe` always writes to a log file named 'ServerLog.txt' in the working folder
-WorkingDirectory=/var/log/tshock/serverlog
+# `TerrariaServer.exe` always writes log files in the working folder
+WorkingDirectory=/var/lib/tshock
[Install]
WantedBy=multi-user.target