| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- #!/bin/bash
- # Red Orchestra: Ostfront 41-45
- # Server Management Script
- # Author: Daniel Gibbs
- # Website: http://gameservermanagers.com
- # Version: 030515
- #### Variables ####
- # Notification Email
- # (on|off)
- emailnotification="off"
- email="email@example.com"
- # Steam login
- steamuser="username"
- steampass="password"
- # Start Variables
- defaultmap="RO-Arad.rom"
- ip="0.0.0.0"
- fn_parms(){
- parms="server ${defaultmap}?game=ROGame.ROTeamGame?VACSecured=true -nohomedir ini=${servercfg} log=${gamelog}"
- }
- #### Advanced Variables ####
- # Server Details
- servicename="ro-server"
- gamename="Red Orchestra: Ostfront 41-45"
- engine="unreal2"
- # Steam
- appid="223250"
- # Directories
- rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
- selfname="$(basename $0)"
- lockselfname=".${servicename}.lock"
- filesdir="${rootdir}/serverfiles"
- systemdir="${filesdir}/system"
- executabledir="${systemdir}"
- executable="./ucc-bin"
- servercfgdir="${systemdir}"
- servercfg="${servicename}.ini"
- servercfgfullpath="${servercfgdir}/${servercfg}"
- compressedmapsdir="${rootdir}/Maps-Compressed"
- defaultcfg="${systemdir}/default.ini"
- backupdir="${rootdir}/backups"
- # Logging
- logdays="7"
- gamelogdir="${rootdir}/log/server"
- scriptlogdir="${rootdir}/log/script"
- consolelogdir="${rootdir}/log/console"
- gamelog="${gamelogdir}/${servicename}-game.log"
- scriptlog="${scriptlogdir}/${servicename}-script.log"
- consolelog="${consolelogdir}/${servicename}-console.log"
- emaillog="${scriptlogdir}/${servicename}-email.log"
- gamelogdate="${gamelogdir}/${servicename}-game-$(date '+%d-%m-%Y-%H-%M-%S').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
|