4 changed files with 209 additions and 6 deletions
@ -0,0 +1,68 @@ |
|||||
|
#this is an example config file for TerrariaServer.exe |
||||
|
#use the command 'TerrariaServer.exe -config serverconfig.txt' to use this configuration or run start-server.bat |
||||
|
#please report crashes by emailing crashlog.txt to support@terraria.org |
||||
|
|
||||
|
#the following is a list of available command line parameters: |
||||
|
|
||||
|
#-config <config file> Specifies the configuration file to use. |
||||
|
#-port <port number> Specifies the port to listen on. |
||||
|
#-players <number> / -maxplayers <number> Sets the max number of players |
||||
|
#-pass <password> / -password <password> Sets the server password |
||||
|
#-world <world file> Load a world and automatically start the server. |
||||
|
#-autocreate <#> Creates a world if none is found in the path specified by -world. World size is specified by: 1(small), 2(medium), and 3(large). |
||||
|
#-banlist <path> Specifies the location of the banlist. Defaults to "banlist.txt" in the working directory. |
||||
|
#-worldname <world name> Sets the name of the world when using -autocreate. |
||||
|
#-secure Adds addition cheat protection to the server. |
||||
|
#-noupnp Disables automatic port forwarding |
||||
|
#-steam Enables Steam Support |
||||
|
#-lobby <friends> or <private> Allows friends to join the server or sets it to private if Steam is enabled |
||||
|
#-ip <ip address> Sets the IP address for the server to listen on |
||||
|
#-forcepriority <priority> Sets the process priority for this task. If this is used the "priority" setting below will be ignored. |
||||
|
|
||||
|
#remove the # in front of commands to enable them. |
||||
|
|
||||
|
#Load a world and automatically start the server. |
||||
|
#world=C:\Users\YOUR_USERNAME_HERE\My Documents\My Games\Terraria\Worlds\world1.wld |
||||
|
|
||||
|
#Creates a new world if none is found. World size is specified by: 1(small), 2(medium), and 3(large). |
||||
|
#autocreate=1 |
||||
|
|
||||
|
#Sets the name of the world when using autocreate |
||||
|
#worldname=Terraria |
||||
|
|
||||
|
#Sets the difficulty of the world when using autocreate 0(normal), 1(expert) |
||||
|
#difficulty=1 |
||||
|
|
||||
|
#Sets the max number of players allowed on a server. Value must be between 1 and 255 |
||||
|
#maxplayers=8 |
||||
|
|
||||
|
#Set the port number |
||||
|
#port=7777 |
||||
|
|
||||
|
#Set the server password |
||||
|
#password=p@55w0rd |
||||
|
|
||||
|
#Set the message of the day |
||||
|
#motd=Please don’t cut the purple trees! |
||||
|
|
||||
|
#Sets the folder where world files will be stored |
||||
|
#worldpath=C:\Users\Defaults\My Documents\My Games\Terraria\Worlds\ |
||||
|
|
||||
|
#The location of the banlist. Defaults to "banlist.txt" in the working directory. |
||||
|
#banlist=banlist.txt |
||||
|
|
||||
|
#Adds addition cheat protection. |
||||
|
#secure=1 |
||||
|
|
||||
|
#Sets the server language 1:English, 2:German, 3:Italian, 4:French, 5:Spanish |
||||
|
#lang=1 |
||||
|
|
||||
|
#Automatically forward ports with uPNP |
||||
|
#upnp=1 |
||||
|
|
||||
|
#Reduces enemy skipping but increases bandwidth usage. The lower the number the less skipping will happen, but more data is sent. 0 is off. |
||||
|
#npcstream=60 |
||||
|
|
||||
|
#Default system priority 0:Realtime, 1:High, 2:AboveNormal, 3:Normal, 4:BelowNormal, 5:Idle |
||||
|
priority=1 |
||||
|
|
@ -0,0 +1,92 @@ |
|||||
|
#!/bin/bash |
||||
|
# Terraria |
||||
|
# Server Management Script |
||||
|
# Author: Daniel Gibbs |
||||
|
# Contributor: Bryce Van Dyk (SingingTree) |
||||
|
# Website: http://gameservermanagers.com |
||||
|
version="070915" |
||||
|
|
||||
|
#### Variables #### |
||||
|
|
||||
|
# Notification Email |
||||
|
# (on|off) |
||||
|
emailnotification="off" |
||||
|
email="email@example.com" |
||||
|
|
||||
|
# Steam login |
||||
|
steamuser="username" |
||||
|
steampass="password" |
||||
|
|
||||
|
# Start Variables |
||||
|
ip="0.0.0.0" |
||||
|
updateonstart="off" |
||||
|
|
||||
|
fn_parms(){ |
||||
|
parms="-config ${servercfgfullpath}" |
||||
|
} |
||||
|
|
||||
|
#### Advanced Variables #### |
||||
|
|
||||
|
# Steam |
||||
|
appid="105600" |
||||
|
|
||||
|
# Server Details |
||||
|
servicename="terraria-server" |
||||
|
gamename="Terraria" |
||||
|
engine="terraria" |
||||
|
|
||||
|
# Directories |
||||
|
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" |
||||
|
selfname="$(basename $0)" |
||||
|
lockselfname=".${servicename}.lock" |
||||
|
filesdir="${rootdir}/serverfiles" |
||||
|
systemdir="${filesdir}" |
||||
|
executabledir="${filesdir}" |
||||
|
executable="./TerrariaServer" |
||||
|
servercfg="${servicename}.txt" |
||||
|
servercfgdir="${filesdir}" |
||||
|
servercfgfullpath="${servercfgdir}/${servercfg}" |
||||
|
backupdir="${rootdir}/backups" |
||||
|
|
||||
|
# Logging |
||||
|
logdays="7" |
||||
|
#gamelogdir="" # Terraria Doesn't Have a Server Log |
||||
|
scriptlogdir="${rootdir}/log/script" |
||||
|
consolelogdir="${rootdir}/log/console" |
||||
|
|
||||
|
scriptlog="${scriptlogdir}/${servicename}-script.log" |
||||
|
consolelog="${consolelogdir}/${servicename}-console.log" |
||||
|
emaillog="${scriptlogdir}/${servicename}-email.log" |
||||
|
|
||||
|
scriptlogdate="${scriptlogdir}/${servicename}-script-$(date '+%d-%m-%Y-%H-%M-%S').log" |
||||
|
consolelogdate="${consolelogdir}/${servicename}-console-$(date '+%d-%m-%Y-%H-%M-%S').log" |
||||
|
|
||||
|
##### Script ##### |
||||
|
# Do not edit |
||||
|
|
||||
|
fn_runfunction(){ |
||||
|
# Functions are downloaded and run with this function |
||||
|
if [ ! -f "${rootdir}/functions/${functionfile}" ]; then |
||||
|
cd "${rootdir}" |
||||
|
if [ ! -d "functions" ]; then |
||||
|
mkdir functions |
||||
|
fi |
||||
|
cd functions |
||||
|
echo -e " loading ${functionfile}...\c" |
||||
|
wget -N /dev/null https://raw.githubusercontent.com/dgibbs64/linuxgsm/master/functions/${functionfile} 2>&1 | grep -F HTTP | cut -c45- |
||||
|
chmod +x "${functionfile}" |
||||
|
cd "${rootdir}" |
||||
|
fi |
||||
|
source "${rootdir}/functions/${functionfile}" |
||||
|
} |
||||
|
|
||||
|
fn_functions(){ |
||||
|
# Functions are defined in fn_functions. |
||||
|
functionfile="${FUNCNAME}" |
||||
|
fn_runfunction |
||||
|
} |
||||
|
|
||||
|
fn_functions |
||||
|
|
||||
|
getopt=$1 |
||||
|
fn_getopt |
Loading…
Reference in new issue