summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD8
-rw-r--r--tshock.install3
-rw-r--r--tshock.sh41
4 files changed, 47 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 92f29e53bd0..494bd3aa07e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = tshock
pkgdesc = A Terraria Server administration modification that runs on the open source TerrariaAPI.
pkgver = 4.3.5
- pkgrel = 1
+ pkgrel = 2
epoch = 1
url = http://tshock.co/xf/
install = tshock.install
@@ -13,7 +13,7 @@ pkgbase = tshock
source = tshock.sh
source = tshock@.service
sha512sums = b15c1518507a7bf7b700789fb55eb7c2ecc175d1da8585b4d12c118f6f64b8d82a2f72b048d4efc856e841ea48508a925b4717932d045caad5fdd93e3cd60904
- sha512sums = bdf5a5a626f071b5a1a9aa60ffbc0f87078cf96a940af7ac6bb99798234a07021eaab61bef72bed0af7c5a821ffccb4eda5a50076e2133ae5643f2f2517e6265
+ sha512sums = ea25422690dfb8a15436529b56d594530d3a1d4800f337460f70c46b9328bef1ce6898c25f87d5dbc6a33c36ffc18648a189903650581b4529a5db366c50a705
sha512sums = 563ada981c2e08293462485fd85b2c4e0b190c55ed3bcea4139b955f931d970d97c2bd89fba5b190231e9f2adeddd2c385abd11781bf1a98b13b78b8951bf623
pkgname = tshock
diff --git a/PKGBUILD b/PKGBUILD
index b8bf06b778b..cc4ae0c83dc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@ pkgname=tshock
pkgver=4.3.5
# 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=1
+pkgrel=2
pkgdesc="A Terraria Server administration modification that runs on the open source TerrariaAPI."
arch=(any)
url="http://tshock.co/xf/"
@@ -16,7 +16,7 @@ source=("https://github.com/NyxStudios/TShock/releases/download/v${pkgver}/${pkg
'tshock@.service')
sha512sums=('b15c1518507a7bf7b700789fb55eb7c2ecc175d1da8585b4d12c118f6f64b8d82a2f72b048d4efc856e841ea48508a925b4717932d045caad5fdd93e3cd60904'
- 'bdf5a5a626f071b5a1a9aa60ffbc0f87078cf96a940af7ac6bb99798234a07021eaab61bef72bed0af7c5a821ffccb4eda5a50076e2133ae5643f2f2517e6265'
+ 'ea25422690dfb8a15436529b56d594530d3a1d4800f337460f70c46b9328bef1ce6898c25f87d5dbc6a33c36ffc18648a189903650581b4529a5db366c50a705'
'563ada981c2e08293462485fd85b2c4e0b190c55ed3bcea4139b955f931d970d97c2bd89fba5b190231e9f2adeddd2c385abd11781bf1a98b13b78b8951bf623')
install=tshock.install
@@ -26,7 +26,9 @@ package() {
install -d "${pkgdir}/etc/conf.d/tshock/"
echo "BASEDIR=/srv/tshock
PORT=7777
-WORLD=World1" > "${pkgdir}/etc/conf.d/tshock/default.conf"
+WORLDDIR=Terraria/Worlds
+WORLD=World1
+SIZE=2" > "${pkgdir}/etc/conf.d/tshock/default.conf"
install -Dm755 "${srcdir}/tshock.sh" "${pkgdir}/srv/tshock/"
install -Dm644 "${srcdir}/tshock@.service" "${pkgdir}/usr/lib/systemd/system/tshock@.service"
diff --git a/tshock.install b/tshock.install
index c6250ba4f93..ac4440157bb 100644
--- a/tshock.install
+++ b/tshock.install
@@ -3,8 +3,7 @@ post_install() {
getent passwd tshock >/dev/null 2>&1 || useradd -g tshock -d /srv/tshock/ -s /bin/bash tshock
chown -R tshock:tshock /srv/tshock/
- echo ">>> Run \`sudo -u tshock /srv/tshock/tshock.sh install\` and create a world named World1
- You can then start tshock@default.service"
+ echo ">>> You can start the server in a default configuration by starting tshock@default.service"
}
post_upgrade() {
diff --git a/tshock.sh b/tshock.sh
index ec3a49d2156..41c9dd0d86f 100644
--- a/tshock.sh
+++ b/tshock.sh
@@ -17,15 +17,52 @@ fi
TMUX_CONSOLE=tshock-console-${INSTANCE}
+## The following parameters can be added to TShock to alter the way a server initializes.
+## Options set via the command line will override all configuration options regardless.
+## These can be used either for personal use or in a GSP environment for easier hosting without hassle:
+## Terraria Server API Command Line:
+## -ip <ipv4> - Starts the server bound to a given IPv4 address
+## -port <port> - Starts the server bound to a given port
+## -maxplayers <count> - Starts the server with a given player count
+## -world <file.wld> - Starts the server and immediately loads a given
+## world file
+## -worldpath <path> - Starts the server and changes the world path to a
+## given path
+## -autocreate <1/2/3> - Starts the server and, if a world file isn't found,
+## automatically create the world file with a given
+## size, 1-3, 1 being small.
+## -config <file> - Starts the server with a given config file
+## -connperip <n> - Allows n number of connections per IP.
+## -killinactivesocket - Kills connections which have not started the
+## protocol handshake.
+## -lang <type> - Sets the server's language.
+## -ignoreversion - Ignores API version checks for plugins allowing for
+## old plugins to run.
+## -forceupdate - Forces the server to continue running, and not
+## hibernating when no players are on. This results in
+## time passing, grass growing, and cpu running.
+## TShock Command Line:
+## -configpath <path> - The path tshock uses to resolve configs, log
+## files, and sqlite db.
+## -worldpath <path> - The path that Terraria Server uses to find all
+## world files.
+## -logpath <path> - Overrides the default log path and saves logs
+## here.
+## -logformat <format> - Format the name of log files, subject to C# date
+## standard abbreviations,
+## -logclear <true/false> - Overwrites old config if it exists.
+## -dump - Dumps permissions and config file descriptions for
+## wiki use.
+
case "$1" in
start)
if [ ! $(tmux has -t ${TMUX_CONSOLE}) ]; then
- tmux new-session -d -s ${TMUX_CONSOLE} -d "cd ${BASEDIR}; mono TerrariaServer.exe -port ${PORT} -world My\ Games/Terraria/Worlds/${WORLD}.wld"
+ tmux new-session -d -s ${TMUX_CONSOLE} -d "cd ${BASEDIR}; mono TerrariaServer.exe -port ${PORT} -worldpath ${WORLDDIR} -world ${WORLDDIR}/${WORLD}.wld -autocreate ${SIZE}"
if [ $? -gt 0 ]; then
exit 1
fi
else
- echo "Tshock already running"
+ echo "This TShock instance is already running"
exit 1
fi
;;