Added pvkiiserver

This commit is contained in:
Daniel Gibbs 2015-11-05 19:10:41 +00:00
parent 082e494fca
commit f5f8be1276
2 changed files with 217 additions and 0 deletions

View File

@ -0,0 +1,119 @@
// ****************************************************************************
// *
// Pirates, Vikings, and Knights II *
// Version 150815 *
// *
// ****************************************************************************
// ............................. Basic Settings ............................. //
// Hostname for server.
hostname "<hostname>"
// RCON - remote console password.
rcon_password "<rconpassword>"
// Server password - for private servers.
sv_password ""
// Contact email for server sysop.
sv_contact "email@example.com"
// LAN Mode - If set the server will not show on the internet.
// Default: sv_lan 0
sv_lan 0
// ............................... Map Cycles ............................... //
// You can create your own custom mapcycle.
mapcyclefile "mapcycle.txt"
// ....................... Time Limits/Round Settings ....................... //
// Time spend on a single map (in minutes) before switching to a new one automatically.
// Default: mp_timelimit 0
mp_timelimit 20
// Wait for the end of round before changing map.
// Default: mp_timelimit_waitroundend 0
mp_timelimit_waitroundend 1
// Round duration in minutes.
// Default: mp_roundtime 3
mp_roundtime 3
// Round limit in number of rounds.
// Default: mp_roundlimit 0
// Win limit in number of rounds.
// Default: mp_winlimit 0
mp_winlimit 0
// ........................ Server Specific Commands ........................ //
// Server tags - Tags show up on the in-game server browser. This helps
// users filter servers.
// vanilla - he server runs the default settings.
// custom - the server runs custom gameplay settings or mods.
// example: sv_tags "custom, fastdl"
sv_tags ""
// Friendly fire - Allows team members to injure other members of their team.
// Default: mp_friendlyfire 0
mp_friendlyfire 0
// ............................. Communication ............................. //
// Enable communication over voice via microphone.
// Default: sv_voiceenable 1
sv_voiceenable 1
// Players can hear all other players, no team restrictions.
// Default: sv_alltalk 0
sv_alltalk 0
// ............................. Fast Download .............................. //
// info: Allows custom maps to be downloaded to the client.
// Allows clients to download custom maps and textures etc. from the server at 20 kbps.
// Default: sv_allowdownload 1
sv_allowdownload 1
// Allows clients to download custom maps, textures etc. from a web server with no transfer limit.
// Example:
// server location: maps/custommap.bsp
// web server location: http://example.com/custom/maps/custommap.bsp
// sv_downloadurl "http://example.com/custom"
// Default: sv_downloadurl ""
sv_downloadurl ""
// ................................ Ban List ............................... //
// personal banlist based on user IDs.
exec banned_user.cfg
// personal banlist based on user IPs.
exec banned_ip.cfg
writeid
writeip
// ............................. Server Logging ............................. //
//Enables logging to file, console, and udp < on | off >.
log on
// Log server bans in the server logs.
// Default: sv_logbans 1
sv_logbans 1
// Echo log information to the console.
// Default: sv_logecho 1
sv_logecho 1
// Log server information in the log file.
// Default: sv_logfile 1
sv_logfile 1
// Log server information to only one file.
// Default: sv_log_onefile 0
sv_log_onefile 0

View File

@ -0,0 +1,98 @@
#!/bin/bash
# No More Room in Hell
# Server Management Script
# Author: Daniel Gibbs
# Website: http://gameservermanagers.com
version="051115"
#### Variables ####
# Notification Email
# (on|off)
emailnotification="off"
email="email@example.com"
# Steam login
steamuser="anonymous"
steampass=""
# Start Variables
defaultmap="bt_island"
maxplayers="24"
port="27015"
sourcetvport="27020"
clientport="27005"
ip="0.0.0.0"
updateonstart="off"
# https://developer.valvesoftware.com/wiki/Command_Line_Options#Source_Dedicated_Server
fn_parms(){
parms="-game pvkii -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}"
}
#### Advanced Variables ####
# Steam
appid="17575"
# Server Details
servicename="pvkii-server"
gamename="Pirates, Vikings, and Knights II"
engine="source"
# Directories
rootdir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
selfname="$(basename $0)"
lockselfname=".${servicename}.lock"
filesdir="${rootdir}/serverfiles"
systemdir="${filesdir}/pvkii"
executabledir="${filesdir}"
executable="./srcds_run"
servercfg="${servicename}.cfg"
servercfgdir="${systemdir}/cfg"
servercfgfullpath="${servercfgdir}/${servercfg}"
servercfgdefault="${servercfgdir}/lgsm-default.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}"
fi
source "${rootdir}/functions/${functionfile}"
}
fn_functions(){
# Functions are defined in fn_functions.
functionfile="${FUNCNAME}"
fn_runfunction
}
fn_functions
getopt=$1
fn_getopt