فهرست منبع

Added Arkserver

I have added ARK server however it is still not fully working but should
be enough to get started
Daniel Gibbs 11 سال پیش
والد
کامیت
01f798345a
1فایلهای تغییر یافته به همراه101 افزوده شده و 0 حذف شده
  1. 101 0
      ARKSurvivalEvolved/arkserver

+ 101 - 0
ARKSurvivalEvolved/arkserver

@@ -0,0 +1,101 @@
+#!/bin/bash
+# ARK: Survivial Evolved
+# Server Management Script
+# Author: Daniel Gibbs
+# Website: http://gameservermanagers.com
+# Version: 210615
+
+#### Variables ####
+
+# Notification Email
+# (on|off)
+emailnotification="off"
+email="email@example.com"
+
+# Steam login
+steamuser="anonymous"
+steampass=""
+
+# Start Variables
+defaultmap="de_dust2"
+maxplayers="16"
+port="27016"
+queryport="7779"
+serverpass="serverpassword"
+serveradminpass="adminpassword"
+ip="0.0.0.0"
+updateonstart="no"
+
+# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
+fn_parms(){
+parms="TheIsland?listen?SessionName=${servicename}?ServerAdminPassword=${serveradminpass}?ServerPassword=${serverpass}?QueryPort=${queryport}?Port=${port}?ServerAdminPassword=${serveradminpass} -server -log"
+}
+
+#### Advanced Variables ####
+
+# Steam
+appid="376030"
+
+# Server Details
+servicename="ark-server"
+gamename="ARK: Survivial Evolved"
+engine="unreal4"
+
+# Directories
+rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+selfname="$(basename $0)"
+lockselfname=".${servicename}.lock"
+filesdir="${rootdir}/serverfiles"
+systemdir="${filesdir}/ShooterGame"
+executabledir="${systemdir}/Binaries/Linux"
+executable="./ShooterGameServer"
+servercfgdir="${systemdir}/Saved/Config/LinuxServer/"
+servercfg="GameUserSettings.ini"
+servercfgfullpath="${servercfgdir}/${servercfg}"
+defaultcfg="${servercfgdir}/server.cfg"
+backupdir="${rootdir}/backups"
+
+# Logging
+logdays="7"
+gamelogdir="${systemdir}/logs"
+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}"
+	sleep 1
+fi
+source "${rootdir}/functions/${functionfile}"
+}
+
+fn_functions(){
+# Functions are defined in fn_functions.
+functionfile="${FUNCNAME}"
+fn_runfunction
+}
+
+fn_functions
+
+getopt=$1
+fn_getopt
+