fix(config): startargs upstream func -> var
This commit is contained in:
parent
b1ebff9a44
commit
7f5d8ca09b
132
gmod/common.cfg
132
gmod/common.cfg
@ -1,15 +1,15 @@
|
|||||||
#!/bin/sh
|
##################################
|
||||||
|
######## 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
|
if [ "${DEBUGGING}" = "true" ]; then
|
||||||
set -o xtrace
|
set -o xtrace
|
||||||
fi
|
fi
|
||||||
|
#### Game Server Settings ####
|
||||||
|
|
||||||
#set -o errexit
|
## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters
|
||||||
#set -o pipefail
|
|
||||||
#travistest: unbound variable
|
|
||||||
#set -o nounset
|
|
||||||
|
|
||||||
## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters
|
|
||||||
ip="$SERVER_IP"
|
ip="$SERVER_IP"
|
||||||
port="$SERVER_PORT"
|
port="$SERVER_PORT"
|
||||||
clientport="$SERVER_CLIENTPORT"
|
clientport="$SERVER_CLIENTPORT"
|
||||||
@ -33,14 +33,17 @@ customparms="$SERVER_ADDITIONAL_PARAMETERS"
|
|||||||
# More info: https://linuxgsm.com/gslt
|
# More info: https://linuxgsm.com/gslt
|
||||||
gslt="$SERVER_LOGIN_TOKEN"
|
gslt="$SERVER_LOGIN_TOKEN"
|
||||||
|
|
||||||
## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
|
## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters
|
||||||
fn_parms(){
|
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}"
|
||||||
#shellcheck disable=SC2034,SC2154
|
|
||||||
parms="-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 Settings ####
|
||||||
|
|
||||||
|
## LinuxGSM Stats
|
||||||
|
# Send useful stats to LinuxGSM developers.
|
||||||
|
# https://docs.linuxgsm.com/configuration/linuxgsm-stats
|
||||||
|
# (on|off)
|
||||||
|
stats="off"
|
||||||
|
|
||||||
## Notification Alerts
|
## Notification Alerts
|
||||||
# (on|off)
|
# (on|off)
|
||||||
|
|
||||||
@ -70,6 +73,11 @@ email="$LGSM_EMAIL"
|
|||||||
#shellcheck disable=SC2034
|
#shellcheck disable=SC2034
|
||||||
emailfrom="$LGSM_EMAILFROM"
|
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
|
# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt
|
||||||
#shellcheck disable=SC2034
|
#shellcheck disable=SC2034
|
||||||
iftttalert="$LGSM_IFTTTALERT"
|
iftttalert="$LGSM_IFTTTALERT"
|
||||||
@ -81,6 +89,7 @@ iftttevent="$LGSM_IFTTTEVENT"
|
|||||||
# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun
|
# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun
|
||||||
#shellcheck disable=SC2034
|
#shellcheck disable=SC2034
|
||||||
mailgunalert="$LGSM_MAILGUNALERT"
|
mailgunalert="$LGSM_MAILGUNALERT"
|
||||||
|
mailgunapiregion="us"
|
||||||
#shellcheck disable=SC2034
|
#shellcheck disable=SC2034
|
||||||
mailguntoken="$LGSM_MAILGUNTOKEN"
|
mailguntoken="$LGSM_MAILGUNTOKEN"
|
||||||
#shellcheck disable=SC2034
|
#shellcheck disable=SC2034
|
||||||
@ -98,16 +107,28 @@ pushbullettoken="$LGSM_PUSHBULLETTOKEN"
|
|||||||
#shellcheck disable=SC2034
|
#shellcheck disable=SC2034
|
||||||
channeltag="$LGSM_CHANNELTAG"
|
channeltag="$LGSM_CHANNELTAG"
|
||||||
|
|
||||||
|
|
||||||
# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover
|
# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover
|
||||||
#shellcheck disable=SC2034
|
#shellcheck disable=SC2034
|
||||||
pushoveralert="$LGSM_PUSHOVERALERT"
|
pushoveralert="$LGSM_PUSHOVERALERT"
|
||||||
#shellcheck disable=SC2034
|
#shellcheck disable=SC2034
|
||||||
pushovertoken="$LGSM_PUSHOVERTOKEN"
|
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
|
# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram
|
||||||
# You can add a custom cURL string eg proxy (useful in Russia) or else in "curlcustomstring".
|
# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring".
|
||||||
# like a "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help", if you not need
|
# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help".
|
||||||
# any custom string in curl - simple ignore this parameter.
|
#shellcheck disable=SC2034
|
||||||
|
telegramapi="api.telegram.org"
|
||||||
#shellcheck disable=SC2034
|
#shellcheck disable=SC2034
|
||||||
telegramalert="$LGSM_TELEGRAMALERT"
|
telegramalert="$LGSM_TELEGRAMALERT"
|
||||||
#shellcheck disable=SC2034
|
#shellcheck disable=SC2034
|
||||||
@ -140,23 +161,84 @@ logdays="$LGSM_LOGDAYS"
|
|||||||
#shellcheck disable=SC2034
|
#shellcheck disable=SC2034
|
||||||
querydelay="$LGSM_QUERYDELAY"
|
querydelay="$LGSM_QUERYDELAY"
|
||||||
|
|
||||||
#### LinuxGSM Advanced Settings ####
|
## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors
|
||||||
|
|
||||||
# ANSI Colors
|
|
||||||
#shellcheck disable=SC2034
|
|
||||||
ansi="on"
|
ansi="on"
|
||||||
|
|
||||||
# Message Display Time
|
#### Advanced Settings ####
|
||||||
#shellcheck disable=SC2034
|
|
||||||
|
## Message Display Time | https://docs.linuxgsm.com/features/message-display-time
|
||||||
sleeptime="0.5"
|
sleeptime="0.5"
|
||||||
|
|
||||||
## SteamCMD Settings
|
## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd
|
||||||
# Server appid
|
# Server appid
|
||||||
#shellcheck disable=SC2034
|
|
||||||
appid="4020"
|
appid="4020"
|
||||||
|
steamcmdforcewindows="no"
|
||||||
# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch
|
# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch
|
||||||
#shellcheck disable=SC2034
|
|
||||||
branch="$LGSM_BRANCH"
|
branch="$LGSM_BRANCH"
|
||||||
|
betapassword=""
|
||||||
# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server
|
# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server
|
||||||
#shellcheck disable=SC2034
|
#shellcheck disable=SC2034
|
||||||
steammaster="$LGSM_STEAMMASTER"
|
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"
|
Loading…
Reference in New Issue
Block a user