2023-03-01 18:11:11 +01:00
|
|
|
##################################
|
|
|
|
######## 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.
|
2019-07-29 21:51:34 +02:00
|
|
|
if [ "${DEBUGGING}" = "true" ]; then
|
|
|
|
set -o xtrace
|
|
|
|
fi
|
2023-03-01 18:11:11 +01:00
|
|
|
#### Game Server Settings ####
|
2019-07-29 21:51:34 +02:00
|
|
|
|
2023-03-01 18:11:11 +01:00
|
|
|
## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
|
2019-07-29 21:51:34 +02:00
|
|
|
ip="$SERVER_IP"
|
|
|
|
port="$SERVER_PORT"
|
|
|
|
clientport="$SERVER_CLIENTPORT"
|
|
|
|
sourcetvport="$SERVER_SOURCETVPORT"
|
2019-10-15 12:55:45 +02:00
|
|
|
defaultmap="$SERVER_DEFAULT_MAP"
|
2019-07-29 21:51:34 +02:00
|
|
|
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"
|
|
|
|
|
2023-03-01 18:11:11 +01:00
|
|
|
## 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}"
|
2019-07-29 21:51:34 +02:00
|
|
|
|
|
|
|
#### LinuxGSM Settings ####
|
|
|
|
|
2023-03-01 18:11:11 +01:00
|
|
|
## LinuxGSM Stats
|
|
|
|
# Send useful stats to LinuxGSM developers.
|
|
|
|
# https://docs.linuxgsm.com/configuration/linuxgsm-stats
|
|
|
|
# (on|off)
|
|
|
|
stats="off"
|
|
|
|
|
2019-07-29 21:51:34 +02:00
|
|
|
## 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"
|
|
|
|
|
2023-03-01 18:11:11 +01:00
|
|
|
# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify
|
|
|
|
gotifyalert="off"
|
|
|
|
gotifytoken="token"
|
|
|
|
gotifywebhook="webhook"
|
|
|
|
|
2019-07-29 21:51:34 +02:00
|
|
|
# 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"
|
2023-03-01 18:11:11 +01:00
|
|
|
mailgunapiregion="us"
|
2019-07-29 21:51:34 +02:00
|
|
|
#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"
|
|
|
|
|
2023-03-01 18:11:11 +01:00
|
|
|
|
2019-07-29 21:51:34 +02:00
|
|
|
# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover
|
|
|
|
#shellcheck disable=SC2034
|
|
|
|
pushoveralert="$LGSM_PUSHOVERALERT"
|
|
|
|
#shellcheck disable=SC2034
|
|
|
|
pushovertoken="$LGSM_PUSHOVERTOKEN"
|
2023-03-01 18:11:11 +01:00
|
|
|
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"
|
2019-07-29 21:51:34 +02:00
|
|
|
|
|
|
|
# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram
|
2023-03-01 18:11:11 +01:00
|
|
|
# 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"
|
2019-07-29 21:51:34 +02:00
|
|
|
#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"
|
|
|
|
|
2023-03-01 18:11:11 +01:00
|
|
|
## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors
|
2019-07-29 21:51:34 +02:00
|
|
|
ansi="on"
|
|
|
|
|
2023-03-01 18:11:11 +01:00
|
|
|
#### Advanced Settings ####
|
|
|
|
|
|
|
|
## Message Display Time | https://docs.linuxgsm.com/features/message-display-time
|
2019-07-29 21:51:34 +02:00
|
|
|
sleeptime="0.5"
|
|
|
|
|
2023-03-01 18:11:11 +01:00
|
|
|
## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd
|
2019-07-29 21:51:34 +02:00
|
|
|
# Server appid
|
|
|
|
appid="4020"
|
2023-03-01 18:11:11 +01:00
|
|
|
steamcmdforcewindows="no"
|
2019-07-29 21:51:34 +02:00
|
|
|
# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch
|
|
|
|
branch="$LGSM_BRANCH"
|
2023-03-01 18:11:11 +01:00
|
|
|
betapassword=""
|
2019-07-29 21:51:34 +02:00
|
|
|
# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server
|
|
|
|
#shellcheck disable=SC2034
|
2019-10-15 14:33:40 +02:00
|
|
|
steammaster="$LGSM_STEAMMASTER"
|
2023-03-01 18:11:11 +01:00
|
|
|
|
|
|
|
## 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"
|