forked from GameServerManagers/LinuxGSM
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Project Zomboid server has its first release
- Loading branch information
Showing
5 changed files
with
149 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
#!/bin/bash | ||
# Project Zomboid | ||
# Server Management Script | ||
# Author: Daniel Gibbs | ||
# Website: http://danielgibbs.co.uk | ||
# Version: 150415 | ||
|
||
#### Variables #### | ||
|
||
# Notification Email | ||
# (on|off) | ||
emailnotification="off" | ||
email="[email protected]" | ||
|
||
# Steam login | ||
steamuser="anonymous" | ||
steampass="" | ||
|
||
# Start Variables | ||
ip="0.0.0.0" | ||
|
||
fn_parms(){ | ||
parms="" | ||
} | ||
|
||
#### Advanced Variables #### | ||
|
||
# Steam | ||
appid="108600" | ||
|
||
# Server Details | ||
servicename="pz-server" | ||
gamename="Project Zomboid" | ||
engine="projectzomboid" | ||
|
||
# Directories | ||
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
selfname="$(basename $0)" | ||
lockselfname=".${servicename}.lock" | ||
filesdir="${rootdir}/serverfiles" | ||
systemdir="${filesdir}/projectzomboid" | ||
executabledir="${filesdir}" | ||
executable="./projectzomboid-dedi-server.sh" | ||
servercfgdir="${rootdir}/Zomboid/Server" | ||
servercfg="servertest.ini" | ||
servercfgfullpath="${servercfgdir}/${servercfg}" | ||
defaultcfg="${servercfgdir}/servertest.ini" | ||
backupdir="${rootdir}/backups" | ||
|
||
# Logging | ||
logdays="7" | ||
gamelogdir="${HOME}/Zomboid/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 --no-check-certificate /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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters