prophunt-garrysmod/gmod/common.cfg
2023-03-01 18:11:11 +01:00

244 lines
7.1 KiB
INI

##################################
######## Default Settings ########
##################################
# Copy settings from here and use them in either:
# common.cfg - applies settings to every instance.
# [instance].cfg - applies settings to a specific instance.
if [ "${DEBUGGING}" = "true" ]; then
set -o xtrace
fi
#### Game Server Settings ####
## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
ip="$SERVER_IP"
port="$SERVER_PORT"
clientport="$SERVER_CLIENTPORT"
sourcetvport="$SERVER_SOURCETVPORT"
defaultmap="$SERVER_DEFAULT_MAP"
maxplayers="$SERVER_MAX_PLAYERS"
tickrate="$SERVER_TICKRATE"
gamemode="$SERVER_GAMEMODE"
## Workshop Parameters | https://wiki.garrysmod.com/page/Workshop_for_Dedicated_Servers
# To get an API key visit - https://steamcommunity.com/dev/apikey
wsapikey="$WORKSHOP_API_KEY"
wscollectionid="$WORKSHOP_COLLECTION_ID"
## Custom Start Parameters
# Default -disableluarefresh, disables lua autorefresh reducing server lag. Auto refresh only useful for developers.
customparms="$SERVER_ADDITIONAL_PARAMETERS"
## Optional: Game Server Login Token
# GSLT can be used for running a public server.
# More info: https://linuxgsm.com/gslt
gslt="$SERVER_LOGIN_TOKEN"
## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
startparameters="-game garrysmod -strictportbind -ip ${ip} -port ${port} -tickrate ${tickrate} +host_workshop_collection ${wscollectionid} -authkey ${wsapikey} +clientport ${clientport} +tv_port ${sourcetvport} +gamemode ${gamemode} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers} ${customparms}"
#### LinuxGSM Settings ####
## LinuxGSM Stats
# Send useful stats to LinuxGSM developers.
# https://docs.linuxgsm.com/configuration/linuxgsm-stats
# (on|off)
stats="off"
## Notification Alerts
# (on|off)
# Display IP | https://docs.linuxgsm.com/alerts#display-ip
#shellcheck disable=SC2034
displayip="$LGSM_DISPLAYIP"
# More info | https://docs.linuxgsm.com/alerts#more-info
#shellcheck disable=SC2034
postalert="$LGSM_POSTALERT"
#shellcheck disable=SC2034
postdays="$LGSM_POSTDAYS"
#shellcheck disable=SC2034
posttarget="$LGSM_POSTTARGET"
# Discord Alerts | https://docs.linuxgsm.com/alerts/discord
#shellcheck disable=SC2034
discordalert="$LGSM_DISCORDALERT"
#shellcheck disable=SC2034
discordwebhook="$LGSM_DISCORDWEBHOOK"
# Email Alerts | https://docs.linuxgsm.com/alerts/email
#shellcheck disable=SC2034
emailalert="$LGSM_EMAILALERT"
#shellcheck disable=SC2034
email="$LGSM_EMAIL"
#shellcheck disable=SC2034
emailfrom="$LGSM_EMAILFROM"
# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify
gotifyalert="off"
gotifytoken="token"
gotifywebhook="webhook"
# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt
#shellcheck disable=SC2034
iftttalert="$LGSM_IFTTTALERT"
#shellcheck disable=SC2034
ifttttoken="$LGSM_IFTTTTOKEN"
#shellcheck disable=SC2034
iftttevent="$LGSM_IFTTTEVENT"
# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun
#shellcheck disable=SC2034
mailgunalert="$LGSM_MAILGUNALERT"
mailgunapiregion="us"
#shellcheck disable=SC2034
mailguntoken="$LGSM_MAILGUNTOKEN"
#shellcheck disable=SC2034
mailgundomain="$LGSM_MAILGUNDOMAIN"
#shellcheck disable=SC2034
mailgunemailfrom="$LGSM_MAILGUNEMAILFROM"
#shellcheck disable=SC2034
mailgunemail="$LGSM_MAILGUNEMAIL"
# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet
#shellcheck disable=SC2034
pushbulletalert="$LGSM_PUSHBULLETALERT"
#shellcheck disable=SC2034
pushbullettoken="$LGSM_PUSHBULLETTOKEN"
#shellcheck disable=SC2034
channeltag="$LGSM_CHANNELTAG"
# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover
#shellcheck disable=SC2034
pushoveralert="$LGSM_PUSHOVERALERT"
#shellcheck disable=SC2034
pushovertoken="$LGSM_PUSHOVERTOKEN"
pushoveruserkey="userkey"
# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat
rocketchatalert="off"
rocketchatwebhook="webhook"
rocketchattoken=""
# Slack Alerts | https://docs.linuxgsm.com/alerts/slack
slackalert="off"
slackwebhook="webhook"
# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram
# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring".
# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help".
#shellcheck disable=SC2034
telegramapi="api.telegram.org"
#shellcheck disable=SC2034
telegramalert="$LGSM_TELEGRAMALERT"
#shellcheck disable=SC2034
telegramtoken="$LGSM_TELEGRAMTOKEN"
#shellcheck disable=SC2034
telegramchatid="$LGSM_TELEGRAMCHATID"
#shellcheck disable=SC2034
curlcustomstring="$LGSM_CURLCUSTOMSTRING"
## Updating | https://docs.linuxgsm.com/commands/update
#shellcheck disable=SC2034
updateonstart="$LGSM_UPDATEONSTART"
## Backup | https://docs.linuxgsm.com/commands/backup
#shellcheck disable=SC2034
maxbackups="$LGSM_MAXBACKUPS"
#shellcheck disable=SC2034
maxbackupdays="$LGSM_MAXBACKUPDAYS"
#shellcheck disable=SC2034
stoponbackup="$LGSM_STOPONBACKUP"
## Logging | https://docs.linuxgsm.com/features/logging
#shellcheck disable=SC2034
consolelogging="$LGSM_CONSOLELOGGING"
#shellcheck disable=SC2034
logdays="$LGSM_LOGDAYS"
## Monitor | https://docs.linuxgsm.com/commands/monitor
# Query delay time
#shellcheck disable=SC2034
querydelay="$LGSM_QUERYDELAY"
## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors
ansi="on"
#### Advanced Settings ####
## Message Display Time | https://docs.linuxgsm.com/features/message-display-time
sleeptime="0.5"
## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd
# Server appid
appid="4020"
steamcmdforcewindows="no"
# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch
branch="$LGSM_BRANCH"
betapassword=""
# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server
#shellcheck disable=SC2034
steammaster="$LGSM_STEAMMASTER"
## Stop Mode | https://docs.linuxgsm.com/features/stop-mode
# 1: tmux kill
# 2: CTRL+c
# 3: quit
# 4: quit 120s
# 5: stop
# 6: q
# 7: exit
# 8: 7 Days to Die
# 9: GoldSrc
# 10: Avorion
# 11: end
stopmode="3"
## Query mode
# 1: session only
# 2: gamedig (gsquery fallback)
# 3: gamedig
# 4: gsquery
# 5: tcp
querymode="2"
querytype="protocol-valve"
## Console type
consoleverbose="yes"
consoleinteract="yes"
## Game Server Details
# Do not edit
gamename="Garry's Mod"
engine="source"
glibc="2.15"
#### Directories ####
# Edit with care
## Game Server Directories
systemdir="${serverfiles}/garrysmod"
addonsdir="${systemdir}/addons"
executabledir="${serverfiles}"
executable="./srcds_run"
servercfgdir="${systemdir}/cfg"
servercfg="${selfname}.cfg"
servercfgdefault="server.cfg"
servercfgfullpath="${servercfgdir}/${servercfg}"
## Backup Directory
backupdir="${lgsmdir}/backup"
## Logging Directories
logdir="${rootdir}/log"
gamelogdir="${systemdir}/logs"
lgsmlogdir="${logdir}/script"
consolelogdir="${logdir}/console"
lgsmlog="${lgsmlogdir}/${selfname}-script.log"
consolelog="${consolelogdir}/${selfname}-console.log"
alertlog="${lgsmlogdir}/${selfname}-alert.log"
postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log"
## Logs Naming
lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log"
consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log"