summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorilmikko2016-10-17 21:56:39 +0100
committerilmikko2016-10-17 21:56:39 +0100
commit7d9587c7ab1b45ac3f6e327b0155b70297141a72 (patch)
treef22dfccaf57f9268938ee9a25a04985038c7b974
parent3170c6138e35296c173abbe52377d396d66356ab (diff)
downloadaur-7d9587c7ab1b45ac3f6e327b0155b70297141a72.tar.gz
Now whenever files are referenced in the arguments, the terraria-server converts those filepaths into real paths (absolute ones) so that the binary understands which files we talk about.
Made the config.txt a bit more informative.
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD6
-rw-r--r--config.txt3
-rwxr-xr-xterraria-server12
4 files changed, 19 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c11e6b274348..ffe7e7b87f51 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = terraria-server
pkgdesc = Official dedicated server for Terraria
pkgver = 1.3.3.3
- pkgrel = 11
+ pkgrel = 12
url = https://terraria.org/
install = terraria-server.install
arch = x86_64
@@ -12,9 +12,11 @@ pkgbase = terraria-server
depends = screen
source = http://terraria.org/server/terraria-server-1333.zip
source = terraria-server
+ source = config.txt
source = terraria-server@.service
sha256sums = ecd6ec686d6f46defb3ae0e75d49ce50cd324a4d390fc067177668ea990ad8bc
- sha256sums = 8a7e23efe3f72d8c88024cf32e53daa4b293bb2b17070dbf80e86876af1e22f9
+ sha256sums = 100b68ee3b88e7b095d23cd9d56e9480b21788b5165ebbf752c16b19693299f7
+ sha256sums = 9d93c86ade7c5a6ffe4eb9f8a43e9306f4ca14a8075cb8018334c34fbfc9472e
sha256sums = 27dfa3e01b4da26bccace69bcf02fd91293cac701e48ab358d9495070365c2ac
pkgname = terraria-server
diff --git a/PKGBUILD b/PKGBUILD
index 7b992e20fa99..2ea2465a9f0d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=terraria-server
pkgver=1.3.3.3
-pkgrel=11
+pkgrel=12
pkgdesc="Official dedicated server for Terraria"
arch=('x86_64' 'x86')
license=('unknown')
@@ -19,8 +19,8 @@ source=("http://terraria.org/server/${pkgname}-${_pkgver}.zip"
'terraria-server@.service')
sha256sums=('ecd6ec686d6f46defb3ae0e75d49ce50cd324a4d390fc067177668ea990ad8bc'
- '785b392de5f41654c586e1a323969f07bf09b8f059d917db93d428d785415f49'
- '10cc09e9a49ec0d035f2237b610cca8dcc696d327c6943c575564b5ef83f6860'
+ '100b68ee3b88e7b095d23cd9d56e9480b21788b5165ebbf752c16b19693299f7'
+ '9d93c86ade7c5a6ffe4eb9f8a43e9306f4ca14a8075cb8018334c34fbfc9472e'
'27dfa3e01b4da26bccace69bcf02fd91293cac701e48ab358d9495070365c2ac')
package() {
diff --git a/config.txt b/config.txt
index b9d2b8683ff5..9cd511158473 100644
--- a/config.txt
+++ b/config.txt
@@ -22,6 +22,7 @@
#remove the # in front of commands to enable them.
#Load a world and automatically start the server.
+#Make sure to set the correct permissions - the folder needs to be owned and writable to 'terraria', otherwise the server will crash!
#world=/srv/terraria/world1.wld
#Creates a new world if none is found. World size is specified by: 1(small), 2(medium), and 3(large).
@@ -37,7 +38,7 @@
#maxplayers=8
#Set the port number
-#port=777
+#port=7777
#Set the server password
#password=p@55w0rd
diff --git a/terraria-server b/terraria-server
index c03f97f98eb9..ad320ec435f3 100755
--- a/terraria-server
+++ b/terraria-server
@@ -1,5 +1,13 @@
#!/bin/bash
-cd /etc/terraria-server
export MONO_IOMAP=all
arch=$(uname -m)
-./TerrariaServer.bin.${arch} "$@"
+args=("$@")
+for (( i=0; i<$#; ++i ))
+do
+ # For every existing file, get the real path for the binary.
+ if [ -f ${args[$i]} ]
+ then
+ args[$i]=$(realpath ${args[$i]});
+ fi
+done
+/etc/terraria-server/TerrariaServer.bin.${arch} "${args[@]}"