diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug-report.md similarity index 93% rename from .github/ISSUE_TEMPLATE/bug_report.md rename to .github/ISSUE_TEMPLATE/bug-report.md index d3c1adfbb..31d08d206 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -1,8 +1,12 @@ --- -name: Bug report +name: Bug Report about: Found a bug? Raise a report. +title: "[BUG]" +labels: 'type: bug' +assignees: '' --- + Issues raised here are **ONLY** for: * LinuxGSM bugs. * Feature suggestions. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature-request.md similarity index 91% rename from .github/ISSUE_TEMPLATE/feature_request.md rename to .github/ISSUE_TEMPLATE/feature-request.md index dc51fe40e..8ba27fa9f 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -1,6 +1,9 @@ --- -name: Feature request +name: Feature Request about: Suggest an idea for LinuxGSM. +title: "[FEATURE]" +labels: 'type: feature request' +assignees: '' --- diff --git a/.github/ISSUE_TEMPLATE/new-server-request.md b/.github/ISSUE_TEMPLATE/new-server-request.md index ada8638cc..84176741f 100644 --- a/.github/ISSUE_TEMPLATE/new-server-request.md +++ b/.github/ISSUE_TEMPLATE/new-server-request.md @@ -1,6 +1,9 @@ --- -name: New server request +name: New Server Request about: Suggest a new game server to be added. +title: "[Server Request]" +labels: 'type: game server request' +assignees: '' --- diff --git a/.github/issue_label_bot.yaml b/.github/issue_label_bot.yaml deleted file mode 100644 index ee6d724f1..000000000 --- a/.github/issue_label_bot.yaml +++ /dev/null @@ -1,4 +0,0 @@ -label-alias: - bug: 'type: bug' - feature_request: 'type: feature request' - question: 'question' diff --git a/.github/lock.yml b/.github/lock.yml deleted file mode 100644 index dd136ecdc..000000000 --- a/.github/lock.yml +++ /dev/null @@ -1,38 +0,0 @@ -# Configuration for Lock Threads - https://github.com/dessant/lock-threads - -# Number of days of inactivity before a closed issue or pull request is locked -daysUntilLock: 365 - -# Skip issues and pull requests created before a given timestamp. Timestamp must -# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable -skipCreatedBefore: false - -# Issues and pull requests with these labels will be ignored. Set to `[]` to disable -exemptLabels: [] - -# Label to add before locking, such as `outdated`. Set to `false` to disable -lockLabel: false - -# Comment to post before locking. Set to `false` to disable -lockComment: > - This thread has been automatically locked since there has not been - any recent activity after it was closed. Please open a new issue for - related bugs. - -# Assign `resolved` as the reason for locking. Set to `false` to disable -setLockReason: false - -# Limit to only `issues` or `pulls` -# only: issues - -# Optionally, specify configuration settings just for `issues` or `pulls` -# issues: -# exemptLabels: -# - help-wanted -# lockLabel: outdated - -# pulls: -# daysUntilLock: 30 - -# Repository to extend settings from -# _extends: repo \ No newline at end of file diff --git a/.github/no-response.yml b/.github/no-response.yml deleted file mode 100644 index a883b161e..000000000 --- a/.github/no-response.yml +++ /dev/null @@ -1,10 +0,0 @@ -# Configuration for probot-no-response - https://github.com/probot/no-response - -# Number of days of inactivity before an Issue is closed for lack of response -daysUntilClose: 60 -# Label requiring a response -responseRequiredLabel: "waiting response" -# Comment to post when closing an Issue for lack of response. Set to `false` to disable -closeComment: > - This issue has been automatically closed because there has been no response - to this issue and is now stale. diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 1387c5e19..27bcee3fb 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,4 +1,4 @@ template: | - ## Changelog + ## What’s Changed - $CHANGES \ No newline at end of file + $CHANGES diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml new file mode 100644 index 000000000..f82cb60d9 --- /dev/null +++ b/.github/workflows/create-release.yml @@ -0,0 +1,17 @@ +name: Release Drafter + +on: + push: + # branches to consider in the event; optional, defaults to all + branches: + - master +jobs: + update_release_draft: + runs-on: ubuntu-latest + steps: + # Drafts your next Release notes as Pull Requests are merged into "master" + - uses: release-drafter/release-drafter@v5 + with: + config-name: release-drafter.yml + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/git-sync.yml b/.github/workflows/git-sync.yml index c058b6d24..a5a827096 100644 --- a/.github/workflows/git-sync.yml +++ b/.github/workflows/git-sync.yml @@ -1,4 +1,4 @@ -name: Backup Repo +name: Github to Bitbucket sync # This action will sync the github repo with a backup bitbucket repo. # This will allow LinuxGSM to use Bitbucket as and alternative download if github fails. on: diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 000000000..316f08b98 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,16 @@ +name: "Set Issue Label and Assignee" +on: + issues: + types: [opened, edited] + pull_request: + types: [opened, edited] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: Naturalclar/issue-action@v2.0.2 + with: + title-or-body: "both" + parameters: '[ {"keywords": ["Server Request"], "labels": ["type: game server request"]}, {"keywords": ["backup"], "labels": ["command: backup"]}, {"keywords": ["console"], "labels": ["command: console"]}, {"keywords": ["command: debug"], "labels": ["command: debug"]}, {"keywords": ["command: details"], "labels": ["command: details"]}, {"keywords": ["fast-dl"], "labels": ["command: fast-dl"]}, {"keywords": ["command: install"], "labels": ["command: install"]}, {"keywords": ["command: mods"], "labels": ["command: mods"]}, {"keywords": ["monitor"], "labels": ["command: monitor"]}, {"keywords": ["command: start"], "labels": ["command: start"]}, {"keywords": ["command: stop"], "labels": ["command: stop"]}, {"keywords": ["command: update-lgsm"], "labels": ["command: update-lgsm"]}, {"keywords": ["update"], "labels": ["command: update"]}, {"keywords": ["validate"], "labels": ["command: validate"]}, {"keywords": ["wipe"], "labels": ["command: wipe"]}, {"keywords": ["CentOS"], "labels": ["distro: CentOS"]}, {"keywords": ["Debian"], "labels": ["distro: Debian"]}, {"keywords": ["Fedora"], "labels": ["distro: Fedora"]}, {"keywords": ["Ubuntu"], "labels": ["distro: Ubuntu"]}, {"keywords": ["alert"], "labels": ["info: alerts"]}, {"keywords": ["dependency"], "labels": ["info: dependency"]}, {"keywords": ["docker"], "labels": ["info: docker"]}, {"keywords": ["steamcmd"], "labels": ["info: steamcmd"]}, {"keywords": ["systemd"], "labels": ["info: systemd"]}, {"keywords": ["tmux"], "labels": ["info: tmux"]}, {"keywords": ["bug"], "labels": ["type: bug"]}, {"keywords": ["feature"], "labels": ["type: feature request"]}, {"keywords": ["refactor"], "labels": ["type: refactor"]}, {"keywords": ["Ark"], "labels": ["game: Ark: Survival Evolved"]}, {"keywords": ["Arma 3"], "labels": ["game: Arma 3"]}, {"keywords": ["Counter-Strike: Global Offensive"], "labels": ["game: Counter-Strike: Global Offensive"]}, {"keywords": ["Minecraft"], "labels": ["game: Minecraft"]}, {"keywords": ["Rust"], "labels": ["game: Rust"]}, {"keywords": ["Valheim"], "labels": ["game: Valheim"]}, {"keywords": ["7 Days to Die"], "labels": ["game: 7 Days to Die"]}]' + github-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml new file mode 100644 index 000000000..63f0cf2db --- /dev/null +++ b/.github/workflows/lock.yml @@ -0,0 +1,21 @@ +name: 'Lock Threads' + +on: + schedule: + - cron: '0 0 * * *' + +jobs: + lock: + runs-on: ubuntu-latest + steps: + - uses: dessant/lock-threads@v2 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + issue-lock-comment: > + This issue has been automatically locked since there + has not been any recent activity after it was closed. + Please open a new issue for related bugs. + pr-lock-comment: > + This pull request has been automatically locked since there + has not been any recent activity after it was closed. + Please open a new issue for related bugs. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bcb1caf7f..4a114d2fc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -48,8 +48,7 @@ Before creating bug reports, please check [this list](https://github.com/GameSer #### Before Submitting A Bug Report * **Check the [documentation](https://docs.linuxgsm.com).** You might be able to find the cause of the problem and fix things yourself. -* **Check that the problem is not related to** [**support page**](https://linuxgsm/com/support) for links to other support options. -* **Check the** [**support page**](https://linuxgsm/com/support) for links to other support options. +* **Check the** [**support page**](https://linuxgsm.com/support) for links to other support options. * **Perform a** [**cursory search**](https://github.com/search?q=org:GameServerManagers%20type:issues&type=Issues) to see if the problem has already been reported. If it has **and the issue is still open**, add a comment to the existing issue and give it a thumbs up instead of opening a new one. #### How Do I Submit A (Good) Bug Report? diff --git a/lgsm/config-default/config-lgsm/acserver/_default.cfg b/lgsm/config-default/config-lgsm/acserver/_default.cfg index f64c34ac3..728671a7a 100644 --- a/lgsm/config-default/config-lgsm/acserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/acserver/_default.cfg @@ -15,9 +15,7 @@ steampass='password' ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-c ${servercfgfullpath}" -} +startparameters="-c ${servercfgfullpath}" #### LinuxGSM Settings #### @@ -80,6 +78,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -112,6 +111,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="302550" +steamcmdforcewindows="yes" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg index 505076703..533d827f1 100644 --- a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg @@ -21,9 +21,7 @@ defaultmap="act_airport" maxplayers="20" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game ahl2 -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game ahl2 -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -86,6 +84,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -115,6 +114,16 @@ ansi="on" ## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd +# Server appid +appid="985050" +steamcmdforcewindows="no" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="true" + ## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c @@ -138,14 +147,6 @@ stopmode="3" querymode="2" querytype="protocol-valve" -## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd -# Server appid -appid="985050" -# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch -branch="" -betapassword="" -# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server -steammaster="true" ## Console type consoleverbose="yes" diff --git a/lgsm/config-default/config-lgsm/ahlserver/_default.cfg b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg index 9e52094a0..931d3bd4b 100644 --- a/lgsm/config-default/config-lgsm/ahlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg @@ -16,9 +16,7 @@ defaultmap="ahl_hydro" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game action -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers} " -} +startparameters="-game action -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers} " #### LinuxGSM Settings #### @@ -81,6 +79,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -113,6 +112,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" +steamcmdforcewindows="no" appidmod="cstrike" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg index f289cd1fb..57635b6d3 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -13,15 +13,13 @@ ip="0.0.0.0" port="7777" queryport="27015" rconport="27020" -# Default Map: TheIsland, Ragnarok, CrystalIsles, Aberration_P, ScorchedEarth_P +# Default Map: TheIsland, Ragnarok, CrystalIsles, Aberration_P, ScorchedEarth_P, TheCenter, Extinction, Valguero_P, Genesis defaultmap="TheIsland" altsavedirectoryname="${defaultmap}" maxplayers="70" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="${defaultmap}?AltSaveDirectoryName=${altsavedirectoryname}?listen?MultiHome=${ip}?MaxPlayers=${maxplayers}?QueryPort=${queryport}?RCONPort=${rconport}?Port=${port} -automanagedmods -crossplay -PublicIPForEpic=${ip}" -} +startparameters="${defaultmap}?AltSaveDirectoryName=${altsavedirectoryname}?listen?MultiHome=${ip}?MaxPlayers=${maxplayers}?QueryPort=${queryport}?RCONPort=${rconport}?Port=${port} -automanagedmods -crossplay -PublicIPForEpic=${ip}" #### LinuxGSM Settings #### @@ -84,6 +82,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -116,6 +115,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="376030" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/arma3server/_default.cfg b/lgsm/config-default/config-lgsm/arma3server/_default.cfg index acdbedb59..7b338811a 100644 --- a/lgsm/config-default/config-lgsm/arma3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/arma3server/_default.cfg @@ -32,9 +32,7 @@ servermods="" bepath="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-ip=${ip} -port=${port} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod=${mods} -servermod=${servermods} -bepath=${bepath} -autoinit -loadmissiontomemory" -} +startparameters="-ip=${ip} -port=${port} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod=${mods} -servermod=${servermods} -bepath=${bepath} -autoinit -loadmissiontomemory" #### LinuxGSM Settings #### @@ -97,6 +95,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -129,6 +128,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="233780" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" @@ -166,7 +166,7 @@ consoleinteract="no" # Do not edit gamename="ARMA 3" engine="realvirtuality" -glibc="2.13" +glibc="2.27" #### Directories #### # Edit with care @@ -174,7 +174,7 @@ glibc="2.13" ## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" -executable="./arma3server" +executable="./arma3server_x64" servercfgdir="${systemdir}/cfg" servercfg="${selfname}.server.cfg" servercfgdefault="server.cfg" diff --git a/lgsm/config-default/config-lgsm/avserver/_default.cfg b/lgsm/config-default/config-lgsm/avserver/_default.cfg index a8e6fb049..17d670d0f 100644 --- a/lgsm/config-default/config-lgsm/avserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/avserver/_default.cfg @@ -12,14 +12,12 @@ port="27000" # https://steamidfinder.com adminsteamid="" - -## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -if [ ! -z "${adminsteamid}" ]; then +if [ -n "${adminsteamid}" ]; then admincmd="--admin ${adminsteamid}" fi -parms="--galaxy-name ${selfname} --ip ${ip} --datapath ${avdatapath} ${admincmd}" -} + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="--galaxy-name ${selfname} --ip ${ip} --datapath ${avdatapath} ${admincmd}" #### LinuxGSM Settings #### @@ -28,6 +26,7 @@ parms="--galaxy-name ${selfname} --ip ${ip} --datapath ${avdatapath} ${admincmd} # https://docs.linuxgsm.com/configuration/linuxgsm-stats # (on|off) stats="off" + ## Notification Alerts # (on|off) @@ -81,6 +80,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -109,9 +109,11 @@ ansi="on" ## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" + ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="565060" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" @@ -141,6 +143,10 @@ stopmode="10" querymode="5" querytype="" +## Console type +consoleverbose="yes" +consoleinteract="yes" + ## Game Server Details # Do not edit gamename="Avorion" diff --git a/lgsm/config-default/config-lgsm/bb2server/_default.cfg b/lgsm/config-default/config-lgsm/bb2server/_default.cfg index 2f35f1c9d..800379706 100644 --- a/lgsm/config-default/config-lgsm/bb2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bb2server/_default.cfg @@ -22,9 +22,7 @@ maxplayers="20" gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game brainbread2 -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game brainbread2 -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -87,6 +85,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -119,6 +118,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="475370" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/bbserver/_default.cfg b/lgsm/config-default/config-lgsm/bbserver/_default.cfg index 573c9964b..9576c708f 100644 --- a/lgsm/config-default/config-lgsm/bbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bbserver/_default.cfg @@ -16,9 +16,7 @@ defaultmap="bb_chp4_slaywatch" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game brainbread -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game brainbread -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -81,6 +79,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -113,6 +112,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" +steamcmdforcewindows="no" appidmod="cstrike" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" diff --git a/lgsm/config-default/config-lgsm/bdserver/_default.cfg b/lgsm/config-default/config-lgsm/bdserver/_default.cfg index 746169c5b..f1ae81a1f 100644 --- a/lgsm/config-default/config-lgsm/bdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bdserver/_default.cfg @@ -16,9 +16,7 @@ defaultmap="pve_tomb" maxplayers="3" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game bdef -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game bdef -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -81,6 +79,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -113,6 +112,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="817300" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg index 6a498aaaf..12f9ea76c 100644 --- a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg @@ -9,9 +9,7 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="+hostServer 1 +dedicated 1" -} +startparameters="+hostServer 1 +dedicated 1" #### LinuxGSM Settings #### @@ -74,6 +72,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" diff --git a/lgsm/config-default/config-lgsm/bfvserver/_default.cfg b/lgsm/config-default/config-lgsm/bfvserver/_default.cfg index a62b9cdcd..f8d7994e2 100644 --- a/lgsm/config-default/config-lgsm/bfvserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bfvserver/_default.cfg @@ -9,9 +9,7 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="+statusMonitor 1" -} +startparameters="+statusMonitor 1" #### LinuxGSM Settings #### @@ -74,6 +72,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" diff --git a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg index b9ebbce02..2921250d7 100644 --- a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg @@ -22,9 +22,7 @@ maxplayers="16" gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game bms -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game bms -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -87,6 +85,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -119,6 +118,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="346680" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/boserver/_default.cfg b/lgsm/config-default/config-lgsm/boserver/_default.cfg index 907f72a4c..dd779cd6a 100644 --- a/lgsm/config-default/config-lgsm/boserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/boserver/_default.cfg @@ -15,9 +15,7 @@ gslt="" ip="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-batchmode -nographics -dedicated -configfile=${servercfgfullpath}" -} +startparameters="-batchmode -nographics -dedicated -configfile=${servercfgfullpath}" #### LinuxGSM Settings #### @@ -80,6 +78,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -112,6 +111,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="416880" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/bsserver/_default.cfg b/lgsm/config-default/config-lgsm/bsserver/_default.cfg index f23980d49..8a9af8b1a 100644 --- a/lgsm/config-default/config-lgsm/bsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bsserver/_default.cfg @@ -26,9 +26,7 @@ maxplayers="16" gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game "${serverfiles}/berimbau" -autoupdate -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game "${serverfiles}/berimbau" -autoupdate -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -91,6 +89,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -123,6 +122,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="228780" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/bt1944server/_default.cfg b/lgsm/config-default/config-lgsm/bt1944server/_default.cfg index 84b059dbe..aa4785985 100644 --- a/lgsm/config-default/config-lgsm/bt1944server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bt1944server/_default.cfg @@ -14,9 +14,7 @@ port="7777" queryport="7780" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="/Game/Maps/Final_Maps/Derailed?Game=/Script/ShooterGame.WartideGameMode?listen -log -broadcastip=\"${extip}\" -PORT=${port} -QueryPort=${queryport} -defgameini=\"${servercfgfullpath}\"" -} +startparameters="/Game/Maps/Final_Maps/Derailed?Game=/Script/ShooterGame.WartideGameMode?listen -log -broadcastip=\"${extip}\" -PORT=${port} -QueryPort=${queryport} -defgameini=\"${servercfgfullpath}\"" #### LinuxGSM Settings #### @@ -79,6 +77,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -111,6 +110,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="805140" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" @@ -161,6 +161,7 @@ servercfgdir="${systemdir}/Saved/Config/LinuxServer" servercfg="${selfname}.ini" servercfgdefault="DefaultGame.ini" servercfgfullpath="${servercfgdir}/${servercfg}" + ## Backup Directory backupdir="${lgsmdir}/backup" diff --git a/lgsm/config-default/config-lgsm/btserver/_default.cfg b/lgsm/config-default/config-lgsm/btserver/_default.cfg index c22a70533..dd695ec70 100644 --- a/lgsm/config-default/config-lgsm/btserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/btserver/_default.cfg @@ -9,9 +9,7 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="" -} +startparameters="" #### LinuxGSM Settings #### @@ -74,6 +72,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -106,6 +105,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="1026340" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/ccserver/_default.cfg b/lgsm/config-default/config-lgsm/ccserver/_default.cfg index 202535ce1..c9ceb5f5f 100644 --- a/lgsm/config-default/config-lgsm/ccserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ccserver/_default.cfg @@ -17,9 +17,7 @@ defaultmap="cbe_bunker" maxplayers="6" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game cure -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game cure -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -82,6 +80,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -114,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="383410" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/cmwserver/_default.cfg b/lgsm/config-default/config-lgsm/cmwserver/_default.cfg index 3f3e29c8b..da790a356 100644 --- a/lgsm/config-default/config-lgsm/cmwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cmwserver/_default.cfg @@ -14,13 +14,8 @@ port="7777" queryport="7779" defaultmap="AOCTD-Frigid_p" - ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ - -parms="${defaultmap}?steamsockets -multihome=${ip} -Port=${port} -QueryPort=${queryport} -seekfreeloadingserver -configsubdir=${gamelogdir} -log=${gamelog}" - -} +startparameters="${defaultmap}?steamsockets -multihome=${ip} -Port=${port} -QueryPort=${queryport} -seekfreeloadingserver -configsubdir=${gamelogdir} -log=${gamelog}" #### LinuxGSM Settings #### @@ -83,6 +78,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -115,6 +111,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="220070" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" @@ -156,6 +153,7 @@ glibc="2.15" #### Directories #### # Edit with care + ## Game Server Directories systemdir="${serverfiles}" executabledir="${systemdir}/Binaries/Linux" diff --git a/lgsm/config-default/config-lgsm/cod2server/_default.cfg b/lgsm/config-default/config-lgsm/cod2server/_default.cfg index 9dfb852e5..611a8a086 100644 --- a/lgsm/config-default/config-lgsm/cod2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod2server/_default.cfg @@ -15,9 +15,7 @@ defaultmap="mp_leningrad" maxplayers="20" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +exec ${servercfg} +map ${defaultmap}" -} +startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +exec ${servercfg} +map ${defaultmap}" #### LinuxGSM Settings #### @@ -80,6 +78,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" diff --git a/lgsm/config-default/config-lgsm/cod4server/_default.cfg b/lgsm/config-default/config-lgsm/cod4server/_default.cfg index b5ee4bc63..30dfbd177 100644 --- a/lgsm/config-default/config-lgsm/cod4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod4server/_default.cfg @@ -15,9 +15,7 @@ defaultmap="mp_crossfire" maxplayers="32" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set fs_homepath ${serverfiles} +set sv_authorizemode "-1" +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +exec ${servercfg} +map ${defaultmap}" -} +startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set fs_homepath ${serverfiles} +set sv_authorizemode "-1" +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +exec ${servercfg} +map ${defaultmap}" #### LinuxGSM Settings #### @@ -80,6 +78,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" diff --git a/lgsm/config-default/config-lgsm/codserver/_default.cfg b/lgsm/config-default/config-lgsm/codserver/_default.cfg index 377c2e6e4..7e22c1707 100644 --- a/lgsm/config-default/config-lgsm/codserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codserver/_default.cfg @@ -15,9 +15,7 @@ defaultmap="mp_neuville" maxplayers="20" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +exec ${servercfg} +map ${defaultmap}" -} +startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +exec ${servercfg} +map ${defaultmap}" #### LinuxGSM Settings #### @@ -80,6 +78,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" diff --git a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg index 0f179903a..19ba2098b 100644 --- a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg @@ -15,9 +15,7 @@ defaultmap="mp_cassino" maxplayers="20" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +exec ${servercfg} +map ${defaultmap}" -} +startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +exec ${servercfg} +map ${defaultmap}" #### LinuxGSM Settings #### @@ -80,6 +78,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" diff --git a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg index 1430387bc..427237992 100644 --- a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg @@ -15,9 +15,7 @@ defaultmap="mp_castle" maxplayers="20" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +exec ${servercfg} +map ${defaultmap}" -} +startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +set sv_maxclients ${maxplayers} +exec ${servercfg} +map ${defaultmap}" #### LinuxGSM Settings #### @@ -80,6 +78,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" diff --git a/lgsm/config-default/config-lgsm/colserver/_default.cfg b/lgsm/config-default/config-lgsm/colserver/_default.cfg new file mode 100644 index 000000000..85a1aab06 --- /dev/null +++ b/lgsm/config-default/config-lgsm/colserver/_default.cfg @@ -0,0 +1,178 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! +# Copy settings from here and use them in either: +# common.cfg - applies settings to every instance. +# [instance].cfg - applies settings to a specific instance. + +#### Game Server Settings #### + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +# Edit with care | https://colonysurvival.gamepedia.com/Dedicated_Server#Installation_.28Linux.29 +startparameters="-batchmode -nographics +server.config ${servercfgfullpath}" + +#### 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 +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun +mailgunalert="off" +mailgunapiregion="us" +mailguntoken="accesstoken" +mailgundomain="example.com" +mailgunemailfrom="alert@example.com" +mailgunemail="email@myemail.com" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" +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". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +## 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="748090" +steamcmdforcewindows="no" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="false" + +## 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="2" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Console type +consoleverbose="no" +consoleinteract="no" + +## Game Server Details +# Do not edit +gamename="Colony Survival" +engine="unity3d" +glibc="2.15" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}" +executabledir="${serverfiles}" +executable="./colonyserver.x86_64" +servercfgdir="${systemdir}/gamedata/settings" +servercfg="${selfname}.json" +servercfgdefault="colserver.json" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${serverfiles}/gamedata/logs/server/" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +gamelog="${gamelogdir}/${selfname}-game.log" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" + +## Logs Naming +gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log" +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" diff --git a/lgsm/config-default/config-lgsm/csczserver/_default.cfg b/lgsm/config-default/config-lgsm/csczserver/_default.cfg index a0fb7fea8..5edbaee9c 100644 --- a/lgsm/config-default/config-lgsm/csczserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csczserver/_default.cfg @@ -16,9 +16,7 @@ defaultmap="de_dust2" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game czero -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game czero -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -81,6 +79,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -113,6 +112,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" +steamcmdforcewindows="no" appidmod="czero" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" diff --git a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg index 2ed74049e..28f3082b3 100644 --- a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg @@ -42,9 +42,7 @@ wscollectionid="" wsstartmap="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game csgo -usercon -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} -tickrate ${tickrate} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers_override ${maxplayers} +mapgroup ${mapgroup} +game_type ${gametype} +game_mode ${gamemode} +host_workshop_collection ${wscollectionid} +workshop_start_map ${wsstartmap} -authkey ${wsapikey} -nobreakpad" -} +startparameters="-game csgo -usercon -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} -tickrate ${tickrate} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers_override ${maxplayers} +mapgroup ${mapgroup} +game_type ${gametype} +game_mode ${gamemode} +host_workshop_collection ${wscollectionid} +workshop_start_map ${wsstartmap} -authkey ${wsapikey} -nobreakpad" #### LinuxGSM Settings #### @@ -107,6 +105,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -139,6 +138,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="740" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" @@ -157,7 +157,7 @@ steammaster="true" # 9: GoldSrc # 10: Avorion # 11: end -stopmode="3" +stopmode="9" ## Query mode # 1: session only diff --git a/lgsm/config-default/config-lgsm/csserver/_default.cfg b/lgsm/config-default/config-lgsm/csserver/_default.cfg index a5661c890..a72d3b3cd 100644 --- a/lgsm/config-default/config-lgsm/csserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csserver/_default.cfg @@ -16,9 +16,7 @@ defaultmap="de_dust2" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game cstrike -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game cstrike -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -81,6 +79,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -113,6 +112,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" +steamcmdforcewindows="no" appidmod="cstrike" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" diff --git a/lgsm/config-default/config-lgsm/cssserver/_default.cfg b/lgsm/config-default/config-lgsm/cssserver/_default.cfg index 56f430bb6..a8b6b122b 100644 --- a/lgsm/config-default/config-lgsm/cssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cssserver/_default.cfg @@ -22,9 +22,7 @@ maxplayers="16" gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game cstrike -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game cstrike -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -87,6 +85,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -119,6 +118,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="232330" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/dabserver/_default.cfg b/lgsm/config-default/config-lgsm/dabserver/_default.cfg index ea6bcf390..61050282e 100644 --- a/lgsm/config-default/config-lgsm/dabserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dabserver/_default.cfg @@ -17,9 +17,7 @@ defaultmap="da_rooftops" maxplayers="10" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -82,6 +80,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -114,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="317800" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg index 8babab1dd..335ba7b56 100644 --- a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg @@ -16,9 +16,7 @@ defaultmap="dcdm5" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game dmc -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game dmc -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -81,6 +79,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -113,6 +112,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" +steamcmdforcewindows="no" appidmod="dmc" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" diff --git a/lgsm/config-default/config-lgsm/dodserver/_default.cfg b/lgsm/config-default/config-lgsm/dodserver/_default.cfg index 83b051930..1e87b20b6 100644 --- a/lgsm/config-default/config-lgsm/dodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodserver/_default.cfg @@ -16,9 +16,7 @@ defaultmap="dod_Anzio" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game dod -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game dod -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -81,6 +79,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -113,6 +112,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" +steamcmdforcewindows="no" appidmod="dod" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" diff --git a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg index 3af945122..87caa5a69 100644 --- a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg @@ -17,9 +17,7 @@ defaultmap="dod_Anzio" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game dod -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game dod -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -82,6 +80,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -114,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="232290" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/doiserver/_default.cfg b/lgsm/config-default/config-lgsm/doiserver/_default.cfg index deb15b2dc..2099d2296 100644 --- a/lgsm/config-default/config-lgsm/doiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/doiserver/_default.cfg @@ -18,9 +18,7 @@ maxplayers="32" tickrate="64" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game doi -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -tickrate ${tickrate} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers} -workshop -norestart" -} +startparameters="-game doi -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -tickrate ${tickrate} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers} -workshop -norestart" #### LinuxGSM Settings #### @@ -83,6 +81,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -115,6 +114,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="462310" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/dstserver/_default.cfg b/lgsm/config-default/config-lgsm/dstserver/_default.cfg index 6e746fb83..766b3a706 100644 --- a/lgsm/config-default/config-lgsm/dstserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dstserver/_default.cfg @@ -20,9 +20,7 @@ persistentstorageroot="${HOME}/.klei" confdir="DoNotStarveTogether" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-persistent_storage_root ${persistentstorageroot} -conf_dir ${confdir} -cluster ${cluster} -shard ${shard}" -} +startparameters="-persistent_storage_root ${persistentstorageroot} -conf_dir ${confdir} -cluster ${cluster} -shard ${shard}" #### LinuxGSM Settings #### @@ -85,6 +83,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -117,6 +116,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="343050" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/dysserver/_default.cfg b/lgsm/config-default/config-lgsm/dysserver/_default.cfg index c45a12bee..59d36fa9f 100644 --- a/lgsm/config-default/config-lgsm/dysserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dysserver/_default.cfg @@ -22,9 +22,7 @@ maxplayers="16" gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game "${serverfiles}/dystopia" -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game "${serverfiles}/dystopia" -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -87,6 +85,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -119,6 +118,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="17585" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg index c515595e2..d99a754d2 100644 --- a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg @@ -9,9 +9,7 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-nogui" -} +startparameters="-nogui" #### LinuxGSM Settings #### @@ -74,6 +72,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -106,6 +105,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="739590" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" @@ -136,8 +136,8 @@ querymode="1" querytype="" ## Console type -consoleverbose="" -consoleinteract="" +consoleverbose="yes" +consoleinteract="no" ## Game Server Details # Do not edit diff --git a/lgsm/config-default/config-lgsm/emserver/_default.cfg b/lgsm/config-default/config-lgsm/emserver/_default.cfg index be13dac6b..6e782cc24 100644 --- a/lgsm/config-default/config-lgsm/emserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/emserver/_default.cfg @@ -22,9 +22,7 @@ maxplayers="62" gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game empires -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game empires -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -87,6 +85,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -119,6 +118,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="460040" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/etlserver/_default.cfg b/lgsm/config-default/config-lgsm/etlserver/_default.cfg index 0d2bf1a8c..dec02d4b3 100644 --- a/lgsm/config-default/config-lgsm/etlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/etlserver/_default.cfg @@ -9,9 +9,7 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="+set net_strict 1 +set fs_homepath ${serverfiles} +exec ${servercfg}" -} +startparameters="+set net_strict 1 +set fs_homepath ${serverfiles} +exec ${servercfg}" #### LinuxGSM Settings #### @@ -74,6 +72,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" diff --git a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg index 8a808f7f3..b6d1fcd34 100644 --- a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg @@ -17,9 +17,7 @@ rconpassword="CHANGE_ME" branch="stable" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="--bind ${ip} --start-server ${serverfiles}/save1.zip --server-settings ${servercfgfullpath} --port ${port} --rcon-port ${rconport} --rcon-password ${rconpassword}" -} +startparameters="--bind ${ip} --start-server ${serverfiles}/save1.zip --server-settings ${servercfgfullpath} --port ${port} --rcon-port ${rconport} --rcon-password ${rconpassword}" #### LinuxGSM Settings #### @@ -82,6 +80,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" diff --git a/lgsm/config-default/config-lgsm/fofserver/_default.cfg b/lgsm/config-default/config-lgsm/fofserver/_default.cfg index 1452805b8..736d78ca8 100644 --- a/lgsm/config-default/config-lgsm/fofserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/fofserver/_default.cfg @@ -17,9 +17,7 @@ defaultmap="fof_depot" maxplayers="20" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game fof -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game fof -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -82,6 +80,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -114,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="295230" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg index 1e8fb92aa..ed8b2f8e8 100644 --- a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg @@ -18,24 +18,18 @@ maxplayers="16" tickrate="66" gamemode="sandbox" -## Workshop Parameters | https://wiki.garrysmod.com/page/Workshop_for_Dedicated_Servers +## Workshop Parameters | https://wiki.facepunch.com/gmod/Workshop_for_Dedicated_Servers # To get an API key visit - https://steamcommunity.com/dev/apikey wsapikey="" wscollectionid="" -## Custom Start Parameters -# Default -disableluarefresh, disables lua autorefresh reducing server lag. Auto refresh only useful for developers. -customparms="-disableluarefresh" - ## Game Server Login Token (GSLT): Optional # GSLT can be used for running a public server. # More info: https://docs.linuxgsm.com/steamcmd/gslt gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -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}" -} +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} -disableluarefresh" #### LinuxGSM Settings #### @@ -98,6 +92,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -130,6 +125,7 @@ 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="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg index f356b1238..6c268b108 100644 --- a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg @@ -17,9 +17,7 @@ defaultmap="dm_lockdown" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game hl2mp -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game hl2mp -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -82,6 +80,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -114,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="232370" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg index 41b702789..361c1f7b7 100644 --- a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg @@ -16,9 +16,7 @@ defaultmap="crossfire" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game valve -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game valve -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -81,6 +79,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -113,6 +112,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg index 7c04267ad..127519b40 100644 --- a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg @@ -17,9 +17,7 @@ defaultmap="crossfire" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game hl1mp -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game hl1mp -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -82,6 +80,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -114,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="255470" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/hwserver/_default.cfg b/lgsm/config-default/config-lgsm/hwserver/_default.cfg index eda9972d3..793e3d77c 100644 --- a/lgsm/config-default/config-lgsm/hwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hwserver/_default.cfg @@ -28,9 +28,7 @@ loadsave="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters # Edit with care | http://hurtworld.wikia.com/wiki/Hosting_A_Server -fn_parms(){ -parms="-batchmode -nographics -exec \"host ${port} ${defaultmap} ${loadsave};queryport ${queryport};maxplayers ${maxplayers};servername ${servername};creativemode ${creativemode};${admins}\"" -} +startparameters="-batchmode -nographics -exec \"host ${port} ${defaultmap} ${loadsave};queryport ${queryport};maxplayers ${maxplayers};servername ${servername};creativemode ${creativemode};${admins}\"" #### LinuxGSM Settings #### @@ -93,6 +91,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -125,6 +124,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="405100" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/insserver/_default.cfg b/lgsm/config-default/config-lgsm/insserver/_default.cfg index 50e3e8721..6dbf464ce 100644 --- a/lgsm/config-default/config-lgsm/insserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/insserver/_default.cfg @@ -23,9 +23,7 @@ tickrate="64" gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game insurgency -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -tickrate ${tickrate} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers} -workshop -norestart" -} +startparameters="-game insurgency -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -tickrate ${tickrate} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers} -workshop -norestart" #### LinuxGSM Settings #### @@ -88,6 +86,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -120,6 +119,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="237410" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/inssserver/_default.cfg b/lgsm/config-default/config-lgsm/inssserver/_default.cfg index 07bc89a60..e9895b132 100644 --- a/lgsm/config-default/config-lgsm/inssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/inssserver/_default.cfg @@ -13,20 +13,13 @@ ip="0.0.0.0" port="27102" queryport="27131" servername="LinuxGSM Server" -serverpassword="" defaultmap="Canyon" defaultscenario="Scenario_Crossing_Push_Security" maxplayers="28" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ - # Allows serverpassword to work with parameters - if [ "${serverpassword}" != "NOT SET" ]; then - parms="${defaultmap}?Scenario=${defaultscenario}?MaxPlayers=${maxplayers}?Port=${port}?QueryPort=${queryport}?password="${serverpassword}" -hostname="${servername}" -log" - else - parms="${defaultmap}?Scenario=${defaultscenario}?MaxPlayers=${maxplayers}?Port=${port}?QueryPort=${queryport} -hostname="${servername}" -log" - fi -} +## Parameter Docs | https://sandstorm-support.newworldinteractive.com/hc/en-us/articles/360049211072-Server-Admin-Guide +startparameters="${defaultmap}?Scenario=${defaultscenario}?MaxPlayers=${maxplayers} -Port=${port} -QueryPort=${queryport} -hostname='${servername}' -log" #### LinuxGSM Settings #### @@ -89,6 +82,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -121,6 +115,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="581330" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" @@ -170,7 +165,6 @@ executable="./InsurgencyServer-Linux-Shipping" servercfgdir="${systemdir}/Saved/Config/LinuxServer" servercfg="Game.ini" servercfgdefault="Game.ini" -servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory backupdir="${lgsmdir}/backup" diff --git a/lgsm/config-default/config-lgsm/iosserver/_default.cfg b/lgsm/config-default/config-lgsm/iosserver/_default.cfg index c322ed383..6ba806960 100644 --- a/lgsm/config-default/config-lgsm/iosserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/iosserver/_default.cfg @@ -17,9 +17,7 @@ defaultmap="8v8_vienna" maxplayers="32" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game iosoccer -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game iosoccer -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -82,6 +80,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -114,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="673990" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/jc2server/_default.cfg b/lgsm/config-default/config-lgsm/jc2server/_default.cfg index c57af02ea..d57520398 100644 --- a/lgsm/config-default/config-lgsm/jc2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc2server/_default.cfg @@ -9,9 +9,7 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="" -} +startparameters="" #### LinuxGSM Settings #### @@ -74,6 +72,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -106,6 +105,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="261140" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/jc3server/_default.cfg b/lgsm/config-default/config-lgsm/jc3server/_default.cfg index e208a42f4..46ab112a4 100644 --- a/lgsm/config-default/config-lgsm/jc3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc3server/_default.cfg @@ -9,9 +9,7 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="" -} +startparameters="" #### LinuxGSM Settings #### @@ -74,6 +72,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -106,6 +105,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="619960" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" @@ -162,7 +162,6 @@ backupdir="${lgsmdir}/backup" ## Logging Directories logdir="${rootdir}/log" -#gamelogdir="" # No server logs available lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${selfname}-script.log" diff --git a/lgsm/config-default/config-lgsm/jk2server/_default.cfg b/lgsm/config-default/config-lgsm/jk2server/_default.cfg index cb42989a7..a6bf4f7b1 100644 --- a/lgsm/config-default/config-lgsm/jk2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jk2server/_default.cfg @@ -1,29 +1,33 @@ ################################## ######## Default Settings ######## ################################## -# DO NOT EDIT WILL BE OVERWRITTEN! -# Copy settings from here and use them in either -# common.cfg - applies settings to every instance -# [instance].cfg - applies settings to a specific instance +# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! +# Copy settings from here and use them in either: +# common.cfg - applies settings to every instance. +# [instance].cfg - applies settings to a specific instance. -#### Server Settings #### +#### Game Server Settings #### ## SteamCMD Login | https://docs.linuxgsm.com/steamcmd#steamcmd-login steamuser="username" steampass='password' -## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters +## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" port="27960" defaultmap="ffa_bespin" -## Server Start Command | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set net_ip ${ip} +set net_port ${port} +exec ${servercfg} +map ${defaultmap}" -} +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set net_ip ${ip} +set net_port ${port} +exec ${servercfg} +map ${defaultmap}" #### 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) @@ -37,10 +41,6 @@ postalert="off" discordalert="off" discordwebhook="webhook" -# Slack Alerts | https://docs.linuxgsm.com/alerts/slack -slackalert="off" -slackwebhook="webhook" - # Email Alerts | https://docs.linuxgsm.com/alerts/email emailalert="off" email="email@example.com" @@ -74,9 +74,14 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -98,15 +103,25 @@ logdays="7" # Query delay time querydelay="1" -#### LinuxGSM Advanced Settings #### - -# ANSI Colors +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" -# Message Display Time +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" -# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd +# Server appid +appid="6030" +steamcmdforcewindows="yes" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="true" + +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -115,8 +130,9 @@ sleeptime="0.5" # 6: q # 7: exit # 8: 7 Days to Die -# 9: Gold Source -# 10: Teamspeak 3 +# 9: GoldSrc +# 10: Avorion +# 11: end stopmode="3" ## Query mode @@ -132,15 +148,7 @@ querytype="protocol-quake3" consoleverbose="yes" consoleinteract="yes" -## SteamCMD Settings -# Server appid -appid="6030" -# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch -branch="" -# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server -steammaster="true" - -## LinuxGSM Server Details +## Game Server Details # Do not edit gamename="Jedi Knight II: Jedi Outcast" engine="idtech3" @@ -149,7 +157,7 @@ glibc="2.15" #### Directories #### # Edit with care -## Server Specific Directories +## Game Server Directories systemdir="${serverfiles}/GameData" executabledir="${systemdir}" executable="./jk2mvded" @@ -159,7 +167,7 @@ servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory -backupdir="${rootdir}/backups" +backupdir="${lgsmdir}/backups" ## Logging Directories logdir="${rootdir}/log" diff --git a/lgsm/config-default/config-lgsm/kf2server/_default.cfg b/lgsm/config-default/config-lgsm/kf2server/_default.cfg index 175e082ab..5617a4cf5 100644 --- a/lgsm/config-default/config-lgsm/kf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/kf2server/_default.cfg @@ -15,9 +15,7 @@ defaultmap="KF-BioticsLab" gamemode="KFGameContent.KFGameInfo_VersusSurvival" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="\"${defaultmap}?Game=${gamemode}?ConfigSubDir=${selfname} -QueryPort=${queryport}\"" -} +startparameters="\"${defaultmap}?Game=${gamemode}?ConfigSubDir=${selfname} -QueryPort=${queryport}\"" #### LinuxGSM Settings #### @@ -80,6 +78,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -112,6 +111,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="232130" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" @@ -153,6 +153,7 @@ glibc="2.3.2" #### Directories #### # Edit with care + ## Game Server Directories systemdir="${serverfiles}" executabledir="${systemdir}/Binaries/Win64" diff --git a/lgsm/config-default/config-lgsm/kfserver/_default.cfg b/lgsm/config-default/config-lgsm/kfserver/_default.cfg index 0169f48d0..d1a672dcc 100644 --- a/lgsm/config-default/config-lgsm/kfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/kfserver/_default.cfg @@ -17,13 +17,11 @@ ip="0.0.0.0" defaultmap="KF-BioticsLab.rom" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="server ${defaultmap}?game=KFmod.KFGameType?VACSecured=true -nohomedir ini=${servercfg} log=${gamelog}" +startparameters="server ${defaultmap}?game=KFmod.KFGameType?VACSecured=true -nohomedir ini=${servercfg} log=${gamelog}" ## Server Parameters for Objective mode #defaultmap="KFO-Steamland" -#parms="server ${defaultmap}?Game=KFStoryGame.KFStoryGame?VACSecured=true -nohomedir ini=${servercfg} log=${gamelog}" -} +#startparameters="server ${defaultmap}?Game=KFStoryGame.KFStoryGame?VACSecured=true -nohomedir ini=${servercfg} log=${gamelog}" #### LinuxGSM Settings #### @@ -86,6 +84,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -118,6 +117,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="215360" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg index 718432852..5d947eca0 100644 --- a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg @@ -16,9 +16,7 @@ defaultmap="c5m1_waterfront" maxplayers="8" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game left4dead2 -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game left4dead2 -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -81,6 +79,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -113,6 +112,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="222860" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg index beacac9bb..0f1b2f4a4 100644 --- a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg @@ -16,9 +16,7 @@ defaultmap="l4d_hospital01_apartment" maxplayers="8" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game left4dead -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}" -} +startparameters="-game left4dead -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -81,6 +79,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -113,6 +112,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="222840" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/mcbserver/_default.cfg b/lgsm/config-default/config-lgsm/mcbserver/_default.cfg index b894ade1d..d5ad3b59f 100644 --- a/lgsm/config-default/config-lgsm/mcbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mcbserver/_default.cfg @@ -9,9 +9,7 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="" -} +startparameters="" #### LinuxGSM Settings #### @@ -74,6 +72,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -123,7 +122,7 @@ stopmode="5" # 3: gamedig # 4: gsquery # 5: tcp -querymode="4" +querymode="2" querytype="minecraftbe" ## Console type diff --git a/lgsm/config-default/config-lgsm/mcserver/_default.cfg b/lgsm/config-default/config-lgsm/mcserver/_default.cfg index b78195e3e..6cbdd8e15 100644 --- a/lgsm/config-default/config-lgsm/mcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mcserver/_default.cfg @@ -12,9 +12,7 @@ javaram="1024" # -Xmx$1024M ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="nogui" -} +startparameters="nogui" ## Release Settings | https://docs.linuxgsm.com/game-servers/minecraft#release-settings # Branch (release|snapshot) @@ -83,6 +81,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -151,7 +150,8 @@ glibc="null" ## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" -executable="java -Xmx${javaram}M -jar ${serverfiles}/minecraft_server.jar" +preexecutable="java -Xmx${javaram}M -jar" +executable="./minecraft_server.jar" servercfgdir="${systemdir}" servercfg="server.properties" servercfgdefault="server.properties" diff --git a/lgsm/config-default/config-lgsm/mhserver/_default.cfg b/lgsm/config-default/config-lgsm/mhserver/_default.cfg index c71081b89..bb4847c00 100644 --- a/lgsm/config-default/config-lgsm/mhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mhserver/_default.cfg @@ -17,9 +17,7 @@ queryport="27015" defaultmap="FFA_ThePit" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="Mordhau ${defaultmap} -log -MultiHome=${ip} -Port=${port} -BeaconPort=${beaconport} -QueryPort=${queryport}" -} +startparameters="Mordhau ${defaultmap} -log -MultiHome=${ip} -Port=${port} -BeaconPort=${beaconport} -QueryPort=${queryport}" #### LinuxGSM Settings #### @@ -82,6 +80,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -114,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="629800" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg index 54bdb5a06..9ab26b75a 100644 --- a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg @@ -14,9 +14,7 @@ port="12203" defaultmap="dm/mohdm1" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set fs_outputpath ${gamelogdir} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +exec ${servercfg} +map ${defaultmap}" -} +startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set fs_outputpath ${gamelogdir} +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +exec ${servercfg} +map ${defaultmap}" #### LinuxGSM Settings #### @@ -79,6 +77,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" diff --git a/lgsm/config-default/config-lgsm/momserver/_default.cfg b/lgsm/config-default/config-lgsm/momserver/_default.cfg index 7909b67e2..c4f469c61 100644 --- a/lgsm/config-default/config-lgsm/momserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/momserver/_default.cfg @@ -15,9 +15,7 @@ beaconport="15000" maxplayers="32" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-port="${port}" -beaconport="${beaconport}" -MULTIHOME="${ip}" -maxplayers=${maxplayers}" -} +startparameters="-port="${port}" -beaconport="${beaconport}" -MULTIHOME="${ip}" -maxplayers=${maxplayers}" #### LinuxGSM Settings #### @@ -80,6 +78,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -112,6 +111,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="897590" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" @@ -141,6 +141,10 @@ stopmode="2" querymode="1" querytype="" +## Console type +consoleverbose="yes" +consoleinteract="no" + ## Game Server Details # Do not edit gamename="Memories of Mars" diff --git a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg index 3a97169f8..027aa8cef 100644 --- a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg @@ -13,9 +13,7 @@ ip="0.0.0.0" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters # Edit with care -fn_parms(){ -parms="" -} +startparameters="" #### LinuxGSM Settings #### @@ -78,6 +76,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" diff --git a/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg b/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg index 3e798e2ee..0fe4ffabc 100644 --- a/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg @@ -9,9 +9,7 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-fg -ini ${servercfgfullpath}" -} +startparameters="-fg -ini ${servercfgfullpath}" #### LinuxGSM Settings #### @@ -74,6 +72,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -153,7 +152,6 @@ backupdir="${lgsmdir}/backup" ## Logging Directories logdir="${rootdir}/log" -#gamelogdir="" # No server logs available lgsmlogdir="${logdir}/script" consolelogdir="${logdir}/console" lgsmlog="${lgsmlogdir}/${selfname}-script.log" diff --git a/lgsm/config-default/config-lgsm/ndserver/_default.cfg b/lgsm/config-default/config-lgsm/ndserver/_default.cfg index 7ef270919..ee43d1f5d 100644 --- a/lgsm/config-default/config-lgsm/ndserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ndserver/_default.cfg @@ -17,9 +17,7 @@ defaultmap="hydro" maxplayers="32" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game nucleardawn -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game nucleardawn -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -82,6 +80,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -114,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="111710" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg index 41c057356..c3594cec8 100644 --- a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg @@ -22,9 +22,7 @@ maxplayers="8" gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game nmrih -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game nmrih -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -87,6 +85,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -119,6 +118,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="317670" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg index 1ccb9706e..f6e717698 100644 --- a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg @@ -24,9 +24,7 @@ serverpassword="" # -password \"${serverpassword}\" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser ${webadminuser} -webpassword \"${webadminpass}\" -webport ${webadminport} -map ${defaultmap} -limit ${maxplayers} -config_path \"${servercfgdir}\" -modstorage \"${modstoragedir}\" -mods \"${mods}\"" -} +startparameters="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser ${webadminuser} -webpassword \"${webadminpass}\" -webport ${webadminport} -map ${defaultmap} -limit ${maxplayers} -config_path \"${servercfgdir}\" -modstorage \"${modstoragedir}\" -mods \"${mods}\"" #### LinuxGSM Settings #### @@ -89,6 +87,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -121,6 +120,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="313900" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/ns2server/_default.cfg b/lgsm/config-default/config-lgsm/ns2server/_default.cfg index c132d539d..a4b93ad93 100644 --- a/lgsm/config-default/config-lgsm/ns2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2server/_default.cfg @@ -28,9 +28,7 @@ serverpassword="" # -password \"${serverpassword}\" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser ${webadminuser} -webpassword \"${webadminpass}\" -webport ${webadminport} -map ${defaultmap} -limit ${maxplayers} -config_path \"${servercfgdir}\" -logdir \"${gamelogdir}\" -modstorage \"${modstoragedir}\" -mods \"${mods}\"" -} +startparameters="-name \"${servername}\" -port ${port} -webadmin -webdomain ${ip} -webuser ${webadminuser} -webpassword \"${webadminpass}\" -webport ${webadminport} -map ${defaultmap} -limit ${maxplayers} -config_path \"${servercfgdir}\" -logdir \"${gamelogdir}\" -modstorage \"${modstoragedir}\" -mods \"${mods}\"" #### LinuxGSM Settings #### @@ -93,6 +91,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -125,6 +124,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="4940" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/nsserver/_default.cfg b/lgsm/config-default/config-lgsm/nsserver/_default.cfg index 2a2425f73..6ef66dc68 100644 --- a/lgsm/config-default/config-lgsm/nsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/nsserver/_default.cfg @@ -16,9 +16,7 @@ defaultmap="ns_hera" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game ns -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game ns -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -81,6 +79,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -113,6 +112,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" +steamcmdforcewindows="no" appidmod="cstrike" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" diff --git a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg index d564020ed..fc795cc6a 100644 --- a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg @@ -9,9 +9,7 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="--config ${servercfgfullpath}" -} +startparameters="--config ${servercfgfullpath}" #### LinuxGSM Settings #### @@ -74,6 +72,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -106,6 +105,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="1204170" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/opforserver/_default.cfg b/lgsm/config-default/config-lgsm/opforserver/_default.cfg index f0e54f511..ccd430e6f 100644 --- a/lgsm/config-default/config-lgsm/opforserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/opforserver/_default.cfg @@ -16,9 +16,7 @@ defaultmap="op4_bootcamp" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game gearbox -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game gearbox -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -81,6 +79,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -113,6 +112,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" +steamcmdforcewindows="no" appidmod="gearbox" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" diff --git a/lgsm/config-default/config-lgsm/pcserver/_default.cfg b/lgsm/config-default/config-lgsm/pcserver/_default.cfg index c02992f92..231948872 100644 --- a/lgsm/config-default/config-lgsm/pcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pcserver/_default.cfg @@ -9,9 +9,7 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="--config ${servercfg}" -} +startparameters="--config ${servercfg}" #### LinuxGSM Settings #### @@ -74,6 +72,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -106,6 +105,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="332670" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/pmcserver/_default.cfg b/lgsm/config-default/config-lgsm/pmcserver/_default.cfg new file mode 100644 index 000000000..8369b782c --- /dev/null +++ b/lgsm/config-default/config-lgsm/pmcserver/_default.cfg @@ -0,0 +1,173 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! +# Copy settings from here and use them in either: +# common.cfg - applies settings to every instance. +# [instance].cfg - applies settings to a specific instance. + +#### Game Server Settings #### + +## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +javaram="1024" # -Xmx$1024M + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="nogui" + +## Release Settings | https://docs.linuxgsm.com/game-servers/minecraft#release-settings +# Version (latest|1.16.5) +mcversion="latest" + +#### 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 +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun +mailgunalert="off" +mailgunapiregion="us" +mailguntoken="accesstoken" +mailgundomain="example.com" +mailgunemailfrom="alert@example.com" +mailgunemail="email@myemail.com" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" +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". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +## 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" + +## 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="5" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="minecraft" + +## Console type +consoleverbose="yes" +consoleinteract="yes" + +## Game Server Details +# Do not edit +gamename="PaperMC" +engine="lwjgl2" +glibc="null" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}" +executabledir="${serverfiles}" +preexecutable="java -Xmx${javaram}M -jar" +executable="./paper.jar" +servercfgdir="${systemdir}" +servercfg="server.properties" +servercfgdefault="server.properties" +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" diff --git a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg index 62a8af0ba..2a8a9cbc6 100644 --- a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg @@ -19,9 +19,7 @@ maxplayers="40" reservedslots="0" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="MULTIHOME=${ip} RANDOM=${randommap} Port=${port} QueryPort=${queryport} RCONPORT=${rconport} FIXEDMAXPLAYERS=${maxplayers} NumReservedSlots=${reservedslots}" -} +startparameters="MULTIHOME=${ip} RANDOM=${randommap} Port=${port} QueryPort=${queryport} RCONPORT=${rconport} FIXEDMAXPLAYERS=${maxplayers} NumReservedSlots=${reservedslots}" #### LinuxGSM Settings #### @@ -84,6 +82,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -116,6 +115,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="746200" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg index 96442da3d..7003c4a8e 100644 --- a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg @@ -17,9 +17,7 @@ defaultmap="bt_island" maxplayers="24" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game pvkii -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game pvkii -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -82,6 +80,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -114,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="17575" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg index 0177b2a95..3fa9a8864 100644 --- a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg @@ -16,9 +16,7 @@ port="7777" defaultmap="datacenter" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="${defaultmap} -log -MultiHome=${ip} -Port=${port}" -} +startparameters="${defaultmap} -log -MultiHome=${ip} -Port=${port}" #### LinuxGSM Settings #### @@ -81,6 +79,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -113,6 +112,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="622970" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/pzserver/_default.cfg b/lgsm/config-default/config-lgsm/pzserver/_default.cfg index ab22be682..720db40d5 100644 --- a/lgsm/config-default/config-lgsm/pzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pzserver/_default.cfg @@ -13,9 +13,7 @@ ip="0.0.0.0" adminpassword="CHANGE_ME" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-ip ${ip} -adminpassword \"${adminpassword}\" -servername ${selfname}" -} +startparameters="-ip ${ip} -adminpassword \"${adminpassword}\" -servername ${selfname}" #### LinuxGSM Settings #### @@ -78,6 +76,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -110,6 +109,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="380870" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/q2server/_default.cfg b/lgsm/config-default/config-lgsm/q2server/_default.cfg index 63306512d..cc11f34a8 100644 --- a/lgsm/config-default/config-lgsm/q2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q2server/_default.cfg @@ -14,9 +14,7 @@ port="27910" defaultmap="q2dm1" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="+set dedicated 1 +set ip ${ip} +set port ${port} +exec ${servercfg} +set deathmatch 1 +map ${defaultmap}" -} +startparameters="+set dedicated 1 +set ip ${ip} +set port ${port} +exec ${servercfg} +set deathmatch 1 +map ${defaultmap}" #### LinuxGSM Settings #### @@ -79,6 +77,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" diff --git a/lgsm/config-default/config-lgsm/q3server/_default.cfg b/lgsm/config-default/config-lgsm/q3server/_default.cfg index 8ff151fc0..e7c003815 100644 --- a/lgsm/config-default/config-lgsm/q3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q3server/_default.cfg @@ -14,9 +14,7 @@ port="27960" defaultmap="q3dm17" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set com_hunkMegs 32 +set net_ip ${ip} +set net_port ${port} +exec ${servercfg} +map ${defaultmap}" -} +startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 2 +set com_hunkMegs 32 +set net_ip ${ip} +set net_port ${port} +exec ${servercfg} +map ${defaultmap}" #### LinuxGSM Settings #### @@ -79,6 +77,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" diff --git a/lgsm/config-default/config-lgsm/qlserver/_default.cfg b/lgsm/config-default/config-lgsm/qlserver/_default.cfg index 25d1f43bc..69ed4d662 100644 --- a/lgsm/config-default/config-lgsm/qlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qlserver/_default.cfg @@ -9,9 +9,7 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="+exec ${servercfg}" -} +startparameters="+exec ${servercfg}" #### LinuxGSM Settings #### @@ -74,6 +72,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -106,6 +105,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="349090" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/qwserver/_default.cfg b/lgsm/config-default/config-lgsm/qwserver/_default.cfg index e4541086c..7f5484895 100644 --- a/lgsm/config-default/config-lgsm/qwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qwserver/_default.cfg @@ -13,9 +13,7 @@ ip="0.0.0.0" port="27500" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-port ${port} -game ktx +exec ${servercfg}" -} +startparameters="-port ${port} -game ktx +exec ${servercfg}" #### LinuxGSM Settings #### @@ -78,6 +76,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" diff --git a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg index c443cbb47..93a9a8432 100644 --- a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg @@ -16,9 +16,7 @@ defaultmap="rc_arena" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game ricochet -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game ricochet -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -81,6 +79,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -113,6 +112,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" +steamcmdforcewindows="no" appidmod="ricochet" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" diff --git a/lgsm/config-default/config-lgsm/roserver/_default.cfg b/lgsm/config-default/config-lgsm/roserver/_default.cfg index f5659b550..36ad5d5e8 100644 --- a/lgsm/config-default/config-lgsm/roserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/roserver/_default.cfg @@ -17,9 +17,7 @@ ip="0.0.0.0" defaultmap="RO-Arad.rom" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="server ${defaultmap}?game=ROGame.ROTeamGame?VACSecured=true -nohomedir ini=${servercfg} log=${gamelog}" -} +startparameters="server ${defaultmap}?game=ROGame.ROTeamGame?VACSecured=true -nohomedir ini=${servercfg} log=${gamelog}" #### LinuxGSM Settings #### @@ -82,6 +80,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -114,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="223250" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg b/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg index f2647542b..54571e2af 100644 --- a/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg @@ -14,9 +14,7 @@ port="27960" defaultmap="mp_beach" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 1 +set net_ip ${ip} +set net_port ${port} +exec ${servercfg} +map ${defaultmap}" -} +startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 1 +set net_ip ${ip} +set net_port ${port} +exec ${servercfg} +map ${defaultmap}" #### LinuxGSM Settings #### @@ -79,6 +77,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" diff --git a/lgsm/config-default/config-lgsm/rustserver/_default.cfg b/lgsm/config-default/config-lgsm/rustserver/_default.cfg index b518b00ba..c956b492c 100644 --- a/lgsm/config-default/config-lgsm/rustserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg @@ -14,19 +14,20 @@ port="28015" rconport="28016" appport=28082 rconpassword="CHANGE_ME" -rconweb="1" # Value is: 1 for the Facepunch web panel; 0 for RCON tools like Rusty or Rustadmin. +rconweb="1" # Value is: 1 for the Facepunch web panel, Rustadmin desktop and Rustadmin Online; 0 for RCON tools like Rusty. servername="Rust" -maxplayers="50" +gamemode="vanilla" # Values: vanilla, softcore ( Doc: https://wiki.facepunch.com/rust/server-gamemodes ) +serverlevel="Procedural Map" # Values: Procedural Map, Barren, HapisIsland, SavasIsland +customlevelurl="" # Custom level url. +server.levelurl \"${customlevelurl}\" seed="" # range: 1-2147483647, used to reproduce a procedural map. salt="" # range: unknown, used to recover a known setting from an existing map. +maxplayers="50" worldsize="3000" # default: 3000, range: 1000-6000, map size in meters. saveinterval="300" # Auto-save in seconds. tickrate="30" # default: 30, range: 15-100. ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-batchmode +app.listenip ${ip} +app.port ${appport} +server.ip ${ip} +server.port ${port} +server.tickrate ${tickrate} +server.hostname \"${servername}\" +server.identity \"${selfname}\" +server.seed ${seed} +server.salt ${salt} +server.maxplayers ${maxplayers} +server.worldsize ${worldsize} +server.saveinterval ${saveinterval} +rcon.web ${rconweb} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" -logfile" -} +startparameters="-batchmode +app.listenip ${ip} +app.port ${appport} +server.ip ${ip} +server.port ${port} +server.tickrate ${tickrate} +server.hostname \"${servername}\" +server.identity \"${selfname}\" +server.gamemode ${gamemode} +server.level \"${serverlevel}\" +server.seed ${seed} +server.salt ${salt} +server.maxplayers ${maxplayers} +server.worldsize ${worldsize} +server.saveinterval ${saveinterval} +rcon.web ${rconweb} +rcon.ip ${ip} +rcon.port ${rconport} +rcon.password \"${rconpassword}\" -logfile" #### LinuxGSM Settings #### @@ -89,6 +90,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -108,7 +110,7 @@ logdays="7" ## Monitor | https://docs.linuxgsm.com/commands/monitor # Query delay time -querydelay="5" +querydelay="10" ## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" @@ -121,6 +123,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="258550" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/rwserver/_default.cfg b/lgsm/config-default/config-lgsm/rwserver/_default.cfg index cddf99818..3ff7bc137 100644 --- a/lgsm/config-default/config-lgsm/rwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rwserver/_default.cfg @@ -12,9 +12,7 @@ javaram="2048" # -Xmx$2048M ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="" -} +startparameters="" #### LinuxGSM Settings #### @@ -77,6 +75,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -109,6 +108,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="339010" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" @@ -154,7 +154,8 @@ glibc="null" ## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" -executable="java -Xmx${javaram}m -jar ${serverfiles}/server.jar" +preexecutable="java -Xmx${javaram}M -jar" +executable="./server.jar" servercfgdir="${systemdir}" servercfg="server.properties" servercfgdefault="server.properties" diff --git a/lgsm/config-default/config-lgsm/sampserver/_default.cfg b/lgsm/config-default/config-lgsm/sampserver/_default.cfg index 4f88ee743..d1add1c0e 100644 --- a/lgsm/config-default/config-lgsm/sampserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sampserver/_default.cfg @@ -13,9 +13,7 @@ ip="0.0.0.0" port="7777" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="" -} +startparameters="" #### LinuxGSM Settings #### @@ -78,6 +76,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" diff --git a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg index c0867e1c8..438a37e0a 100644 --- a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg @@ -17,9 +17,7 @@ serverpassword="NOT SET" # Can't be adjusted currently maxplayers="8" # Can't be adjusted currently ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="Port=${port}?QueryPort=${queryport} -startup_map ${defaultmap} -server_name \"${servername}\"" -} +startparameters="Port=${port}?QueryPort=${queryport} -startup_map ${defaultmap} -server_name \"${servername}\"" #### LinuxGSM Settings #### @@ -82,6 +80,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -114,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="974130" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/sbserver/_default.cfg b/lgsm/config-default/config-lgsm/sbserver/_default.cfg index b3bffbcad..03093c44c 100644 --- a/lgsm/config-default/config-lgsm/sbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbserver/_default.cfg @@ -16,9 +16,7 @@ steampass='password' ip="0.0.0.0" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="" -} +startparameters="" #### LinuxGSM Settings #### @@ -81,6 +79,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -113,6 +112,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="211820" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/scpslserver/_default.cfg b/lgsm/config-default/config-lgsm/scpslserver/_default.cfg new file mode 100644 index 000000000..871d8d18c --- /dev/null +++ b/lgsm/config-default/config-lgsm/scpslserver/_default.cfg @@ -0,0 +1,180 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! +# Copy settings from here and use them in either: +# common.cfg - applies settings to every instance. +# [instance].cfg - applies settings to a specific instance. + +#### Game Server Settings #### + +## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +## All server settings except the server port are done in the config file: +## Docs: https://en.scpslgame.com/index.php?title=Docs:Server_Config +port="7777" + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="${port}" + +#### 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 +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun +mailgunalert="off" +mailgunapiregion="us" +mailguntoken="accesstoken" +mailgundomain="example.com" +mailgunemailfrom="alert@example.com" +mailgunemail="email@myemail.com" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" +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". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +## 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="996560" +steamcmdforcewindows="no" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="false" + +## 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="7" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="1" +querytype="" + +## Console type +consoleverbose="yes" +consoleinteract="yes" + +## Game Server Details +# Do not edit +gamename="SCP: Secret Laboratory" +engine="unity3d" +glibc="2.27" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}" +executabledir="${systemdir}" +executable="./LocalAdmin" +servercfg="config_gameplay.txt" +servercfgdefault="config_gameplay.txt" +servercfgdir="${HOME}/.config/SCP Secret Laboratory/config/${port}" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${HOME}/.config/SCP Secret Laboratory/LocalAdminLogs/${port}" +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" diff --git a/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg b/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg new file mode 100644 index 000000000..7a4c80253 --- /dev/null +++ b/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg @@ -0,0 +1,180 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! +# Copy settings from here and use them in either: +# common.cfg - applies settings to every instance. +# [instance].cfg - applies settings to a specific instance. + +#### Game Server Settings #### + +## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +## All server settings except the server port are done in the config file: +## Docs: https://en.scpslgame.com/index.php?title=Docs:Server_Config +port="7777" + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="${port}" + +#### 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 +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun +mailgunalert="off" +mailgunapiregion="us" +mailguntoken="accesstoken" +mailgundomain="example.com" +mailgunemailfrom="alert@example.com" +mailgunemail="email@myemail.com" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" +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". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +## 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="786920" +steamcmdforcewindows="no" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="false" + +## 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="7" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="1" +querytype="" + +## Console type +consoleverbose="yes" +consoleinteract="yes" + +## Game Server Details +# Do not edit +gamename="SCP: Secret Laboratory ServerMod" +engine="unity3d" +glibc="2.27" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}" +executabledir="${systemdir}" +executable="./LocalAdmin" +servercfg="config_gameplay.txt" +servercfgdefault="config_gameplay.txt" +servercfgdir="${HOME}/.config/SCP Secret Laboratory/config/${port}" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${HOME}/.config/SCP Secret Laboratory/LocalAdminLogs/${port}" +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" diff --git a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg index 3dad1f106..d8ca86974 100644 --- a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg @@ -12,9 +12,7 @@ ip="0.0.0.0" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-quit -batchmode -nographics -dedicated -configfile=${servercfgfullpath}" -} +startparameters="-quit -batchmode -nographics -dedicated -configfile=${servercfgfullpath}" #### LinuxGSM Settings #### @@ -77,6 +75,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -109,6 +108,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="294420" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/secrets-common-template.cfg b/lgsm/config-default/config-lgsm/secrets-common-template.cfg new file mode 100644 index 000000000..d8ded6aa9 --- /dev/null +++ b/lgsm/config-default/config-lgsm/secrets-common-template.cfg @@ -0,0 +1,5 @@ +################################## +######## Common Secrets ########## +################################## +# PLACE GLOBAL SECRET SETTINGS HERE +## These settings will apply to all instances. diff --git a/lgsm/config-default/config-lgsm/secrets-instance-template.cfg b/lgsm/config-default/config-lgsm/secrets-instance-template.cfg new file mode 100644 index 000000000..5446d3718 --- /dev/null +++ b/lgsm/config-default/config-lgsm/secrets-instance-template.cfg @@ -0,0 +1,5 @@ +################################## +####### Instance Secrets ######### +################################## +# PLACE INSTANCE SECRET SETTINGS HERE +## These settings will apply to a specific instance. diff --git a/lgsm/config-default/config-lgsm/sfcserver/_default.cfg b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg index 746b9e84c..8dc17afb9 100644 --- a/lgsm/config-default/config-lgsm/sfcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg @@ -17,9 +17,7 @@ defaultmap="sf_astrodome" maxplayers="32" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game sfclassic -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game sfclassic -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -82,6 +80,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -114,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="244310" # Source 2013 SDK +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/sof2server/_default.cfg b/lgsm/config-default/config-lgsm/sof2server/_default.cfg index 79b6ff01b..36922b437 100644 --- a/lgsm/config-default/config-lgsm/sof2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/sof2server/_default.cfg @@ -14,9 +14,7 @@ port="20100" defaultmap="mp_shop" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="+set sv_punkbuster 0 +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +exec ${servercfg} +map ${defaultmap}" -} +startparameters="+set sv_punkbuster 0 +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +exec ${servercfg} +map ${defaultmap}" #### LinuxGSM Settings #### @@ -79,6 +77,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" diff --git a/lgsm/config-default/config-lgsm/solserver/_default.cfg b/lgsm/config-default/config-lgsm/solserver/_default.cfg index b0fda3b81..6ce6ce1cf 100644 --- a/lgsm/config-default/config-lgsm/solserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/solserver/_default.cfg @@ -13,9 +13,7 @@ ip="0.0.0.0" maplist="mapslist.txt" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-b ${ip} -m ${maplist} -c ${servercfg}" -} +startparameters="-b ${ip} -m ${maplist} -c ${servercfg}" #### LinuxGSM Settings #### @@ -78,11 +76,15 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" curlcustomstring="" +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + ## Backup | https://docs.linuxgsm.com/commands/backup maxbackups="4" maxbackupdays="30" @@ -107,9 +109,12 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="638500" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="false" ## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill diff --git a/lgsm/config-default/config-lgsm/squadserver/_default.cfg b/lgsm/config-default/config-lgsm/squadserver/_default.cfg index c329b06b4..a4d8496d8 100644 --- a/lgsm/config-default/config-lgsm/squadserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/squadserver/_default.cfg @@ -14,9 +14,7 @@ queryport="27165" randommap="ALWAYS" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="MULTIHOME=${ip} RANDOM=${randommap} Port=${port} QueryPort=${queryport}" -} +startparameters="MULTIHOME=${ip} RANDOM=${randommap} Port=${port} QueryPort=${queryport}" #### LinuxGSM Settings #### @@ -79,6 +77,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -111,6 +110,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="403240" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/stserver/_default.cfg b/lgsm/config-default/config-lgsm/stserver/_default.cfg index d7caf33e6..c58182cdd 100644 --- a/lgsm/config-default/config-lgsm/stserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/stserver/_default.cfg @@ -19,9 +19,7 @@ worldname="moon_save" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters # Edit with care -fn_parms(){ -parms="-batchmode -nographics -autostart -gameport=${port} -updateport=${queryport} -worldtype=${worldtype} -loadworld=${worldname} -worldname=${worldname} -autosaveinterval=${autosaveinterval} -clearallinterval=${clearinterval}" -} +startparameters="-batchmode -nographics -autostart -gameport=${port} -updateport=${queryport} -worldtype=${worldtype} -loadworld=${worldname} -worldname=${worldname} -autosaveinterval=${autosaveinterval} -clearallinterval=${clearinterval}" #### LinuxGSM Settings #### @@ -84,6 +82,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -116,6 +115,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="600760" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/svenserver/_default.cfg b/lgsm/config-default/config-lgsm/svenserver/_default.cfg index 908dd046d..1d7b97c7f 100644 --- a/lgsm/config-default/config-lgsm/svenserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/svenserver/_default.cfg @@ -16,9 +16,7 @@ defaultmap="svencoop1" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game svencoop -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} +maxplayers ${maxplayers}" -} +startparameters="-game svencoop -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} +maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -81,6 +79,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -113,6 +112,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="276060" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg index 79e683f65..27306d89e 100644 --- a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg @@ -16,9 +16,7 @@ steampass='password' ip="0.0.0.0" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-config ${servercfgfullpath}" -} +startparameters="-config ${servercfgfullpath}" #### LinuxGSM Settings #### @@ -81,6 +79,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -113,6 +112,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="105600" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/tf2server/_default.cfg b/lgsm/config-default/config-lgsm/tf2server/_default.cfg index 3aa580d39..72f79304d 100644 --- a/lgsm/config-default/config-lgsm/tf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/tf2server/_default.cfg @@ -22,9 +22,7 @@ maxplayers="16" gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game tf -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game tf -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -87,6 +85,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -119,6 +118,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="232250" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg index c29b43642..a9339fda9 100644 --- a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg @@ -16,9 +16,7 @@ defaultmap="dustbowl" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game tfc -strictportbind _ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game tfc -strictportbind _ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -81,6 +79,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -113,6 +112,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" +steamcmdforcewindows="no" appidmod="tfc" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" diff --git a/lgsm/config-default/config-lgsm/ts3server/_default.cfg b/lgsm/config-default/config-lgsm/ts3server/_default.cfg index 34cb54fb8..3bfaf5d10 100644 --- a/lgsm/config-default/config-lgsm/ts3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ts3server/_default.cfg @@ -9,9 +9,7 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="inifile=${servercfgfullpath} pid_file=ts3server.pid" -} +startparameters="inifile=${servercfgfullpath} pid_file=ts3server.pid" #### LinuxGSM Settings #### @@ -74,6 +72,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" diff --git a/lgsm/config-default/config-lgsm/tsserver/_default.cfg b/lgsm/config-default/config-lgsm/tsserver/_default.cfg index fb4fb9f01..b9ad02e2b 100644 --- a/lgsm/config-default/config-lgsm/tsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tsserver/_default.cfg @@ -16,9 +16,7 @@ defaultmap="ts_neobaroque" maxplayers="32" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game ts -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers} " -} +startparameters="-game ts -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers} " #### LinuxGSM Settings #### @@ -81,6 +79,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -113,6 +112,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" +steamcmdforcewindows="no" appidmod="cstrike" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" diff --git a/lgsm/config-default/config-lgsm/tuserver/_default.cfg b/lgsm/config-default/config-lgsm/tuserver/_default.cfg index eed1cbdcb..c0a119abe 100644 --- a/lgsm/config-default/config-lgsm/tuserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tuserver/_default.cfg @@ -19,9 +19,7 @@ queryport="27015" gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-log -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -TowerServerINI=${selfname}.ini" -} +startparameters="-log -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -TowerServerINI=${selfname}.ini" #### LinuxGSM Settings #### @@ -84,6 +82,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -116,6 +115,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="439660" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/twserver/_default.cfg b/lgsm/config-default/config-lgsm/twserver/_default.cfg index 9140ed859..c8a53240e 100644 --- a/lgsm/config-default/config-lgsm/twserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/twserver/_default.cfg @@ -16,9 +16,7 @@ steampass='password' ip="0.0.0.0" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-f ${servercfg}" -} +startparameters="-f ${servercfg}" #### LinuxGSM Settings #### @@ -81,6 +79,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -113,6 +112,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="380840" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/untserver/_default.cfg b/lgsm/config-default/config-lgsm/untserver/_default.cfg index 1a8230e0a..507005e58 100644 --- a/lgsm/config-default/config-lgsm/untserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/untserver/_default.cfg @@ -15,9 +15,7 @@ maxplayers="20" defaultmap="pei" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-port:${port} -players:${maxplayers} --nographics -${defaultmap} -batchmode +secureserver/${selfname}" -} +startparameters="-port:${port} -players:${maxplayers} --nographics -${defaultmap} -batchmode +secureserver/${selfname}" #### LinuxGSM Settings #### @@ -80,6 +78,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -112,6 +111,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="1110390" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg index 1bf464c29..cba690fd7 100644 --- a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg @@ -13,9 +13,7 @@ defaultmap="DM-Rankin" ip="0.0.0.0" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="server ${defaultmap}?game=XGame.xDeathMatch -nohomedir ini=${servercfg} log=${gamelog}" -} +startparameters="server ${defaultmap}?game=XGame.xDeathMatch -nohomedir ini=${servercfg} log=${gamelog}" #### LinuxGSM Settings #### @@ -78,6 +76,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" diff --git a/lgsm/config-default/config-lgsm/ut3server/_default.cfg b/lgsm/config-default/config-lgsm/ut3server/_default.cfg index e8f93eb02..727e79df7 100644 --- a/lgsm/config-default/config-lgsm/ut3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut3server/_default.cfg @@ -28,10 +28,8 @@ gsusername="" gspassword="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -# Edit with care | List of game types and mutators: https://docs.linuxgsm.com/game-servers/unreal-tournament-3 -fn_parms(){ -parms="server ${defaultmap}?Game=${game}?bIsDedicated=${isdedicated}?bIsLanMatch=${islanmatch}?bUsesStats=${usesstats}?bShouldAdvertise=${shouldadvertise}?PureServer=${pureserver}?bAllowJoinInProgress=${allowjoininprogress}?Mutator=${mutators}?ConfigSubDir=${selfname} -login=${gsusername} -password=${gspassword} -port=${port} -queryport=${queryport} -multihome=${ip} -nohomedir -unattended -log=${gamelog}" -} +# List of game types and mutators: https://docs.linuxgsm.com/game-servers/unreal-tournament-3 +startparameters="server ${defaultmap}?Game=${game}?bIsDedicated=${isdedicated}?bIsLanMatch=${islanmatch}?bUsesStats=${usesstats}?bShouldAdvertise=${shouldadvertise}?PureServer=${pureserver}?bAllowJoinInProgress=${allowjoininprogress}?Mutator=${mutators}?ConfigSubDir=${selfname} -login=${gsusername} -password=${gspassword} -port=${port} -queryport=${queryport} -multihome=${ip} -nohomedir -unattended -log=${gamelog}" #### LinuxGSM Settings #### @@ -94,6 +92,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" diff --git a/lgsm/config-default/config-lgsm/ut99server/_default.cfg b/lgsm/config-default/config-lgsm/ut99server/_default.cfg index 70699e1c4..c0bb5619a 100644 --- a/lgsm/config-default/config-lgsm/ut99server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut99server/_default.cfg @@ -13,9 +13,7 @@ defaultmap="DM-Deck16][" ip="0.0.0.0" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="server ${defaultmap}.unr ini=${servercfgfullpath}" -} +startparameters="server ${defaultmap}.unr ini=${servercfgfullpath}" #### LinuxGSM Settings #### @@ -78,6 +76,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" diff --git a/lgsm/config-default/config-lgsm/utserver/_default.cfg b/lgsm/config-default/config-lgsm/utserver/_default.cfg index a21c4a1bc..ed19edd39 100644 --- a/lgsm/config-default/config-lgsm/utserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/utserver/_default.cfg @@ -17,9 +17,7 @@ gametype="DM" timelimit="10" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="UnrealTournament ${defaultmap}?Game=${gametype}?TimeLimit=${timelimit} -port=${port}" -} +startparameters="UnrealTournament ${defaultmap}?Game=${gametype}?TimeLimit=${timelimit} -port=${port}" #### LinuxGSM Settings #### @@ -82,6 +80,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg new file mode 100644 index 000000000..096faf2a4 --- /dev/null +++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg @@ -0,0 +1,181 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! +# Copy settings from here and use them in either: +# common.cfg - applies settings to every instance. +# [instance].cfg - applies settings to a specific instance. + +#### Game Server Settings #### + +## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +servername="Valheim Server" +# Minimum password length is 5. +serverpassword="" +port="2456" +gameworld="${selfname}" +public="1" +savedir="$HOME/.config/unity3d/IronGate/Valheim" + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="-name '${servername}' -password ${serverpassword} -port ${port} -world ${gameworld} -public ${public} -savedir '${savedir}'" + +#### 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 +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun +mailgunalert="off" +mailgunapiregion="us" +mailguntoken="accesstoken" +mailgundomain="example.com" +mailgunemailfrom="alert@example.com" +mailgunemail="email@myemail.com" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" +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". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="5" + +## 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="896660" +steamcmdforcewindows="no" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="false" + +## 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="2" + +## 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="no" + +## Game Server Details +# Do not edit +gamename="Valheim" +engine="unity3d" +glibc="2.15" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}" +executabledir="${serverfiles}" +executable="./valheim_server.x86_64" +serverfiles="${rootdir}/serverfiles" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${systemdir}/Saved/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" diff --git a/lgsm/config-default/config-lgsm/vintsserver/_default.cfg b/lgsm/config-default/config-lgsm/vintsserver/_default.cfg new file mode 100644 index 000000000..42b6c42fa --- /dev/null +++ b/lgsm/config-default/config-lgsm/vintsserver/_default.cfg @@ -0,0 +1,170 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! +# Copy settings from here and use them in either: +# common.cfg - applies settings to every instance. +# [instance].cfg - applies settings to a specific instance. + +#### Game Server Settings #### + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="--datapath ${servercfgdir}" + +## Release Settings | https://docs.linuxgsm.com/game-servers/vintagestory#release-settings +# Branch (stable|unstable) +branch="stable" + +#### 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 +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun +mailgunalert="off" +mailgunapiregion="us" +mailguntoken="accesstoken" +mailgundomain="example.com" +mailgunemailfrom="alert@example.com" +mailgunemail="email@myemail.com" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" +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". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +## 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" + +## 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="2" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="5" +querytype="" + +## Console type +consoleverbose="yes" +consoleinteract="yes" + +## Game Server Details +# Do not edit +gamename="Vintage Story" +engine="vintagestory" +glibc="2.17" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}" +executabledir="${systemdir}" +preexecutable="mono" +executable="./VintagestoryServer.exe" +servercfgdir="${serverfiles}/data/${selfname}" +servercfg="serverconfig.json" +servercfgdefault="serverconfig.json" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +logdir="${rootdir}/log" +gamelogdir="${servercfgdir}/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" diff --git a/lgsm/config-default/config-lgsm/vsserver/_default.cfg b/lgsm/config-default/config-lgsm/vsserver/_default.cfg index f6bb4394c..dace8b1ab 100644 --- a/lgsm/config-default/config-lgsm/vsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vsserver/_default.cfg @@ -16,9 +16,7 @@ defaultmap="vs_frost" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game vs -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game vs -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -81,6 +79,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -113,6 +112,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="90" +steamcmdforcewindows="no" appidmod="cstrike" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" diff --git a/lgsm/config-default/config-lgsm/wetserver/_default.cfg b/lgsm/config-default/config-lgsm/wetserver/_default.cfg index b9ed41c69..296b7bd16 100644 --- a/lgsm/config-default/config-lgsm/wetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wetserver/_default.cfg @@ -9,9 +9,7 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="+set net_strict 1 +set fs_homepath ${serverfiles} +exec ${servercfg}" -} +startparameters="+set net_strict 1 +set fs_homepath ${serverfiles} +exec ${servercfg}" #### LinuxGSM Settings #### @@ -74,6 +72,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" diff --git a/lgsm/config-default/config-lgsm/wfserver/_default.cfg b/lgsm/config-default/config-lgsm/wfserver/_default.cfg index 73f0bb8df..5bb63c67f 100644 --- a/lgsm/config-default/config-lgsm/wfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wfserver/_default.cfg @@ -14,9 +14,7 @@ port="44400" httpport="44444" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="+exec ${servercfg} +sv_http_ip ${ip} +set sv_http_port ${httpport} +sv_ip ${ip} +sv_port ${port}" -} +startparameters="+exec ${servercfg} +sv_http_ip ${ip} +set sv_http_port ${httpport} +sv_ip ${ip} +sv_port ${port}" #### LinuxGSM Settings #### @@ -79,11 +77,15 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" curlcustomstring="" +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + ## Backup | https://docs.linuxgsm.com/commands/backup maxbackups="4" maxbackupdays="30" @@ -105,6 +107,17 @@ ansi="on" ## Message Display Time | https://docs.linuxgsm.com/features/message-display-time sleeptime="0.5" +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd +# Server appid +appid="1136510" +steamcmdforcewindows="no" +appidmod="warfork" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="true" + ## Stop Mode | https://docs.linuxgsm.com/features/stop-mode # 1: tmux kill # 2: CTRL+c @@ -128,16 +141,6 @@ stopmode="3" querymode="2" querytype="protocol-quake3" -## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd -# Server appid -appid="1136510" -appidmod="warfork" -# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch -branch="" -betapassword="" -# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server -steammaster="true" - ## Console type consoleverbose="yes" consoleinteract="yes" diff --git a/lgsm/config-default/config-lgsm/wmcserver/_default.cfg b/lgsm/config-default/config-lgsm/wmcserver/_default.cfg new file mode 100644 index 000000000..b0df8cbfd --- /dev/null +++ b/lgsm/config-default/config-lgsm/wmcserver/_default.cfg @@ -0,0 +1,173 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! +# Copy settings from here and use them in either: +# common.cfg - applies settings to every instance. +# [instance].cfg - applies settings to a specific instance. + +#### Game Server Settings #### + +## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +javaram="1024" # -Xmx$1024M + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="nogui" + +## Release Settings | https://docs.linuxgsm.com/game-servers/minecraft#release-settings +# Version (latest|1.16.5) +mcversion="latest" + +#### 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 +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Mailgun Email Alerts | https://docs.linuxgsm.com/alerts/mailgun +mailgunalert="off" +mailgunapiregion="us" +mailguntoken="accesstoken" +mailgundomain="example.com" +mailgunemailfrom="alert@example.com" +mailgunemail="email@myemail.com" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" +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". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +## 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" + +## 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="2" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="minecraft" + +## Console type +consoleverbose="yes" +consoleinteract="yes" + +## Game Server Details +# Do not edit +gamename="WaterfallMC" +engine="lwjgl2" +glibc="null" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}" +executabledir="${serverfiles}" +preexecutable="java -Xmx${javaram}M -jar" +executable="./waterfall.jar" +servercfgdir="${systemdir}" +servercfg="config.yml" +servercfgdefault="config.yml" +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" diff --git a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg index 0ad05ae4b..49b342436 100644 --- a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg @@ -9,11 +9,8 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -# Parameters are editing in the game server config file. -source "${servercfgfullpath}" -parms="ADMINPWD=\"$ADMINPWD\" EPICSETTINGS=\"$EPICSETTINGS\" EXTERNALPORT=\"$EXTERNALPORT\" HOMESERVER=\"$HOMESERVER\" HOMEKINGDOM=\"$HOMEKINGDOM\" LOGINSERVER=\"$LOGINSERVER\" MAXPLAYERS=\"$MAXPLAYERS\" QUERYPORT=\"$QUERYPORT\" SERVERNAME=\"$SERVERNAME\" SERVERPASSWORD=\"$SERVERPASSWORD\" START=\"$START\" IP=\"$IP\"" -} +# Parameters are edited in the game server config file. +startparameters="ADMINPWD=\"$ADMINPWD\" EPICSETTINGS=\"$EPICSETTINGS\" EXTERNALPORT=\"$EXTERNALPORT\" HOMESERVER=\"$HOMESERVER\" HOMEKINGDOM=\"$HOMEKINGDOM\" LOGINSERVER=\"$LOGINSERVER\" MAXPLAYERS=\"$MAXPLAYERS\" QUERYPORT=\"$QUERYPORT\" SERVERNAME=\"$SERVERNAME\" SERVERPASSWORD=\"$SERVERPASSWORD\" START=\"$START\" IP=\"$IP\"" #### LinuxGSM Settings #### @@ -76,11 +73,15 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" curlcustomstring="" +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + ## Backup | https://docs.linuxgsm.com/commands/backup maxbackups="4" maxbackupdays="30" @@ -105,6 +106,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="402370" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" @@ -150,11 +152,13 @@ glibc="2.14" ## Game Server Directories systemdir="${serverfiles}" executabledir="${systemdir}" -executable="xvfb-run ./WurmServerLauncher" +preexecutable="xvfb-run" +executable="./WurmServerLauncher" servercfgdir="${systemdir}" servercfg="${selfname}.cfg" servercfgdefault="server.cfg" servercfgfullpath="${servercfgdir}/${servercfg}" +source "${servercfgfullpath}" ## Backup Directory backupdir="${lgsmdir}/backup" diff --git a/lgsm/config-default/config-lgsm/zmrserver/_default.cfg b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg index ce5cb3329..b5bfa3359 100644 --- a/lgsm/config-default/config-lgsm/zmrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg @@ -17,9 +17,7 @@ defaultmap="zm_docksofthedead" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game zombie_master_reborn -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game zombie_master_reborn -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -82,6 +80,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -114,6 +113,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="244310" # Source 2013 SDK +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/config-default/config-lgsm/zpsserver/_default.cfg b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg index cf26a9e84..bf3c26e22 100644 --- a/lgsm/config-default/config-lgsm/zpsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg @@ -22,9 +22,7 @@ maxplayers="20" gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -fn_parms(){ -parms="-game zps -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" -} +startparameters="-game zps -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" #### LinuxGSM Settings #### @@ -87,6 +85,7 @@ 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". +telegramapi="api.telegram.org" telegramalert="off" telegramtoken="accesstoken" telegramchatid="" @@ -119,6 +118,7 @@ sleeptime="0.5" ## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd # Server appid appid="17505" +steamcmdforcewindows="no" # SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch branch="" betapassword="" diff --git a/lgsm/data/bo_header.jpg b/lgsm/data/bo_header.jpg new file mode 100644 index 000000000..d63ee5c3d Binary files /dev/null and b/lgsm/data/bo_header.jpg differ diff --git a/lgsm/data/rust_header.jpg b/lgsm/data/rust_header.jpg new file mode 100644 index 000000000..e4006b070 Binary files /dev/null and b/lgsm/data/rust_header.jpg differ diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index ad3bc9a19..687a3f63d 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -21,6 +21,7 @@ cod2,cod2server,Call of Duty 2 cod4,cod4server,Call of Duty 4 coduo,coduoserver,Call of Duty: United Offensive codwaw,codwawserver,Call of Duty: World at War +col,colserver,Colony Survival cs,csserver,Counter-Strike 1.6 cscz,csczserver,Counter-Strike: Condition Zero csgo,csgoserver,Counter-Strike: Global Offensive @@ -67,6 +68,7 @@ ns2c,ns2cserver,NS2: Combat onset,onsetserver,Onset opfor,opforserver,Opposing Force pc,pcserver,Project Cars +pmc,pmcserver,PaperMC pstbs,pstbsserver,Post Scriptum: The Bloody Seventh pvkii,pvkiiserver,Pirates Vikings & Knights II pvr,pvrserver,Pavlov VR @@ -83,6 +85,8 @@ rw,rwserver,Rising World samp,sampserver,San Andreas Multiplayer sb,sbserver,Starbound sbots,sbotsserver,StickyBots +scpsl,scpslserver,SCP: Secret Laboratory +scpslsm,scpslsmserver,SCP: Secret Laboratory ServerMod sdtd,sdtdserver,7 Days to Die sfc,sfcserver,SourceForts Classic sof2,sof2server,Soldier Of Fortune 2: Gold Edition @@ -102,9 +106,12 @@ ut,utserver,Unreal Tournament ut2k4,ut2k4server,Unreal Tournament 2004 ut3,ut3server,Unreal Tournament 3 ut99,ut99server,Unreal Tournament 99 +vh,vhserver,Valheim vs,vsserver,Vampire Slayer +vints,vintsserver,Vintage Story wet,wetserver,Wolfenstein: Enemy Territory wf,wfserver,Warfork +wmc,wmcserver,WaterfallMC wurm,wurmserver,Wurm Unlimited zmr,zmrserver,Zombie Master: Reborn zps,zpsserver,Zombie Panic! Source diff --git a/lgsm/functions/README.md b/lgsm/functions/README.md index 01de5f0c7..c1c823fac 100755 --- a/lgsm/functions/README.md +++ b/lgsm/functions/README.md @@ -1,16 +1,16 @@ -# Linux Game Server Manager - Functions +# LinuxGSM - Modules -These functions are universal functions that work in all scripts. +These modules are scripts that are called upon by the primary script linuxgsm.sh -## Function Names -Functions have been named to give an idea of what the function does. +## Module Names +Modules have been named to give an idea of what the function does. -* core: Essential functions that will always run first. +* core: Essential modules that will always run first. * command: Primary command function. * check: Runs checks that will either halt on or fix an issue. -* dev: development functions. +* dev: development modules. * fix: Applies a game server specific fix. * info: retrieves information from a source such as config file or the OS. -* install: Functions related to the installer. -* monitor: Functions related to monitor. -* update: Functions that update the game server. +* install: modules related to the installer. +* monitor: modules related to monitor. +* update: modules that update the game server. diff --git a/lgsm/functions/alert.sh b/lgsm/functions/alert.sh index 3b54230eb..5fd999728 100755 --- a/lgsm/functions/alert.sh +++ b/lgsm/functions/alert.sh @@ -1,11 +1,14 @@ #!/bin/bash -# LinuxGSM alert.sh function +# LinuxGSM alert.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Overall function for managing alerts. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +# Generates alert log of the details at the time of the alert. +# Used with email alerts. fn_alert_log(){ info_distro.sh info_config.sh @@ -60,6 +63,15 @@ fn_alert_update(){ alertbody="${gamename} received update" } +fn_alert_check_update(){ + fn_script_log_info "Sending alert: Update available" + alertsubject="Alert - ${selfname} - Update available" + alertemoji="🎮" + alertsound="1" + alerturl="not enabled" + alertbody="${gamename} update available" +} + fn_alert_permissions(){ fn_script_log_info "Sending alert: Permissions error" alertsubject="Alert - ${selfname}: Permissions error" @@ -88,6 +100,8 @@ elif [ "${alert}" == "test" ]; then fn_alert_test elif [ "${alert}" == "update" ]; then fn_alert_update +elif [ "${alert}" == "check-update" ]; then + fn_alert_check_update elif [ "${alert}" == "config" ]; then fn_alert_config fi @@ -104,12 +118,6 @@ if [ "${postalert}" == "on" ]&&[ -n "${postalert}" ]; then elif [ "${postalert}" != "on" ]&&[ "${commandname}" == "TEST-ALERT" ]; then fn_print_warn_nl "More Info not enabled" fn_script_log_warn "More Info alerts not enabled" -elif [ -z "${posttarget}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then - fn_print_error_nl "posttarget not set" - fn_script_error "posttarget not set" -elif [ -z "${postdays}" ]&&[ "${commandname}" == "TEST-ALERT" ]; then - fn_print_error_nl "postdays not set" - fn_script_error "postdays not set" fi if [ "${discordalert}" == "on" ]&&[ -n "${discordalert}" ]; then diff --git a/lgsm/functions/alert_discord.sh b/lgsm/functions/alert_discord.sh index a8ce373f0..1d047b60b 100755 --- a/lgsm/functions/alert_discord.sh +++ b/lgsm/functions/alert_discord.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM alert_discord.sh function +# LinuxGSM alert_discord.sh module # Author: Daniel Gibbs -# Contributor: faflfama, diamondburned +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Sends Discord alert. @@ -15,13 +15,13 @@ fi json=$(cat < -# Website: https://bytegaming.de +# LinuxGSM alert_telegram.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com # Description: Sends Telegram Messenger alert. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" @@ -16,7 +17,7 @@ EOF ) fn_print_dots "Sending Telegram alert" -telegramsend=$(curl --connect-timeout 10 -sSL -H "Content-Type: application/json" -X POST -d """${json}""" ${curlcustomstring} "https://api.telegram.org/bot${telegramtoken}/sendMessage" | grep "error_code") +telegramsend=$(curl --connect-timeout 10 -sSL -H "Content-Type: application/json" -X POST -d """${json}""" ${curlcustomstring} "https://${telegramapi}/bot${telegramtoken}/sendMessage" | grep "error_code") if [ -n "${telegramsend}" ]; then fn_print_fail_nl "Sending Telegram alert: ${telegramsend}" diff --git a/lgsm/functions/check.sh b/lgsm/functions/check.sh index 7ce2e9824..523445c5d 100755 --- a/lgsm/functions/check.sh +++ b/lgsm/functions/check.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM check.sh function +# LinuxGSM check.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Overall function for managing checks. # Runs checks that will either halt on or fix an issue. diff --git a/lgsm/functions/check_config.sh b/lgsm/functions/check_config.sh index 2b4443cb3..5b8d51691 100755 --- a/lgsm/functions/check_config.sh +++ b/lgsm/functions/check_config.sh @@ -1,31 +1,27 @@ #!/bin/bash -# LinuxGSM check_config.sh function +# LinuxGSM check_config.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Checks if the server config is missing and warns the user if needed. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -if [ ! -f "${servercfgfullpath}" ]; then - if [ "${shortname}" != "hw" ]&&[ "${shortname}" != "ut3" ]&&[ "${shortname}" != "kf2" ]; then - fn_print_dots "" - fn_print_warn_nl "Configuration file missing!" - echo -e "${servercfgfullpath}" - fn_script_log_warn "Configuration file missing!" - fn_script_log_warn "${servercfgfullpath}" - install_config.sh - fi +if [ -n "${servercfgfullpath}" ]&&[ ! -f "${servercfgfullpath}" ]; then + fn_print_dots "" + fn_print_warn_nl "Configuration file missing!" + echo -e "${servercfgfullpath}" + fn_script_log_warn "Configuration file missing!" + fn_script_log_warn "${servercfgfullpath}" + install_config.sh fi -if [ "${shortname}" == "rust" ]; then - if [ -z "${rconpassword}" ]; then - fn_print_dots "" - fn_print_fail_nl "RCON password is not set" - fn_script_log_fatal "RCON password is not set" - core_exit.sh - elif [ "${rconpassword}" == "CHANGE_ME" ]; then - fn_print_dots "" - fn_print_warn_nl "Default RCON Password detected" - fn_script_log_warn "Default RCON Password detected" - fi +if [ "${shortname}" == "rust" ]&&[ -v rconpassword ]&&[ -z "${rconpassword}" ]; then + fn_print_dots "" + fn_print_fail_nl "RCON password is not set" + fn_script_log_warn "RCON password is not set" +elif [ -v rconpassword ]&&[ "${rconpassword}" == "CHANGE_ME" ]; then + fn_print_dots "" + fn_print_warn_nl "Default RCON Password detected" + fn_script_log_warn "Default RCON Password detected" fi diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index 7a43e2f3a..722a0a4da 100755 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/functions/check_deps.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM check_deps.sh function +# LinuxGSM check_deps.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Checks if required dependencies are installed for LinuxGSM. @@ -185,7 +186,7 @@ if [ "${javacheck}" == "1" ]; then # Define required dependencies for SteamCMD. if [ "${appid}" ]; then # lib32gcc1 is now called lib32gcc-s1 in debian 11 - if { [ "${distroid}" == "debian" ]&&[ "${distroversion}" == "11" ]; }||{ [ "${distroid}" == "ubuntu" ]&&[ "${distroversion}" == "20.10" ]; }; then + if { [ "${distroid}" == "debian" ]&&[ "${distroversion}" == "11" ]; }||{ [ "${distroid}" == "ubuntu" ]&&[ "${distroversion}" == "20.10" ]; } || { [ "${distroid}" == "pop" ]&&[ "${distroversion}" == "20.10" ]; }; then if [ "${deptocheck}" == "glibc.i686" ]||[ "${deptocheck}" == "libstdc++64.i686" ]||[ "${deptocheck}" == "lib32gcc-s1" ]||[ "${deptocheck}" == "lib32stdc++6" ]; then steamcmdfail=1 fi @@ -343,13 +344,13 @@ fn_deps_build_debian(){ array_deps_missing=() # LinuxGSM requirements. - array_deps_required=( curl wget ca-certificates file bsdmainutils util-linux python3 tar bzip2 gzip unzip binutils bc jq tmux netcat ) + array_deps_required=( curl wget ca-certificates file bsdmainutils util-linux python3 tar bzip2 gzip unzip binutils bc jq tmux netcat cpio ) # All servers except ts3, mumble, GTA and minecraft servers require lib32stdc++6 and lib32gcc1. - if [ "${shortname}" != "ts3" ]&&[ "${shortname}" != "mumble" ]&&[ "${shortname}" != "mc" ]&&[ "${engine}" != "renderware" ]; then + if [ "${shortname}" != "ts3" ]&&[ "${shortname}" != "mumble" ]&&[ "${shortname}" != "mc" ]&&[ "${shortname}" != "pmc" ]&&[ "${shortname}" != "wmc" ]&&[ "${engine}" != "renderware" ]; then if [ "${arch}" == "x86_64" ]; then # lib32gcc1 is now called lib32gcc-s1 in debian 11 - if { [ "${distroid}" == "debian" ]&&[ "${distroversion}" == "11" ]; }|| { [ "${distroid}" == "ubuntu" ]&&[ "${distroversion}" == "20.10" ]; }; then + if { [ "${distroid}" == "debian" ]&&[ "${distroversion}" == "11" ]; }||{ [ "${distroid}" == "ubuntu" ]&&[ "${distroversion}" == "20.10" ]; }||{ [ "${distroid}" == "pop" ]&&[ "${distroversion}" == "20.10" ]; }; then array_deps_required+=( lib32gcc-s1 lib32stdc++6 ) else array_deps_required+=( lib32gcc1 lib32stdc++6 ) @@ -364,7 +365,7 @@ fn_deps_build_debian(){ if [ "${distroversion}" == "14.04" ]||[ "${distroid}" == "debian" ]&& ! grep -qE "^deb .*non-free" /etc/apt/sources.list; then : else - array_deps_required+=( steamcmd ) + array_deps_required+=( steamcmd libsdl2-2.0-0:i386 ) fi fi @@ -385,6 +386,9 @@ fn_deps_build_debian(){ # Battlefield 1942 elif [ "${shortname}" == "bf1942" ]; then array_deps_required+=( libncurses5:i386 libtinfo5:i386 ) + # Black Mesa: Death Match + elif [ "${shortname}" == "bmdm" ]; then + array_deps_required+=( libncurses5:i386 ) # Counter-Strike: Source, Garry's Mod, No More Room in Hell, Source Forts Classic, Zombie Master Reborn and Zombie Panic: Source elif [ "${shortname}" == "css" ]||[ "${shortname}" == "gmod" ]||[ "${shortname}" == "nmrih" ]||[ "${shortname}" == "sfc" ]||[ "${shortname}" == "zmr" ]||[ "${shortname}" == "zps" ]; then if [ "${arch}" == "x86_64" ]; then @@ -410,8 +414,20 @@ fn_deps_build_debian(){ # Hurtword/Rust elif [ "${shortname}" == "hw" ]||[ "${shortname}" == "rust" ]; then array_deps_required+=( lib32z1 ) - # Minecraft, Rising World, Wurm - elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "rw" ]; then + # Minecraft, Rising World + elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]||[ "${shortname}" == "wmc" ]; then + javaversion=$(java -version 2>&1 | grep "version") + if [ "${javaversion}" ]; then + # Added for users using Oracle JRE to bypass the check. + javacheck=1 + else + if { [ "${distroid}" == "ubuntu" ]&&[ "${distroversion}" == "20.04" ]; }||{ [ "${distroid}" == "ubuntu" ]&&[ "${distroversion}" == "20.10" ]; }||{ [ "${distroid}" == "ubuntu" ]&&[ "${distroversion}" == "21.04" ]; }||{ [ "${distroid}" == "pop" ]&&[ "${distroversion}" == "20.04" ]; }||{ [ "${distroid}" == "pop" ]&&[ "${distroversion}" == "20.10" ]; }||{ [ "${distroid}" == "pop" ]&&[ "${distroversion}" == "21.04" ]; }; then + array_deps_required+=( openjdk-16-jre ) + else + array_deps_required+=( default-jre ) + fi + fi + elif [ "${shortname}" == "rw" ]; then javaversion=$(java -version 2>&1 | grep "version") if [ "${javaversion}" ]; then # Added for users using Oracle JRE to bypass the check. @@ -431,28 +447,34 @@ fn_deps_build_debian(){ else array_deps_required+=( default-jre rng-tools ) fi + # SCP: Secret Laboratory, SCP: Secret Laboratory ServerMod + elif [ "${shortname}" == "scpsl" ]||[ "${shortname}" == "scpslsm" ]; then + array_deps_required+=( mono-complete ) # Sven Co-op elif [ "${shortname}" == "sven" ]; then array_deps_required+=( libssl1.1:i386 zlib1g:i386 ) - # Unreal Engine - elif [ "${executable}" == "./ucc-bin" ]; then - # UT2K4 - if [ -f "${executabledir}/ut2004-bin" ]; then - array_deps_required+=( libsdl1.2debian libstdc++5:i386 ) - # UT99 - else - array_deps_required+=( libsdl1.2debian ) - fi - # Unreal Tournament - elif [ "${shortname}" == "ut" ]; then - array_deps_required+=( unzip ) + # Vintage Story + elif [ "${shortname}" == "vints" ]; then + array_deps_required+=( mono-complete ) # Wurm: Unlimited elif [ "${shortname}" == "wurm" ]; then array_deps_required+=( xvfb ) # Post Scriptum elif [ "${shortname}" == "pstbs" ]; then array_deps_required+=( libgconf-2-4 ) + # Pavlov VR + elif [ "${shortname}" == "pvr" ]; then + array_deps_required+=( libc++1 ) + fi + + # check if system is a lxc container and the hostname dependency. + if command -v systemd-detect-virt &> /dev/null; then + systemd_virt=$(systemd-detect-virt) + if [ "${systemd_virt}" == "lxc" ]||[ "${systemd_virt}" == "lxc-libvirt" ]; then + array_deps_required+=( hostname ) + fi fi + fn_deps_email fn_check_loop } @@ -464,15 +486,15 @@ fn_deps_build_redhat(){ # LinuxGSM requirements. # CentOS if [ "${distroversion}" == "7" ]; then - array_deps_required=( epel-release curl wget util-linux python3 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat ) + array_deps_required=( epel-release curl wget util-linux python3 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat cpio ) elif [ "${distroversion}" == "8" ]; then - array_deps_required=( epel-release curl wget util-linux python36 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat ) + array_deps_required=( epel-release curl wget util-linux python36 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat cpio ) elif [ "${distroid}" == "fedora" ]; then - array_deps_required=( curl wget util-linux python3 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat ) + array_deps_required=( curl wget util-linux python3 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat cpio ) elif [[ "${distroname}" == *"Amazon Linux AMI"* ]]; then - array_deps_required=( curl wget util-linux python3 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat ) + array_deps_required=( curl wget util-linux python3 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat cpio ) else - array_deps_required=( curl wget util-linux python3 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat ) + array_deps_required=( curl wget util-linux python3 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat cpio ) fi # All servers except ts3, mumble, multi theft auto and minecraft servers require glibc.i686 and libstdc++.i686. @@ -501,8 +523,8 @@ fn_deps_build_redhat(){ # Battlefield: Vietnam elif [ "${shortname}" == "bfv" ]; then array_deps_required+=( compat-libstdc++-33.i686 glibc.i686 ) - # Battlefield 1942, Counter-Strike: Source, Garry's Mod, No More Room in Hell, Source Forts Classic, Zombie Master Reborn and Zombie Panic: Source - elif [ "${shortname}" == "bf1942" ]||[ "${shortname}" == "css" ]||[ "${shortname}" == "gmod" ]||[ "${shortname}" == "nmrih" ]||[ "${shortname}" == "sfc" ]||[ "${shortname}" == "zmr" ]||[ "${shortname}" == "zps" ]; then + # Battlefield 1942, Black Mesa: Deathmatch, Counter-Strike: Source, Garry's Mod, No More Room in Hell, Source Forts Classic, Zombie Master Reborn and Zombie Panic: Source + elif [ "${shortname}" == "bf1942" ]||[ "${shortname}" == "bmdm" ]||[ "${shortname}" == "css" ]||[ "${shortname}" == "gmod" ]||[ "${shortname}" == "nmrih" ]||[ "${shortname}" == "sfc" ]||[ "${shortname}" == "zmr" ]||[ "${shortname}" == "zps" ]; then array_deps_required+=( ncurses-libs.i686 ) # Brainbread 2, Don't Starve Together & Team Fortress 2 elif [ "${shortname}" == "bb2" ]||[ "${shortname}" == "dst" ]||[ "${shortname}" == "tf2" ]; then @@ -520,7 +542,7 @@ fn_deps_build_redhat(){ elif [ "${shortname}" == "hw" ]||[ "${shortname}" == "rust" ]; then array_deps_required+=( zlib-devel ) # Minecraft, Rising World, Wurm - elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "rw" ]; then + elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]||[ "${shortname}" == "wmc" ]||[ "${shortname}" == "rw" ]; then javaversion=$(java -version 2>&1 | grep "version") if [ "${javaversion}" ]; then # Added for users using Oracle JRE to bypass the check. @@ -543,25 +565,28 @@ fn_deps_build_redhat(){ # Sven Co-op elif [ "${shortname}" == "sven" ]; then : # not compatible - # Unreal Engine - elif [ "${executable}" == "./ucc-bin" ]; then - # UT2K4 - if [ -f "${executabledir}/ut2004-bin" ]; then - array_deps_required+=( compat-libstdc++-33.i686 SDL.i686 bzip2 ) - # UT99 - else - array_deps_required+=( SDL.i686 bzip2 ) - fi - # Unreal Tournament - elif [ "${shortname}" == "ut" ]; then - array_deps_required+=( unzip ) + # Vintage Story + elif [ "${shortname}" == "vints" ]; then + array_deps_required+=( mono-complete ) # Wurm: Unlimited elif [ "${shortname}" == "wurm" ]; then array_deps_required+=( xorg-x11-server-Xvfb ) # Post Scriptum elif [ "${shortname}" == "pstbs" ]; then array_deps_required+=( GConf2 ) + # Pavlov VR + elif [ "${shortname}" == "pvr" ]; then + array_deps_required+=( libcxx ) fi + + # check if system is a lxc container and the hostname dependency. + if command -v systemd-detect-virt &> /dev/null; then + systemd_virt=$(systemd-detect-virt) + if [ "${systemd_virt}" == "lxc" ]||[ "${systemd_virt}" == "lxc-libvirt" ]; then + array_deps_required+=( hostname ) + fi + fi + fn_deps_email fn_check_loop } diff --git a/lgsm/functions/check_executable.sh b/lgsm/functions/check_executable.sh index 8623dc303..252c6c8d2 100755 --- a/lgsm/functions/check_executable.sh +++ b/lgsm/functions/check_executable.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM check_executable.sh function +# LinuxGSM check_executable.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Checks if server executable exists. diff --git a/lgsm/functions/check_glibc.sh b/lgsm/functions/check_glibc.sh index 02f7ad459..b1a959f5b 100755 --- a/lgsm/functions/check_glibc.sh +++ b/lgsm/functions/check_glibc.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM check_glibc.sh function +# LinuxGSM check_glibc.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Checks if the server has the correct Glibc version. diff --git a/lgsm/functions/check_ip.sh b/lgsm/functions/check_ip.sh index a4ddf7ae0..ae1b99b77 100755 --- a/lgsm/functions/check_ip.sh +++ b/lgsm/functions/check_ip.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM check_ip.sh function +# LinuxGSM check_ip.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Automatically identifies the server interface IP. # If multiple interfaces are detected the user will need to manually set using ip="0.0.0.0". diff --git a/lgsm/functions/check_last_update.sh b/lgsm/functions/check_last_update.sh index 99253d749..07e9d3883 100755 --- a/lgsm/functions/check_last_update.sh +++ b/lgsm/functions/check_last_update.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM check_last_update.sh function +# LinuxGSM check_last_update.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Checks lock file to see when last update happened. # Will reboot server if instance not rebooted since update. diff --git a/lgsm/functions/check_logs.sh b/lgsm/functions/check_logs.sh index 694b1678a..b8dad203c 100755 --- a/lgsm/functions/check_logs.sh +++ b/lgsm/functions/check_logs.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM check_logs.sh function +# LinuxGSM check_logs.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Checks if log files exist. diff --git a/lgsm/functions/check_permissions.sh b/lgsm/functions/check_permissions.sh index 7f95f5da7..d4421dba1 100755 --- a/lgsm/functions/check_permissions.sh +++ b/lgsm/functions/check_permissions.sh @@ -1,7 +1,7 @@ #!/bin/bash # LinuxGSM check_permissions.sh # Author: Daniel Gibbs -# Contributor: UltimateByte +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Checks ownership & permissions of scripts, files and directories. diff --git a/lgsm/functions/check_root.sh b/lgsm/functions/check_root.sh index b6886938f..1eb6309cb 100755 --- a/lgsm/functions/check_root.sh +++ b/lgsm/functions/check_root.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM check_root.sh function +# LinuxGSM check_root.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Checks if the user tried to run the script as root. diff --git a/lgsm/functions/check_status.sh b/lgsm/functions/check_status.sh index 178adcf6b..670669e50 100755 --- a/lgsm/functions/check_status.sh +++ b/lgsm/functions/check_status.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM check_status.sh function +# LinuxGSM check_status.sh module # Author: Daniel Gibbs -# Contributor: UltimateByte +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Checks the process status of the server. Either online or offline. diff --git a/lgsm/functions/check_steamcmd.sh b/lgsm/functions/check_steamcmd.sh index 647ee7525..030cbbf03 100755 --- a/lgsm/functions/check_steamcmd.sh +++ b/lgsm/functions/check_steamcmd.sh @@ -1,150 +1,14 @@ #!/bin/bash -# LinuxGSM check_steamcmd.sh function +# LinuxGSM check_steamcmd.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Checks if SteamCMD is installed correctly. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_install_steamcmd(){ - if [ "${shortname}" == "ark" ]&&[ "${installsteamcmd}" == "1" ]; then - steamcmddir="${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux" - fi - if [ ! -d "${steamcmddir}" ]; then - mkdir -p "${steamcmddir}" - fi - remote_fileurl="${1}" - remote_fileurl_backup="${2}" - remote_fileurl_name="${3}" - remote_fileurl_backup_name="${4}" - local_filedir="${5}" - local_filename="${6}" - chmodx="${7:-0}" - run="${8:-0}" - forcedl="${9:-0}" - md5="${10:-0}" - fn_fetch_file "http://media.steampowered.com/client/steamcmd_linux.tar.gz" "" "" "" "${tmpdir}" "steamcmd_linux.tar.gz" "" "norun" "noforce" "nomd5" - fn_dl_extract "${tmpdir}" "steamcmd_linux.tar.gz" "${steamcmddir}" - chmod +x "${steamcmddir}/steamcmd.sh" -} - -fn_check_steamcmd_user(){ - # Checks if steamuser is setup. - if [ "${steamuser}" == "username" ]; then - fn_print_fail_nl "Steam login not set. Update steamuser in ${configdirserver}" - echo -e " * Change steamuser=\"username\" to a valid steam login." - if [ -d "${lgsmlogdir}" ]; then - fn_script_log_fatal "Steam login not set. Update steamuser in ${configdirserver}" - fi - core_exit.sh - fi - # Anonymous user is set if steamuser is missing. - if [ -z "${steamuser}" ]; then - if [ -d "${lgsmlogdir}" ]; then - fn_script_log_info "Using anonymous Steam login" - fi - steamuser="anonymous" - steampass='' - fi -} - -fn_check_steamcmd(){ - # Checks if SteamCMD exists when starting or updating a server. - # Only install if steamcmd package is missing or steamcmd dir is missing. - if [ ! -f "${steamcmddir}/steamcmd.sh" ]&&[ -z "$(command -v steamcmd 2>/dev/null)" ]; then - if [ "${commandname}" == "INSTALL" ]; then - fn_install_steamcmd - else - fn_print_warn_nl "SteamCMD is missing" - fn_script_log_warn "SteamCMD is missing" - fn_install_steamcmd - fi - elif [ "${commandname}" == "INSTALL" ]; then - fn_print_information "SteamCMD is already installed..." - fn_print_ok_eol_nl - fi -} - -fn_check_steamcmd_dir(){ - # Worksround that pre-installs the correct steam directories to ensure all packages use the correct Standard. - # https://github.com/ValveSoftware/steam-for-linux/issues/6976#issuecomment-610446347 - - # Create Steam installation directory. - if [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then - mkdir -p "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" - fi - - # Create common Steam directory. - if [ ! -d "${HOME}/.steam" ]; then - mkdir -p "${HOME}/.steam" - fi - - # Symbolic links to Steam installation directory. - if [ ! -L "${HOME}/.steam/root" ]; then - if [ -d "${HOME}/.steam/root" ]; then - rm "${HOME}/.steam/root" - fi - ln -s "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" "${HOME}/.steam/root" - fi - - if [ ! -L "${HOME}/.steam/steam" ]; then - if [ -d "${HOME}/.steam/steam" ]; then - rm -rf "${HOME}/.steam/steam" - fi - ln -s "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" "${HOME}/.steam/steam" - fi -} - -fn_check_steamcmd_dir_legacy(){ - # Remove old Steam installation directories ~/Steam and ${rootdir}/steamcmd - if [ -d "${rootdir}/steamcmd" ]&&[ "${steamcmddir}" == "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then - rm -rf "${rootdir:?}/steamcmd" - fi - - if [ -d "${HOME}/Steam" ]&&[ "${steamcmddir}" == "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then - rm -rf "${HOME}/Steam" - fi -} - -fn_check_steamcmd_ark(){ - # Checks if SteamCMD exists in - # Engine/Binaries/ThirdParty/SteamCMD/Linux - # to allow ark mods to work - if [ ! -f "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamcmd.sh" ]; then - installsteamcmd=1 - if [ "${commandname}" == "INSTALL" ]; then - fn_install_steamcmd - else - fn_print_warn_nl "ARK mods SteamCMD is missing" - fn_script_log_warn "ARK mods SteamCMD is missing" - fn_install_steamcmd - fi - elif [ "${commandname}" == "INSTALL" ]; then - fn_print_information "ARK mods SteamCMD is already installed..." - fn_print_ok_eol_nl - fi -} - -fn_check_steamcmd_clear(){ -# Will remove steamcmd dir if steamcmd package is installed. -if [ "$(command -v steamcmd 2>/dev/null)" ]&&[ -d "${rootdir}/steamcmd" ]; then - rm -rf "${steamcmddir:?}" - exitcode=$? - if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "Removing ${rootdir}/steamcmd" - else - fn_script_log_pass "Removing ${rootdir}/steamcmd" - fi -fi -} - -fn_check_steamcmd_exec(){ - if [ "$(command -v steamcmd 2>/dev/null)" ]; then - steamcmdcommand="steamcmd" - else - steamcmdcommand="./steamcmd.sh" - fi -} +# init steamcmd functions +core_steamcmd.sh fn_check_steamcmd_clear fn_check_steamcmd @@ -153,5 +17,6 @@ if [ ${shortname} == "ark" ]; then fi fn_check_steamcmd_dir fn_check_steamcmd_dir_legacy +fn_check_steamcmd_steamapp fn_check_steamcmd_user fn_check_steamcmd_exec diff --git a/lgsm/functions/check_system_dir.sh b/lgsm/functions/check_system_dir.sh index ce7ff5ba5..0a732d6d1 100755 --- a/lgsm/functions/check_system_dir.sh +++ b/lgsm/functions/check_system_dir.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM check_system_dir.sh function +# LinuxGSM check_system_dir.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Checks if systemdir/serverfiles is accessible. diff --git a/lgsm/functions/check_system_requirements.sh b/lgsm/functions/check_system_requirements.sh index 7a8b73de5..cc72288fb 100755 --- a/lgsm/functions/check_system_requirements.sh +++ b/lgsm/functions/check_system_requirements.sh @@ -1,9 +1,9 @@ #!/bin/bash # LinuxGSM check_system_requirements.sh # Author: Daniel Gibbs -# Contributor: UltimateByte +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Checks RAM requirements +# Description: Checks RAM requirements. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" @@ -26,7 +26,7 @@ elif [ "${shortname}" == "arma3" ]; then elif [ "${shortname}" == "rust" ]; then ramrequirementmb="4000" ramrequirementgb="4" -elif [ "${shortname}" == "mc" ]; then +elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]||[ "${shortname}" == "wmc" ]; then ramrequirementmb="1000" ramrequirementgb="1" elif [ "${shortname}" == "pstbs" ]; then @@ -49,7 +49,7 @@ if [ "${ramrequirementmb}" ]; then fn_print_dots "Check RAM" # Warn the user. fn_print_warn_nl "Check RAM: ${ramrequirementgb}G required, ${physmemtotal} available" - echo " * ${gamename} server may fail to run or experience poor performance." + echo "* ${gamename} server may fail to run or experience poor performance." fn_sleep_time fi fi diff --git a/lgsm/functions/check_tmuxception.sh b/lgsm/functions/check_tmuxception.sh index 4f5fd2e29..e11b55861 100755 --- a/lgsm/functions/check_tmuxception.sh +++ b/lgsm/functions/check_tmuxception.sh @@ -1,9 +1,9 @@ #!/bin/bash -# LinuxGSM check_config.sh function +# LinuxGSM check_config.sh module # Author: Daniel Gibbs -# Contributor: UltimateByte +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Checks if run from tmux or screen +# Description: Checks if run from tmux or screen. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/functions/check_version.sh b/lgsm/functions/check_version.sh index 15f0284bb..a0f3d4435 100755 --- a/lgsm/functions/check_version.sh +++ b/lgsm/functions/check_version.sh @@ -1,10 +1,13 @@ #!/bin/bash -# LinuxGSM command_version.sh function +# LinuxGSM command_version.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Will run update-lgsm if gameserver.sh and modules version does not match # this will allow gameserver.sh to update - useful for multi instance servers. +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + if [ -n "${modulesversion}" ]&&[ -n "${version}" ]&&[ "${version}" != "${modulesversion}" ]; then exitbypass=1 echo -e "" diff --git a/lgsm/functions/command_backup.sh b/lgsm/functions/command_backup.sh old mode 100755 new mode 100644 index e778cb8a6..adce957c9 --- a/lgsm/functions/command_backup.sh +++ b/lgsm/functions/command_backup.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM command_backup.sh function +# LinuxGSM command_backup.sh module # Author: Daniel Gibbs -# Contributor: UltimateByte +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Creates a .tar.gz file in the backup directory. @@ -24,6 +24,8 @@ fn_backup_trap(){ fn_script_log_info "Backup ${backupname}.tar.gz: REMOVED" # Remove lock file. rm -f "${lockdir:?}/backup.lock" + fn_backup_start_server + unset exitbypass core_exit.sh } @@ -253,11 +255,11 @@ fn_backup_start_server(){ # Run functions. fn_backup_check_lockfile -fn_backup_create_lockfile fn_backup_init fn_backup_stop_server fn_backup_dir fn_backup_migrate_olddir +fn_backup_create_lockfile fn_backup_compression fn_backup_prune fn_backup_start_server diff --git a/lgsm/functions/command_check_update.sh b/lgsm/functions/command_check_update.sh new file mode 100755 index 000000000..9648dd49e --- /dev/null +++ b/lgsm/functions/command_check_update.sh @@ -0,0 +1,25 @@ +#!/bin/bash +# LinuxGSM command_check_update.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Handles updating of servers. + +commandname="CHECK-UPDATE" +commandaction="check for Update" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +fn_print_dots "" +check.sh +core_logs.sh + +core_steamcmd.sh + +check_steamcmd.sh + +fn_update_steamcmd_localbuild +fn_update_steamcmd_remotebuild +fn_update_steamcmd_compare + +core_exit.sh diff --git a/lgsm/functions/command_console.sh b/lgsm/functions/command_console.sh index 0de924ea6..5b84789e6 100755 --- a/lgsm/functions/command_console.sh +++ b/lgsm/functions/command_console.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM command_console.sh function +# LinuxGSM command_console.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Gives access to the server tmux console. diff --git a/lgsm/functions/command_debug.sh b/lgsm/functions/command_debug.sh index fe2e8a38e..aac203ac9 100755 --- a/lgsm/functions/command_debug.sh +++ b/lgsm/functions/command_debug.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM command_debug.sh function +# LinuxGSM command_debug.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Runs the server without tmux and directly from the terminal. @@ -28,7 +29,6 @@ fix.sh info_distro.sh info_config.sh # NOTE: Check if works with server without parms. Could be intergrated in to info_parms.sh. -fn_parms fn_print_header { echo -e "${lightblue}Distro:\t\t${default}${distroname}" @@ -67,11 +67,15 @@ fi if [ "${serverpassword}" ]; then echo -e "${lightblue}Server password:\t${default}${serverpassword}" fi + +fn_reload_startparameters echo -e "${lightblue}Start parameters:${default}" if [ "${engine}" == "source" ]||[ "${engine}" == "goldsrc" ]; then - echo -e "${executable} ${parms} -debug" + echo -e "${executable} ${startparameters} -debug" +elif [ "${engine}" == "quake" ]; then + echo -e "${executable} ${startparameters} -condebug" else - echo -e "${executable} ${parms}" + echo -e "${preexecutable} ${executable} ${startparameters}" fi echo -e "" echo -e "Use for identifying server issues only!" @@ -101,18 +105,19 @@ fn_script_log_info "Lockfile generated" fn_script_log_info "${lockdir}/${selfname}.lock" cd "${executabledir}" || exit -# Note: do not add double quotes to ${executable} ${parms}. +# Note: do not add double quotes to ${executable} ${startparameters}. if [ "${engine}" == "source" ]||[ "${engine}" == "goldsrc" ]; then - ${executable} ${parms} -debug + ${executable} ${startparameters} -debug elif [ "${shortname}" == "arma3" ]; then # Arma3 requires semicolons in the module list, which need to # be escaped for regular (tmux) loading, but need to be # stripped when loading straight from the console. ${executable} ${parms//\\;/;} elif [ "${engine}" == "quake" ]; then - ${executable} ${parms} -condebug + ${executable} ${startparameters} -condebug else - ${executable} ${parms} + # shellcheck disable=SC2086 + ${preexecutable} ${executable} ${startparameters} fi fn_lockfile_trap diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index 2db605656..14765ca99 100755 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM command_details.sh function +# LinuxGSM command_details.sh module # Author: Daniel Gibbs -# Contributor: UltimateByte +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Displays server information. @@ -32,7 +32,6 @@ fn_info_message_script fn_info_message_backup # Some game servers do not have parms. if [ "${shortname}" != "ts3" ]&&[ "${shortname}" != "jc2" ]&&[ "${shortname}" != "dst" ]&&[ "${shortname}" != "pz" ]&&[ "${engine}" != "renderware" ]; then - fn_parms fn_info_message_commandlineparms fi fn_info_message_ports diff --git a/lgsm/functions/command_dev_clear_functions.sh b/lgsm/functions/command_dev_clear_functions.sh index 96a637c52..87c77515d 100755 --- a/lgsm/functions/command_dev_clear_functions.sh +++ b/lgsm/functions/command_dev_clear_functions.sh @@ -1,6 +1,7 @@ #!/bin/bash -# command_dev_clear_functions.sh function +# LinuxGSM command_dev_clear_functions.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Deletes the contents of the functions dir. diff --git a/lgsm/functions/command_dev_debug.sh b/lgsm/functions/command_dev_debug.sh index e959509cd..957709898 100755 --- a/lgsm/functions/command_dev_debug.sh +++ b/lgsm/functions/command_dev_debug.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM command_dev_debug.sh function +# LinuxGSM command_dev_debug.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Dev only: Enables debugging log to be saved to dev-debug.log. diff --git a/lgsm/functions/command_dev_detect_deps.sh b/lgsm/functions/command_dev_detect_deps.sh index 2a620fd66..976bf94dc 100755 --- a/lgsm/functions/command_dev_detect_deps.sh +++ b/lgsm/functions/command_dev_detect_deps.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM command_dev_detect_deps.sh function +# LinuxGSM command_dev_detect_deps.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Detects dependencies the server binary requires. @@ -155,6 +156,11 @@ while read -r lib; do echo -e "libfreetype6" >> "${tmpdir}/.depdetect_ubuntu_list" echo -e "libfreetype6" >> "${tmpdir}/.depdetect_debian_list" libdetected=1 + elif [ "${lib}" == "libc++.so.1" ]; then + echo -e "libcxx" >> "${tmpdir}/.depdetect_centos_list" + echo -e "libc++1" >> "${tmpdir}/.depdetect_ubuntu_list" + echo -e "libc++1" >> "${tmpdir}/.depdetect_debian_list" + libdetected=1 fi if [ "${libdetected}" != "1" ]; then diff --git a/lgsm/functions/command_dev_detect_glibc.sh b/lgsm/functions/command_dev_detect_glibc.sh index e538c456e..304d255fd 100755 --- a/lgsm/functions/command_dev_detect_glibc.sh +++ b/lgsm/functions/command_dev_detect_glibc.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM command_dev_detect_glibc.sh function +# LinuxGSM command_dev_detect_glibc.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Automatically detects the version of GLIBC that is required. # Can check a file or directory recursively. diff --git a/lgsm/functions/command_dev_detect_ldd.sh b/lgsm/functions/command_dev_detect_ldd.sh index e6ddfb09f..7d6e942a1 100755 --- a/lgsm/functions/command_dev_detect_ldd.sh +++ b/lgsm/functions/command_dev_detect_ldd.sh @@ -1,6 +1,7 @@ #!/bin/bash -# command_dev_detect_ldd.sh function +# LinuxGSM command_dev_detect_ldd.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Automatically detects required deps using ldd. # Can check a file or directory recursively. diff --git a/lgsm/functions/command_dev_query_raw.sh b/lgsm/functions/command_dev_query_raw.sh index ac1e9f688..7c2dd95f9 100755 --- a/lgsm/functions/command_dev_query_raw.sh +++ b/lgsm/functions/command_dev_query_raw.sh @@ -1,6 +1,7 @@ #!/bin/bash -# command_dev_query_raw.sh function +# LinuxGSM command_dev_query_raw.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Raw gamedig output of the server. @@ -51,7 +52,7 @@ for queryip in "${queryips[@]}"; do echo -e "./query_gsquery.py -a \"${queryip}\" -p \"${queryport}\" -e \"${querytype}\"" echo -e "" if [ ! -f "${functionsdir}/query_gsquery.py" ]; then - fn_fetch_file_github "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nomd5" + fn_fetch_file_github "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nohash" fi "${functionsdir}"/query_gsquery.py -a "${queryip}" -p "${queryport}" -e "${querytype}" done diff --git a/lgsm/functions/command_donate.sh b/lgsm/functions/command_donate.sh index 18e6dce5a..f00a4d702 100755 --- a/lgsm/functions/command_donate.sh +++ b/lgsm/functions/command_donate.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM command_donate.sh function +# LinuxGSM command_donate.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Shows ways to donate. diff --git a/lgsm/functions/command_fastdl.sh b/lgsm/functions/command_fastdl.sh index 4f8ebd863..d6ab960bd 100755 --- a/lgsm/functions/command_fastdl.sh +++ b/lgsm/functions/command_fastdl.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM command_fastdl.sh function +# LinuxGSM command_fastdl.sh module # Author: Daniel Gibbs -# Contributor: UltimateByte +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Creates a FastDL directory. @@ -178,7 +178,7 @@ fn_fastdl_preview(){ elif [ "${directory}" == "materials" ]; then local allowed_extentions_array=( "*.vtf" "*.vmt" "*.vbf" "*.png" "*.svg" ) elif [ "${directory}" == "models" ]; then - local allowed_extentions_array=( "*.vtx" "*.vvd" "*.mdl" "*.phy" "*.jpg" "*.png" ) + local allowed_extentions_array=( "*.vtx" "*.vvd" "*.mdl" "*.phy" "*.jpg" "*.png" "*.vmt" "*.vtf" ) elif [ "${directory}" == "particles" ]; then local allowed_extentions_array=( "*.pcf" ) elif [ "${directory}" == "sound" ]; then diff --git a/lgsm/functions/command_install.sh b/lgsm/functions/command_install.sh index 3e5d27872..e56890b4d 100755 --- a/lgsm/functions/command_install.sh +++ b/lgsm/functions/command_install.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM command_install.sh function +# LinuxGSM command_install.sh module # Author: Daniel Gibbs -# Contributor: UltimateByte +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Overall function for the installer. diff --git a/lgsm/functions/command_install_resources_mta.sh b/lgsm/functions/command_install_resources_mta.sh index 503948a3c..3a94444a3 100755 --- a/lgsm/functions/command_install_resources_mta.sh +++ b/lgsm/functions/command_install_resources_mta.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM command_install_resources_mta.sh function +# LinuxGSM command_install_resources_mta.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Installs the default resources for Multi Theft Auto. @@ -13,7 +14,7 @@ fn_install_resources(){ echo -e "" echo -e "Installing Default Resources" echo -e "=================================" - fn_fetch_file "http://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip" "" "" "" "${tmpdir}" "mtasa-resources-latest.zip" "nochmodx" "norun" "noforce" "nomd5" + fn_fetch_file "http://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip" "" "" "" "${tmpdir}" "mtasa-resources-latest.zip" "nochmodx" "norun" "noforce" "nohash" fn_dl_extract "${tmpdir}" "mtasa-resources-latest.zip" "${resourcesdir}" echo -e "Default Resources Installed." } diff --git a/lgsm/functions/command_mods_install.sh b/lgsm/functions/command_mods_install.sh index d644e0cf0..a5eaaf83c 100755 --- a/lgsm/functions/command_mods_install.sh +++ b/lgsm/functions/command_mods_install.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM command_mods_install.sh function +# LinuxGSM command_mods_install.sh module # Author: Daniel Gibbs -# Contributor: UltimateByte +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: List and installs available mods along with mods_list.sh and mods_core.sh. diff --git a/lgsm/functions/command_mods_remove.sh b/lgsm/functions/command_mods_remove.sh index 507251e87..8647a21ed 100755 --- a/lgsm/functions/command_mods_remove.sh +++ b/lgsm/functions/command_mods_remove.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM command_mods_uninstall.sh function +# LinuxGSM command_mods_uninstall.sh module # Author: Daniel Gibbs -# Contributor: UltimateByte +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Uninstall mods along with mods_list.sh and mods_core.sh. diff --git a/lgsm/functions/command_mods_update.sh b/lgsm/functions/command_mods_update.sh index 9328a493d..50bbf9d67 100755 --- a/lgsm/functions/command_mods_update.sh +++ b/lgsm/functions/command_mods_update.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM command_mods_update.sh function +# LinuxGSM command_mods_update.sh module # Author: Daniel Gibbs -# Contributor: UltimateByte +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Updates installed mods along with mods_list.sh and mods_core.sh. diff --git a/lgsm/functions/command_monitor.sh b/lgsm/functions/command_monitor.sh index edc101012..3602bef93 100755 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM command_monitor.sh function +# LinuxGSM command_monitor.sh module # Author: Daniel Gibbs -# Contributor: UltimateByte +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Monitors server by checking for running processes # then passes to gamedig and gsquery. @@ -87,7 +87,7 @@ fn_monitor_check_queryport(){ fn_query_gsquery(){ if [ ! -f "${functionsdir}/query_gsquery.py" ]; then - fn_fetch_file_github "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nomd5" + fn_fetch_file_github "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nohash" fi "${functionsdir}"/query_gsquery.py -a "${queryip}" -p "${queryport}" -e "${querytype}" > /dev/null 2>&1 querystatus="$?" diff --git a/lgsm/functions/command_postdetails.sh b/lgsm/functions/command_postdetails.sh index 0f18b12a9..fa2907b1e 100755 --- a/lgsm/functions/command_postdetails.sh +++ b/lgsm/functions/command_postdetails.sh @@ -1,9 +1,9 @@ #!/bin/bash -# LinuxGSM command_postdetails.sh function -# Author: CedarLUG -# Contributor: CedarLUG +# LinuxGSM command_postdetails.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Strips sensitive information out of Details output +# Description: Strips sensitive information out of Details output. commandname="POST-DETAILS" commandaction="Posting details" @@ -52,7 +52,6 @@ else fn_info_message_backup # Some game servers do not have parms. if [ "${shortname}" != "jc2" ]&&[ "${shortname}" != "jc3" ]&&[ "${shortname}" != "dst" ]&&[ "${shortname}" != "pz" ]&&[ "${engine}" != "renderware" ]; then - fn_parms fn_info_message_commandlineparms fi fn_info_message_ports diff --git a/lgsm/functions/command_restart.sh b/lgsm/functions/command_restart.sh index 9498c618c..47a6b904c 100755 --- a/lgsm/functions/command_restart.sh +++ b/lgsm/functions/command_restart.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM command_restart.sh function +# LinuxGSM command_restart.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Restarts the server. diff --git a/lgsm/functions/command_send.sh b/lgsm/functions/command_send.sh new file mode 100644 index 000000000..4b653c0be --- /dev/null +++ b/lgsm/functions/command_send.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# LinuxGSM command_send.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Send command to the server tmux console. + +commandname="SEND" +commandaction="Send" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +fn_firstcommand_set + +check.sh +if [ -z "${userinput2}" ]; then + fn_print_header + fn_print_information_nl "Send a command to the console." +fi + +check_status.sh +if [ "${status}" != "0" ]; then + if [ -n "${userinput2}" ]; then + commandtosend="${userinput2}" + else + echo "" + commandtosend=$( fn_prompt_message "send: " ) + fi + echo "" + fn_print_dots "Sending command to console: \"${commandtosend}\"" + tmux send-keys -t "${servicename}" "${commandtosend}" ENTER + fn_print_ok_nl "Sending command to console: \"${commandtosend}\"" + fn_script_log_pass "Command \"${commandtosend}\" sent to console" +else + fn_print_error_nl "Server not running" + fn_script_log_error "Failed to access: Server not running" + if fn_prompt_yn "Do you want to start the server?" Y; then + exitbypass=1 + command_start.sh + fi +fi + +core_exit.sh diff --git a/lgsm/functions/command_skeleton.sh b/lgsm/functions/command_skeleton.sh new file mode 100644 index 000000000..7b7d67d5f --- /dev/null +++ b/lgsm/functions/command_skeleton.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# LinuxGSM command_skeleton.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Creates an copy of a game servers directorys. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_print_dots "Creating skeleton directory" +check.sh + +# Find all directorys and create them in the skel directory +find "${rootdir}" -type d -not \( -path ./skel -prune \) | cpio -pdvm skel 2>/dev/null +exitcode=$? +if [ "${exitcode}" != 0 ]; then + fn_print_fail_nl "Creating skeleton directory" + fn_script_log_fatal "Creating skeleton directory" +else + fn_print_ok_nl "Creating skeleton directory: ./skel" + fn_script_log_pass "Creating skeleton directory: ./skel" +fi +core_exit.sh diff --git a/lgsm/functions/command_start.sh b/lgsm/functions/command_start.sh index 897cc90aa..caa933320 100755 --- a/lgsm/functions/command_start.sh +++ b/lgsm/functions/command_start.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM command_start.sh function +# LinuxGSM command_start.sh module # Author: Daniel Gibbs -# Contributor: UltimateByte +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Starts the server. @@ -41,9 +41,7 @@ fn_start_jk2(){ fn_start_tmux(){ if [ "${parmsbypass}" ]; then - parms="" - else - fn_parms + startparameters="" fi # check for tmux size variables. if [[ "${servercfgtmuxwidth}" =~ ^[0-9]+$ ]]; then @@ -73,8 +71,9 @@ fn_start_tmux(){ date '+%s' > "${lockdir}/${selfname}.lock" echo "${version}" >> "${lockdir}/${selfname}.lock" echo "${port}" >> "${lockdir}/${selfname}.lock" + fn_reload_startparameters cd "${executabledir}" || exit - tmux new-session -d -x "${sessionwidth}" -y "${sessionheight}" -s "${sessionname}" "${executable} ${parms}" 2> "${lgsmlogdir}/.${selfname}-tmux-error.tmp" + tmux new-session -d -x "${sessionwidth}" -y "${sessionheight}" -s "${sessionname}" "${preexecutable} ${executable} ${startparameters}" 2> "${lgsmlogdir}/.${selfname}-tmux-error.tmp" # Create logfile. touch "${consolelog}" @@ -82,26 +81,22 @@ fn_start_tmux(){ # Create last start lock file date +%s > "${lockdir}/${selfname}-laststart.lock" - # Get tmux version. - tmuxversion=$(tmux -V | sed "s/tmux //" | sed -n '1 p') - # Tmux compiled from source will return "master", therefore ignore it. - if [ "$(tmux -V | sed "s/tmux //" | sed -n '1 p')" == "master" ]; then - fn_script_log "Tmux version: master (user compiled)" - echo -e "Tmux version: master (user compiled)" >> "${consolelog}" + # tmux compiled from source will return "master", therefore ignore it. + if [ "${tmuxv}" == "master" ]; then + fn_script_log "tmux version: master (user compiled)" + echo -e "tmux version: master (user compiled)" >> "${consolelog}" if [ "${consolelogging}" == "on" ]||[ -z "${consolelogging}" ]; then tmux pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'" fi - elif [ "${tmuxversion}" ]; then - # Get the digit version of tmux. - tmuxversion=$(tmux -V | sed "s/tmux //" | sed -n '1 p' | tr -cd '[:digit:]') + elif [ -n "${tmuxv}" ]; then # tmux pipe-pane not supported in tmux versions < 1.6. - if [ "${tmuxversion}" -lt "16" ]; then - echo -e "Console logging disabled: Tmux => 1.6 required + if [ "${tmuxvdigit}" -lt "16" ]; then + echo -e "Console logging disabled: tmux => 1.6 required https://linuxgsm.com/tmux-upgrade Currently installed: $(tmux -V)" > "${consolelog}" # Console logging disabled: Bug in tmux 1.8 breaks logging. - elif [ "${tmuxversion}" -eq "18" ]; then + elif [ "${tmuxvdigit}" -eq "18" ]; then echo -e "Console logging disabled: Bug in tmux 1.8 breaks logging https://linuxgsm.com/tmux-upgrade Currently installed: $(tmux -V)" > "${consolelog}" @@ -127,12 +122,12 @@ fn_start_tmux(){ fn_print_fail_nl "Unable to start ${servername}" fn_script_log_fatal "Unable to start ${servername}" if [ -s "${lgsmlogdir}/.${selfname}-tmux-error.tmp" ]; then - fn_print_fail_nl "Unable to start ${servername}: Tmux error:" - fn_script_log_fatal "Unable to start ${servername}: Tmux error:" + fn_print_fail_nl "Unable to start ${servername}: tmux error:" + fn_script_log_fatal "Unable to start ${servername}: tmux error:" echo -e "" echo -e "Command" echo -e "=================================" - echo -e "tmux new-session -d -s \"${sessionname}\" \"${executable} ${parms}\"" | tee -a "${lgsmlog}" + echo -e "tmux new-session -d -s \"${sessionname}\" \"${preexecutable} ${executable} ${startparameters}\"" | tee -a "${lgsmlog}" echo -e "" echo -e "Error" echo -e "=================================" @@ -171,7 +166,7 @@ fn_start_tmux(){ fn_print_ok "${servername}" fn_script_log_pass "Started ${servername}" fi - rm "${lgsmlogdir:?}/.${selfname}-tmux-error.tmp" + rm "${lgsmlogdir:?}/.${selfname}-tmux-error.tmp" 2>/dev/null echo -en "\n" } diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index 439967fd0..f0a0bf92c 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM command_stop.sh function +# LinuxGSM command_stop.sh module # Author: Daniel Gibbs -# Contributors: UltimateByte +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Stops the server. @@ -43,7 +43,7 @@ fn_stop_graceful_cmd(){ fn_print_dots "Graceful: sending \"${1}\"" fn_script_log_info "Graceful: sending \"${1}\"" # Sends specific stop command. - tmux send -t "${sessionname}" "${1}" ENTER > /dev/null 2>&1 + tmux send -t "${sessionname}" ENTER "${1}" ENTER > /dev/null 2>&1 # Waits up to ${seconds} seconds giving the server time to shutdown gracefully. for ((seconds=1; seconds<=${2}; seconds++)); do check_status.sh diff --git a/lgsm/functions/command_test_alert.sh b/lgsm/functions/command_test_alert.sh index 625d5c6c2..9397a445c 100755 --- a/lgsm/functions/command_test_alert.sh +++ b/lgsm/functions/command_test_alert.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM command_test_alert.sh function +# LinuxGSM command_test_alert.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Sends a test alert. diff --git a/lgsm/functions/command_ts3_server_pass.sh b/lgsm/functions/command_ts3_server_pass.sh index ff75b71d2..1e227f3de 100755 --- a/lgsm/functions/command_ts3_server_pass.sh +++ b/lgsm/functions/command_ts3_server_pass.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM command_ts3_server_pass.sh function +# LinuxGSM command_ts3_server_pass.sh module # Author: Daniel Gibbs -# Contributor : UltimateByte +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Changes TS3 serveradmin password. diff --git a/lgsm/functions/command_update.sh b/lgsm/functions/command_update.sh index b117cbec5..828c8c38d 100755 --- a/lgsm/functions/command_update.sh +++ b/lgsm/functions/command_update.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM command_update.sh function +# LinuxGSM command_update.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles updating of servers. @@ -20,6 +21,8 @@ elif [ "${shortname}" == "mc" ]; then update_minecraft.sh elif [ "${shortname}" == "mcb" ]; then update_minecraft_bedrock.sh +elif [ "${shortname}" == "pmc" ]||[ "${shortname}" == "wmc" ]; then + update_papermc.sh elif [ "${shortname}" == "mumble" ]; then update_mumble.sh elif [ "${shortname}" == "fctr" ]; then @@ -28,6 +31,8 @@ elif [ "${shortname}" == "mta" ]; then update_mta.sh elif [ "${shortname}" == "jk2" ]; then update_jediknight2.sh +elif [ "${shortname}" == "vints" ]; then + update_vintagestory.sh else update_steamcmd.sh fi diff --git a/lgsm/functions/command_update_linuxgsm.sh b/lgsm/functions/command_update_linuxgsm.sh index 7e0ec57b6..4027c1e6d 100755 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM command_update_linuxgsm.sh function +# LinuxGSM command_update_linuxgsm.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Deletes the functions dir to allow re-downloading of functions from GitHub. @@ -57,7 +58,7 @@ if [ "${tmp_script_diff}" != "" ]; then fn_print_update_eol_nl fn_script_log_update "Checking ${remotereponame} linuxgsm.sh" rm -f "${tmpdir:?}/linuxgsm.sh" - fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "nochmodx" "norun" "noforcedl" "nomd5" + fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "nochmodx" "norun" "noforcedl" "nohash" else fn_print_ok_eol_nl fn_script_log_pass "Checking ${remotereponame} linuxgsm.sh" @@ -137,7 +138,7 @@ if [ "${config_file_diff}" != "" ]; then fn_print_update_eol_nl fn_script_log_update "Checking ${remotereponame} config _default.cfg" rm -f "${configdirdefault:?}/config-lgsm/${gameservername:?}/_default.cfg" - fn_fetch_file_github "lgsm/config-default/config-lgsm/${gameservername}" "_default.cfg" "${configdirdefault}/config-lgsm/${gameservername}" "nochmodx" "norun" "noforce" "nomd5" + fn_fetch_file_github "lgsm/config-default/config-lgsm/${gameservername}" "_default.cfg" "${configdirdefault}/config-lgsm/${gameservername}" "nochmodx" "norun" "noforce" "nohash" alert="config" alert.sh else diff --git a/lgsm/functions/command_validate.sh b/lgsm/functions/command_validate.sh index 690a86b43..4c51bacb3 100755 --- a/lgsm/functions/command_validate.sh +++ b/lgsm/functions/command_validate.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM command_validate.sh function +# LinuxGSM command_validate.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Runs a server validation. diff --git a/lgsm/functions/command_wipe.sh b/lgsm/functions/command_wipe.sh index 3e0c53b2e..d2d05defc 100755 --- a/lgsm/functions/command_wipe.sh +++ b/lgsm/functions/command_wipe.sh @@ -1,9 +1,9 @@ #!/bin/bash -# LinuxGSM command_backup.sh function +# LinuxGSM command_backup.sh module # Author: Daniel Gibbs -# Contributor: UltimateByte +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Wipes server data, useful after updates for some games like Rust +# Description: Wipes server data, useful after updates for some games like Rust. commandname="WIPE" commandaction="Wiping" @@ -12,9 +12,9 @@ fn_firstcommand_set # Provides an exit code upon error. fn_wipe_exit_code(){ - ((exitcode=$?)) + exitcode=$? if [ "${exitcode}" != 0 ]; then - fn_script_log_fatal "${currentaction}" + fn_print_fail_eol_nl core_exit.sh else fn_print_ok_eol_nl @@ -22,229 +22,160 @@ fn_wipe_exit_code(){ } # Removes files to wipe server. -fn_wipe_server_files(){ - fn_print_start_nl "Wiping server" - fn_script_log_info "Wiping server" - # Wipe procedural map. - if [ -n "$(find "${serveridentitydir}" -type f -name "proceduralmap.*.map")" ]; then - echo -en "removing procedural map proceduralmap.*.map file(s)..." - fn_sleep_time - fn_script_log_info "Removing procedural map file(s): ${serveridentitydir}/proceduralmap.*.map" - find "${serveridentitydir:?}" -type f -name "proceduralmap.*.map" -delete | tee -a "${lgsmlog}" - fn_wipe_exit_code - fn_sleep_time - else - echo -e "no procedural map file to remove" - fn_sleep_time - fn_script_log_pass "No procedural map file to remove" - fi - # Wipe procedural map save. - if [ -n "$(find "${serveridentitydir}" -type f -name "proceduralmap.*.sav")" ]; then - echo -en "removing map saves proceduralmap.*.sav file(s)..." - fn_sleep_time - fn_script_log_info "Removing procedural map save(s): ${serveridentitydir}/proceduralmap.*.sav" - find "${serveridentitydir:?}" -type f -name "proceduralmap.*.sav" -delete | tee -a "${lgsmlog}" - fn_wipe_exit_code - fn_sleep_time - else - echo -e "no procedural map save to remove" - fn_sleep_time - fn_script_log_pass "No procedural map save to remove" - fi - # Wipe Barren map. - if [ -n "$(find "${serveridentitydir}" -type f -name "barren*.map")" ]; then - echo -en "removing barren map barren*.map file(s)..." - fn_sleep_time - fn_script_log_info "Removing map file(s): ${serveridentitydir}/barren*.map" - find "${serveridentitydir:?}" -type f -name "barren*.map" -delete | tee -a "${lgsmlog}" - fn_wipe_exit_code - fn_sleep_time - else - echo -e "no barren map file to remove" - fn_sleep_time - fn_script_log_pass "No barren map file to remove" - fi - # Wipe barren map save. - if [ -n "$(find "${serveridentitydir}" -type f -name "barren*.sav")" ]; then - echo -en "removing barren map saves barren*.sav file(s)..." - fn_sleep_time - fn_script_log_info "Removing barren map save(s): ${serveridentitydir}/barren*.sav" - find "${serveridentitydir:?}" -type f -name "barren*.sav" -delete | tee -a "${lgsmlog}" - fn_wipe_exit_code - fn_sleep_time - else - echo -e "no barren map save to remove" - fn_sleep_time - fn_script_log_pass "No barren map save to remove." - fi - # Wipe custom map. - if [ -n "$(find "${serveridentitydir}" -type f -name "*.map")" ]; then - echo -en "removing custom map file(s)..." - fn_sleep_time - fn_script_log_info "Removing map file(s): ${serveridentitydir}/*.map" - find "${serveridentitydir:?}" -type f -name "*.map" -delete | tee -a "${lgsmlog}" - fn_wipe_exit_code - fn_sleep_time - else - echo -e "no map file to remove" - fn_sleep_time - fn_script_log_pass "No map file to remove" - fi - # Wipe custom map save. - if [ -n "$(find "${serveridentitydir}" -type f -name "*.sav")" ]; then - echo -en "removing map save *.sav file(s)..." - fn_sleep_time - fn_script_log_info "Removing map save(s): ${serveridentitydir}/*.sav" - find "${serveridentitydir:?}" -type f -name "*.sav" -delete | tee -a "${lgsmlog}" - fn_wipe_exit_code - fn_sleep_time - else - echo -e "no map save to remove" - fn_sleep_time - fn_script_log_pass "No map save to remove." - fi - # Wipe user dir, might be a legacy thing, maybe to be removed. - if [ -d "${serveridentitydir}/user" ]; then - echo -en "removing user directory..." - fn_sleep_time - fn_script_log_info "removing user directory: ${serveridentitydir}/user" - rm -rf "${serveridentitydir:?}/user" - fn_wipe_exit_code - fn_sleep_time - # We do not print additional information if there is nothing to remove since this might be obsolete. - fi - # Wipe storage dir, might be a legacy thing, maybe to be removed. - if [ -d "${serveridentitydir}/storage" ]; then - echo -en "removing storage directory..." - fn_sleep_time - fn_script_log_info "removing storage directory: ${serveridentitydir}/storage" - rm -rf "${serveridentitydir:?}/storage" - fn_wipe_exit_code - fn_sleep_time - # We do not print additional information if there is nothing to remove since this might be obsolete. - fi - # Wipe sv.files. - if [ -n "$(find "${serveridentitydir}" -type f -name "sv.files.*.db")" ]; then - echo -en "removing server misc srv.files*.db file(s)..." - fn_sleep_time - fn_script_log_info "Removing server misc files: ${serveridentitydir}/sv.files.*.db" - find "${serveridentitydir:?}" -type f -name "sv.files.*.db" -delete | tee -a "${lgsmlog}" - fn_wipe_exit_code - fn_sleep_time - # No further information if not found because it should I could not get this file showing up. - fi - # Wipe player death files. - if [ -n "$(find "${serveridentitydir}" -type f -name "player.deaths.*.db")" ]; then - echo -en "removing player deaths player.deaths.*.db file(s)..." - fn_sleep_time - fn_script_log_info "Removing player death files: ${serveridentitydir}/player.deaths.*.db" - find "${serveridentitydir:?}" -type f -name "player.deaths.*.db" -delete | tee -a "${lgsmlog}" - fn_wipe_exit_code - fn_sleep_time - else - echo -e "no player death to remove" - fn_sleep_time - fn_script_log_pass "No player death to remove" - fi - # Wipe player states files - if [ -n "$(find "${serveridentitydir}" -type f -name "player.states.*.db")" ]; then - echo -en "removing player states player.states.*.db file(s)..." - fn_sleep_time - fn_script_log_info "Removing player states: ${serveridentitydir}/player.states.*.db" - find "${serveridentitydir:?}" -type f -name "player.states.*.db" -delete | tee -a "${lgsmlog}" - fn_wipe_exit_code - fn_sleep_time - else - echo -e "no player states to remove" - fn_sleep_time - fn_script_log_pass "No player states to remove" - fi - # Wipe blueprints only if full-wipe command was used. - if [ "${fullwipe}" == "1" ]; then - if [ -n "$(find "${serveridentitydir}" -type f -name "player.blueprints.*.db")" ]; then - echo -en "removing blueprints player.blueprints.*.db file(s)..." +fn_wipe_files(){ + fn_print_start_nl "${wipetype}" + fn_script_log_info "${wipetype}" + + # Remove Map files + if [ -n "${serverwipe}" ]||[ -n "${mapwipe}" ]; then + if [ -n "$(find "${serveridentitydir}" -type f -name "*.map")" ]; then + echo -en "removing .map file(s)..." + fn_script_log_info "removing *.map file(s)" fn_sleep_time - fn_script_log_info "Removing blueprint file(s): ${serveridentitydir}/player.blueprints.*.db" - find "${serveridentitydir:?}" -type f -name "player.blueprints.*.db" -delete | tee -a "${lgsmlog}" + find "${serveridentitydir:?}" -type f -name "*.map" -printf "%f\n" >> "${lgsmlog}" + find "${serveridentitydir:?}" -type f -name "*.map" -delete | tee -a "${lgsmlog}" fn_wipe_exit_code + else + echo -e "no .map file(s) to remove" fn_sleep_time + fn_script_log_pass "no .map file(s) to remove" + fi + fi + # Remove Save files. + if [ -n "${serverwipe}" ]||[ -n "${mapwipe}" ]; then + if [ -n "$(find "${serveridentitydir}" -type f -name "*.sav*")" ]; then + echo -en "removing .sav file(s)..." + fn_script_log_info "removing .sav file(s)" + fn_sleep_time + find "${serveridentitydir:?}" -type f -name "*.sav*" -printf "%f\n" >> "${lgsmlog}" + find "${serveridentitydir:?}" -type f -name "*.sav*" -delete + fn_wipe_exit_code else - echo -e "no blueprint file to remove" + echo -e "no .sav file(s) to remove" + fn_script_log_pass "no .sav file(s) to remove" fn_sleep_time - fn_script_log_pass "No blueprint file to remove" fi - elif [ -n "$(find "${serveridentitydir}" -type f -name "player.blueprints.*.db")" ]; then - echo -e "keeping blueprints" - fn_sleep_time - fn_script_log_info "Keeping blueprints" - else - echo -e "no blueprints found" - fn_sleep_time - fn_script_log_pass "No blueprints found" fi - # Wipe some logs that might be there. - if [ -n "$(find "${serveridentitydir}" -type f -name "Log.*.txt")" ]; then - echo -en "removing log files..." - fn_sleep_time - fn_script_log_info "Removing log files: ${serveridentitydir}/Log.*.txt" - find "${serveridentitydir:?}" -type f -name "Log.*.txt" -delete - fn_wipe_exit_code - fn_sleep_time - # We do not print additional information if there are no logs to remove. + # Remove db files for full wipe. + # Excluding player.tokens.db for Rust+. + if [ -n "${serverwipe}" ]; then + if [ -n "$(find "${serveridentitydir}" -type f ! -name 'player.tokens.db' -name "*.db")" ]; then + echo -en "removing .db file(s)..." + fn_script_log_info "removing .db file(s)" + fn_sleep_time + find "${serveridentitydir:?}" -type f ! -name 'player.tokens.db' -name "*.db" -printf "%f\n" >> "${lgsmlog}" + find "${serveridentitydir:?}" -type f ! -name 'player.tokens.db' -name "*.db" -delete + fn_wipe_exit_code + else + echo -e "no .db file(s) to remove" + fn_sleep_time + fn_script_log_pass "no .db file(s) to remove" + fi fi } -fn_stop_warning(){ - fn_print_warn "this game server will be stopped during wipe" - fn_script_log_warn "this game server will be stopped during wipe" +fn_map_wipe_warning(){ + fn_print_warn "Map wipe will reset the map data and keep blueprint data" + fn_script_log_warn "Map wipe will reset the map data and keep blueprint data" totalseconds=3 for seconds in {3..1}; do - fn_print_warn "this game server will be stopped during wipe: ${totalseconds}" + fn_print_warn "Map wipe will reset the map data and keep blueprint data: ${totalseconds}" totalseconds=$((totalseconds - 1)) sleep 1 if [ "${seconds}" == "0" ]; then break fi done - fn_print_warn_nl "this game server will be stopped during wipe" + fn_print_warn_nl "Map wipe will reset the map data and keep blueprint data" } -fn_wipe_warning(){ - fn_print_warn "wipe is about to start" - fn_script_log_warn "wipe is about to start" +fn_full_wipe_warning(){ + fn_print_warn "Server wipe will reset the map data and remove blueprint data" + fn_script_log_warn "Server wipe will reset the map data and remove blueprint data" totalseconds=3 for seconds in {3..1}; do - fn_print_warn "wipe is about to start: ${totalseconds}" + fn_print_warn "Server wipe will reset the map data and remove blueprint data: ${totalseconds}" totalseconds=$((totalseconds - 1)) sleep 1 if [ "${seconds}" == "0" ]; then break fi done - fn_print_warn "wipe is about to start" + fn_print_warn_nl "Server wipe will reset the map data and remove blueprint data" +} + +# Will change the seed if the seed is not defined by the user. +fn_wipe_random_seed(){ + if [ -f "${datadir}/${selfname}-seed.txt" ]&&[ -n "${randomseed}" ]; then + shuf -i 1-2147483647 -n 1 > "${datadir}/${selfname}-seed.txt" + seed=$(cat "${datadir}/${selfname}-seed.txt") + randomseed=1 + echo -en "generating new random seed (${cyan}${seed}${default})..." + fn_script_log_pass "generating new random seed (${cyan}${seed}${default})" + fn_sleep_time + fn_print_ok_eol_nl + fi +} + +# A summary of what wipe is going to do. +fn_wipe_details(){ + fn_print_information_nl "Wipe does not remove Rust+ data." + echo -en "* Wipe map data: " + if [ -n "${serverwipe}" ]||[ -n "${mapwipe}" ]; then + fn_print_yes_eol_nl + else + fn_print_no_eol_nl + fi + + echo -en "* Wipe blueprint data: " + if [ -n "${serverwipe}" ]; then + fn_print_yes_eol_nl + else + fn_print_no_eol_nl + fi + + echo -en "* Change Procedural Map seed: " + if [ -n "${randomseed}" ]; then + fn_print_yes_eol_nl + else + fn_print_no_eol_nl + fi } fn_print_dots "" check.sh +fix_rust.sh # Check if there is something to wipe. -if [ -d "${serveridentitydir}/storage" ]||[ -d "${serveridentitydir}/user" ]||[ -n "$(find "${serveridentitydir}" -type f -name "proceduralmap*.sav")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "barren*.sav")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "Log.*.txt")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "player.deaths.*.db")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "player.blueprints.*.db")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "sv.files.*.db")" ]; then - fn_wipe_warning +if [ -n "$(find "${serveridentitydir}" -type f -name "*.map")" ]||[ -n "$(find "${serveridentitydir}" -type f -name "*.sav*")" ]&&[ -n "$(find "${serveridentitydir}" -type f ! -name 'player.tokens.db' -name "*.db")" ]; then + if [ -n "${serverwipe}" ]; then + wipetype="Full wipe" + fn_full_wipe_warning + fn_wipe_details + elif [ -n "${mapwipe}" ]; then + wipetype="Map wipe" + fn_map_wipe_warning + fn_wipe_details + fi check_status.sh if [ "${status}" != "0" ]; then - fn_stop_warning + fn_print_restart_warning exitbypass=1 command_stop.sh fn_firstcommand_reset - fn_wipe_server_files + fn_wipe_files + fn_wipe_random_seed + fn_print_complete_nl "${wipetype}" + fn_script_log_pass "${wipetype}" exitbypass=1 command_start.sh fn_firstcommand_reset else - fn_wipe_server_files + fn_wipe_files + fn_wipe_random_seed + fn_print_complete_nl "${wipetype}" + fn_script_log_pass "${wipetype}" fi - fn_print_complete_nl "Wiping ${selfname}" - fn_script_log_pass "Wiping ${selfname}" else fn_print_ok_nl "Wipe not required" fn_script_log_pass "Wipe not required" diff --git a/lgsm/functions/compress_unreal2_maps.sh b/lgsm/functions/compress_unreal2_maps.sh index 7169c9612..0c32d3c77 100755 --- a/lgsm/functions/compress_unreal2_maps.sh +++ b/lgsm/functions/compress_unreal2_maps.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM compress_unreal2_maps.sh function +# LinuxGSM compress_unreal2_maps.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Compresses unreal maps. diff --git a/lgsm/functions/compress_ut99_maps.sh b/lgsm/functions/compress_ut99_maps.sh index 3239837a0..9aa074ba9 100755 --- a/lgsm/functions/compress_ut99_maps.sh +++ b/lgsm/functions/compress_ut99_maps.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM compress_ut99_maps.sh function +# LinuxGSM compress_ut99_maps.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Compresses unreal maps. diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 03ff54383..2c8c269bf 100755 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM core_dl.sh function +# LinuxGSM core_dl.sh module # Author: Daniel Gibbs -# Contributor: UltimateByte +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Deals with all downloads for LinuxGSM. @@ -11,10 +11,10 @@ # chmodx: Optional, set to "chmodx" to make file executable using chmod +x # run: Optional, set run to execute the file after download # forcedl: Optional, force re-download of file even if exists -# md5: Optional, set an md5 sum and will compare it against the file. +# hash: Optional, set an hash sum and will compare it against the file. # # Downloads can be defined in code like so: -# fn_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" +# fn_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}" # fn_fetch_file "http://example.com/file.tar.bz2" "/some/dir" "file.tar.bz2" "chmodx" "run" "forcedl" "10cd7353aa9d758a075c600a6dd193fd" functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" @@ -67,7 +67,7 @@ fn_dl_steamcmd(){ ${unbuffer} ${steamcmdcommand} +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" fi # Force Windows Platform type. - elif [ "${shortname}" == "ac" ]||[ "${shortname}" == "jk2" ]; then + elif [ "${steamcmdforcewindows}" == "yes" ]; then if [ -n "${branch}" ]&&[ -n "${betapassword}" ]; then ${unbuffer} ${steamcmdcommand} +@sSteamCmdForcePlatformType windows +login "${steamuser}" "${steampass}" +force_install_dir "${serverfiles}" +app_update "${appid}" -beta "${branch}" -betapassword "${betapassword}" ${validate} +quit | uniq | tee -a "${lgsmlog}" "${steamcmdlog}" elif [ -n "${branch}" ]; then @@ -87,8 +87,9 @@ fn_dl_steamcmd(){ fi # Error checking for SteamCMD. Some errors will loop to try again and some will just exit. + # Check also if we have more errors than retries to be sure that we do not loop to many times and error out. exitcode=$? - if [ -n "$(grep "Error!" "${steamcmdlog}" | tail -1)" ]||[ -n "$(grep "ERROR!" "${steamcmdlog}" | tail -1)" ]; then + if [ -n "$(grep -i "Error!" "${steamcmdlog}" | tail -1)" ]&&[ "$(grep -ic "Error!" "${steamcmdlog}")" -ge "${counter}" ] ; then # Not enough space. if [ -n "$(grep "0x202" "${steamcmdlog}" | tail -1)" ]; then fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Not enough space to download server files" @@ -149,25 +150,46 @@ fn_clear_tmp(){ fi } -fn_dl_md5(){ - # Runs MD5 Check if available. - if [ "${md5}" != "0" ]&&[ "${md5}" != "nomd5" ]; then - echo -en "verifying ${local_filename} with MD5..." +fn_dl_hash(){ + # Runs Hash Check if available. + if [ "${hash}" != "0" ]&&[ "${hash}" != "nohash" ]&&[ "${hash}" != "nomd5" ]; then + # MD5 + if [ "${#hash}" == "32" ]; then + hashbin="md5sum" + hashtype="MD5" + # SHA1 + elif [ "${#hash}" == "40" ]; then + hashbin="sha1sum" + hashtype="SHA1" + # SHA256 + elif [ "${#hash}" == "64" ]; then + hashbin="sha256sum" + hashtype="SHA256" + # SHA512 + elif [ "${#hash}" == "128" ]; then + hashbin="sha512sum" + hashtype="SHA512" + else + fn_script_log_error "hash lengh not known for hash type" + fn_print_error_nl "hash lengh not known for hash type" + core_exit.sh + fi + echo -en "verifying ${local_filename} with ${hashtype}..." fn_sleep_time - md5sumcmd=$(md5sum "${local_filedir}/${local_filename}"|awk '{print $1;}') - if [ "${md5sumcmd}" != "${md5}" ]; then + hashsumcmd=$(${hashbin} "${local_filedir}/${local_filename}" | awk '{print $1}') + if [ "${hashsumcmd}" != "${hash}" ]; then fn_print_fail_eol_nl - echo -e "${local_filename} returned MD5 checksum: ${md5sumcmd}" - echo -e "expected MD5 checksum: ${md5}" - fn_script_log_fatal "Verifying ${local_filename} with MD5" - fn_script_log_info "${local_filename} returned MD5 checksum: ${md5sumcmd}" - fn_script_log_info "Expected MD5 checksum: ${md5}" + echo -e "${local_filename} returned ${hashtype} checksum: ${hashsumcmd}" + echo -e "expected ${hashtype} checksum: ${hash}" + fn_script_log_fatal "Verifying ${local_filename} with ${hashtype}" + fn_script_log_info "${local_filename} returned ${hashtype} checksum: ${hashsumcmd}" + fn_script_log_info "Expected ${hashtype} checksum: ${hash}" core_exit.sh else fn_print_ok_eol_nl - fn_script_log_pass "Verifying ${local_filename} with MD5" - fn_script_log_info "${local_filename} returned MD5 checksum: ${md5sumcmd}" - fn_script_log_info "Expected MD5 checksum: ${md5}" + fn_script_log_pass "Verifying ${local_filename} with ${hashtype}" + fn_script_log_info "${local_filename} returned ${hashtype} checksum: ${hashsumcmd}" + fn_script_log_info "Expected ${hashtype} checksum: ${hash}" fi fi } @@ -234,7 +256,7 @@ fn_fetch_file(){ chmodx="${7:-0}" run="${8:-0}" forcedl="${9:-0}" - md5="${10:-0}" + hash="${10:-0}" # Download file if missing or download forced. if [ ! -f "${local_filedir}/${local_filename}" ]||[ "${forcedl}" == "forcedl" ]; then @@ -321,7 +343,7 @@ fn_fetch_file(){ fi if [ -f "${local_filedir}/${local_filename}" ]; then - fn_dl_md5 + fn_dl_hash # Execute file if run is set. if [ "${run}" == "run" ]; then # shellcheck source=/dev/null @@ -343,7 +365,7 @@ fn_fetch_file(){ # chmodx: Optional, set to "chmodx" to make file executable using chmod +x # run: Optional, set run to execute the file after download # forcedl: Optional, force re-download of file even if exists -# md5: Optional, set an md5 sum and will compare it against the file. +# hash: Optional, set an hash sum and will compare it against the file. # Fetches files from the Git repo. fn_fetch_file_github(){ @@ -368,9 +390,9 @@ fn_fetch_file_github(){ chmodx="${4:-0}" run="${5:-0}" forcedl="${6:-0}" - md5="${7:-0}" + hash="${7:-0}" # Passes vars to the file download function. - fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" + fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}" } # Fetches config files from the Git repo. @@ -392,9 +414,9 @@ fn_fetch_config(){ chmodx="nochmodx" run="norun" forcedl="noforce" - md5="nomd5" + hash="nohash" # Passes vars to the file download function. - fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" + fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}" } # Fetches modules from the Git repo during first download. @@ -416,9 +438,9 @@ fn_fetch_function(){ chmodx="chmodx" run="run" forcedl="noforce" - md5="nomd5" + hash="nohash" # Passes vars to the file download function. - fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" + fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}" } # Fetches modules from the Git repo during update-lgsm. @@ -440,10 +462,50 @@ fn_update_function(){ chmodx="chmodx" run="norun" forcedl="noforce" - md5="nomd5" + hash="nohash" # Passes vars to the file download function. - fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" + fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}" + +} + +# Function to download latest github release. +# $1 GitHub user / organisation. +# $2 Repo name. +# $3 Destination for download. +# $4 Search string in releases (needed if there are more files that can be downloaded from the release pages). +fn_dl_latest_release_github(){ + local githubreleaseuser="${1}" + local githubreleaserepo="${2}" + local githubreleasedownloadpath="${3}" + local githubreleasesearch="${4}" + local githublatestreleaseurl="https://api.github.com/repos/${githubreleaseuser}/${githubreleaserepo}/releases/latest" + + # Get last github release. + # If no search for the release filename is set, just get the first file from the latest release. + if [ -z "${githubreleasesearch}" ]; then + githubreleaseassets=$(curl -s "${githublatestreleaseurl}" | jq '[ .assets[] ]') + else + githubreleaseassets=$(curl -s "${githublatestreleaseurl}" | jq "[ .assets[]|select(.browser_download_url | contains(\"${githubreleasesearch}\")) ]") + fi + + # Check how many releases we got from the api and exit if we have more then one. + if [ "$(echo -e "${githubreleaseassets}" | jq '. | length')" -gt 1 ]; then + fn_print_fatal_nl "Found more than one release to download - Please report this to the LinuxGSM issue tracker" + fn_script_log_fatal "Found more than one release to download - Please report this to the LinuxGSM issue tracker" + else + # Set variables for download via fn_fetch_file. + githubreleasefilename=$(echo -e "${githubreleaseassets}" | jq -r '.[]name') + githubreleasedownloadlink=$(echo -e "${githubreleaseassets}" | jq -r '.[]browser_download_url') + # Error if no version is there. + if [ -z "${githubreleasefilename}" ]; then + fn_print_fail_nl "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" + fn_script_log_fatal "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" + else + # Fetch file from the remote location from the existing function to the ${tmpdir} for now. + fn_fetch_file "${githubreleasedownloadlink}" "" "${githubreleasefilename}" "" "${githubreleasedownloadpath}" "${githubreleasefilename}" + fi + fi } # Check that curl is installed diff --git a/lgsm/functions/core_exit.sh b/lgsm/functions/core_exit.sh index e2b439abd..34379a486 100755 --- a/lgsm/functions/core_exit.sh +++ b/lgsm/functions/core_exit.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM core_exit.sh function +# LinuxGSM core_exit.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles exiting of LinuxGSM by running and reporting an exit code. diff --git a/lgsm/functions/core_functions.sh b/lgsm/functions/core_functions.sh index b02084256..6d9f4303d 100755 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -1,40 +1,41 @@ #!/bin/bash -# LinuxGSM core_functions.sh function +# LinuxGSM core_functions.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Defines all functions to allow download and execution of functions using fn_fetch_function. # This function is called first before any other function. Without this file other functions will not load. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -modulesversion="v20.6.1" +modulesversion="v21.2.5" # Core core_dl.sh(){ functionfile="${FUNCNAME[0]}" if [ "$(type fn_fetch_core_dl 2>/dev/null)" ]; then - fn_fetch_core_dl "lgsm/functions" "core_dl.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" + fn_fetch_core_dl "lgsm/functions" "core_dl.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" else - fn_bootstrap_fetch_file_github "lgsm/functions" "core_dl.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" + fn_bootstrap_fetch_file_github "lgsm/functions" "core_dl.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" fi } core_messages.sh(){ functionfile="${FUNCNAME[0]}" if [ "$(type fn_fetch_core_dl 2>/dev/null)" ]; then - fn_fetch_core_dl "lgsm/functions" "core_messages.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" + fn_fetch_core_dl "lgsm/functions" "core_messages.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" else - fn_bootstrap_fetch_file_github "lgsm/functions" "core_messages.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" + fn_bootstrap_fetch_file_github "lgsm/functions" "core_messages.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" fi } core_legacy.sh(){ functionfile="${FUNCNAME[0]}" if [ "$(type fn_fetch_core_dl 2>/dev/null)" ]; then - fn_fetch_core_dl "lgsm/functions" "core_legacy.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" + fn_fetch_core_dl "lgsm/functions" "core_legacy.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" else - fn_bootstrap_fetch_file_github "lgsm/functions" "core_legacy.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" + fn_bootstrap_fetch_file_github "lgsm/functions" "core_legacy.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" fi } @@ -53,6 +54,16 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } +core_steamcmd.sh(){ +functionfile="${FUNCNAME[0]}" +fn_fetch_function +} + +core_github.sh(){ +functionfile="${FUNCNAME[0]}" +fn_fetch_function +} + # Commands command_backup.sh(){ @@ -155,11 +166,21 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } +command_skeleton.sh(){ +functionfile="${FUNCNAME[0]}" +fn_fetch_function +} + command_wipe.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function } +command_send.sh(){ +functionfile="${FUNCNAME[0]}" +fn_fetch_function +} + # Checks check.sh(){ @@ -470,6 +491,11 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } +fix_vh.sh(){ +functionfile="${FUNCNAME[0]}" +fn_fetch_function +} + fix_wurm.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function @@ -594,6 +620,11 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } +command_check_update.sh(){ +functionfile="${FUNCNAME[0]}" +fn_fetch_function +} + update_ts3.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function @@ -609,6 +640,11 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } +update_papermc.sh(){ +functionfile="${FUNCNAME[0]}" +fn_fetch_function +} + update_mumble.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function @@ -634,6 +670,11 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } +update_vintagestory.sh(){ +functionfile="${FUNCNAME[0]}" +fn_fetch_function +} + fn_update_functions.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function diff --git a/lgsm/functions/core_getopt.sh b/lgsm/functions/core_getopt.sh index e20b32b57..ea3c84f6d 100755 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM core_getopt.sh function +# LinuxGSM core_getopt.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: getopt arguments. @@ -20,12 +21,15 @@ cmd_backup=( "b;backup" "command_backup.sh" "Create backup archives of the serve cmd_update_linuxgsm=( "ul;update-lgsm;uf;update-functions" "command_update_linuxgsm.sh" "Check and apply any LinuxGSM updates." ) cmd_test_alert=( "ta;test-alert" "command_test_alert.sh" "Send a test alert." ) cmd_monitor=( "m;monitor" "command_monitor.sh" "Check server status and restart if crashed." ) +cmd_skeleton=( "sk;skeleton" "command_skeleton.sh" "Create a skeleton directory." ) cmd_donate=( "do;donate" "command_donate.sh" "Donation options." ) +cmd_send=( "sd;send" "command_send.sh" "Send command to game server console." ) # Console servers only. cmd_console=( "c;console" "command_console.sh" "Access server console." ) cmd_debug=( "d;debug" "command_debug.sh" "Start server directly in your terminal." ) # Update servers only. cmd_update=( "u;update" "command_update.sh" "Check and apply any server updates." ) +cmd_check_update=( "cu;check-update" "command_check_update.sh" "Check if a gameserver update is available" ) cmd_force_update=( "fu;force-update;update-restart;ur" "forceupdate=1; command_update.sh" "Apply server updates bypassing check." ) # SteamCMD servers only. cmd_validate=( "v;validate" "command_validate.sh" "Validate server files with SteamCMD." ) @@ -36,8 +40,8 @@ cmd_mods_update=( "mu;mods-update" "command_mods_update.sh" "Update installed mo # Server specific. cmd_change_password=( "pw;change-password" "command_ts3_server_pass.sh" "Change TS3 serveradmin password." ) cmd_install_default_resources=( "ir;install-default-resources" "command_install_resources_mta.sh" "Install the MTA default resources." ) -cmd_wipe=( "w;wipe;wi" "command_wipe.sh" "Map assets are wiped and blueprints are kept." ) -cmd_full_wipe=( "fw;full-wipe;wa;wipeall" "fullwipe=1; command_wipe.sh" "Map assets and blueprints are wiped." ) +cmd_fullwipe=( "fw;full-wipe;wa;wipeall" "serverwipe=1; command_wipe.sh" "Reset the map and remove blueprint data." ) +cmd_mapwipe=( "mw;map-wipe;w;wipe;wi" "mapwipe=1; command_wipe.sh" "Reset the map and keep blueprint data." ) cmd_map_compressor_u99=( "mc;map-compressor" "compress_ut99_maps.sh" "Compresses all ${gamename} server maps." ) cmd_map_compressor_u2=( "mc;map-compressor" "compress_unreal2_maps.sh" "Compresses all ${gamename} server maps." ) cmd_install_cdkey=( "cd;server-cd-key" "install_ut2k4_key.sh" "Add your server cd key." ) @@ -55,9 +59,9 @@ cmd_dev_clear_functions=( "cf;clear-functions" "command_dev_clear_functions.sh" ### Set specific opt here. -currentopt=( "${cmd_start[@]}" "${cmd_stop[@]}" "${cmd_restart[@]}" "${cmd_monitor[@]}" "${cmd_test_alert[@]}" "${cmd_details[@]}" "${cmd_postdetails[@]}" ) +currentopt=( "${cmd_start[@]}" "${cmd_stop[@]}" "${cmd_restart[@]}" "${cmd_monitor[@]}" "${cmd_test_alert[@]}" "${cmd_details[@]}" "${cmd_postdetails[@]}" "${cmd_skeleton[@]}" ) -# Update LGSM. +# Update LinuxGSM. currentopt+=( "${cmd_update_linuxgsm[@]}" ) # Exclude noupdate games here. @@ -71,17 +75,22 @@ if [ "${shortname}" == "jk2" ]||[ "${engine}" != "idtech3" ];then fi fi -# Validate command. +# Validate and check-update command. if [ "${appid}" ]; then - currentopt+=( "${cmd_validate[@]}" ) + currentopt+=( "${cmd_validate[@]}" "${cmd_check_update[@]}" ) fi # Backup. currentopt+=( "${cmd_backup[@]}" ) -# Console & Debug +# Console & Debug. currentopt+=( "${cmd_console[@]}" "${cmd_debug[@]}" ) +# Console send. +if [ "${consoleinteract}" == "yes" ]; then + currentopt+=( "${cmd_send[@]}" ) +fi + ## Game server exclusive commands. # FastDL command. @@ -96,7 +105,7 @@ fi # Unreal exclusive. if [ "${shortname}" == "rust" ]; then - currentopt+=( "${cmd_wipe[@]}" "${cmd_full_wipe[@]}" ) + currentopt+=( "${cmd_fullwipe[@]}" "${cmd_mapwipe[@]}" ) fi if [ "${engine}" == "unreal2" ]; then if [ "${shortname}" == "ut2k4" ]; then diff --git a/lgsm/functions/core_github.sh b/lgsm/functions/core_github.sh new file mode 100644 index 000000000..5bd4bd730 --- /dev/null +++ b/lgsm/functions/core_github.sh @@ -0,0 +1,114 @@ +#!/bin/bash +# LinuxGSM core_github.sh function +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: core function file for updates via github + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +github_api="https://api.github.com" + +fn_githublocalversionfile(){ + local githubreleaseuser="${1}" + local githubreleaserepo="${2}" + + githublocalversionfile="${datadir}/github-${githubreleaseuser}-${githubreleaserepo}-version" +} + +# $1 githubuser/group +# $2 github repo name +fn_github_get_latest_release_version(){ + local githubreleaseuser="${1}" + local githubreleaserepo="${2}" + local githublatestreleaseurl="${github_api}/repos/${githubreleaseuser}/${githubreleaserepo}/releases/latest" + + githubreleaseversion=$(curl -s --connect-timeout 10 "${githublatestreleaseurl}" | jq '.tag_name' ) + + # error if no version is there + if [ -z "${githubreleaseversion}" ]; then + fn_print_fail_nl "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" + fn_script_log_fatal "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" + fi +} + +# $1 githubuser/group +# $2 github repo name +fn_github_set_latest_release_version(){ + local githubreleaseuser="${1}" + local githubreleaserepo="${2}" + + fn_githublocalversionfile "${githubreleaseuser}" "${githubreleaserepo}" + + local githublatestreleaseurl="${github_api}/repos/${githubreleaseuser}/${githubreleaserepo}/releases/latest" + githubreleaseversion=$(curl -s "${githublatestreleaseurl}" | jq -r '.tag_name' ) + + # error if no version is there + if [ -z "${githubreleaseversion}" ]; then + fn_print_fail_nl "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" + fn_script_log_fatal "Cannot get version from GitHub API for ${githubreleaseuser}/${githubreleaserepo}" + else + echo "${githubreleaseversion}" > "${githublocalversionfile}" + fi +} + +# $1 githubuser/group +# $2 github repo name +fn_github_get_installed_version(){ + local githubreleaseuser="${1}" + local githubreleaserepo="${2}" + + fn_githublocalversionfile "${githubreleaseuser}" "${githubreleaserepo}" + + githublocalversion=$(cat "${githublocalversionfile}") +} + +# $1 githubuser/group +# $2 github repo name +# if a update needs to be downloaded - updateneeded is set to 1 +fn_github_compare_version(){ + local githubreleaseuser="${1}" + local githubreleaserepo="${2}" + exitcode=0 + updateneeded=0 + + fn_githublocalversionfile "${githubreleaseuser}" "${githubreleaserepo}" + local githublatestreleaseurl="${github_api}/repos/${githubreleaseuser}/${githubreleaserepo}/releases/latest" + + githublocalversion=$(cat "${githublocalversionfile}") + githubreleaseversion=$(curl -s "${githublatestreleaseurl}" | jq '.tag_name' ) + + # error if no version is there + if [ -z "${githubreleaseversion}" ]; then + fn_print_fail_nl "Can not get version from Github Api for ${githubreleaseuser}/${githubreleaserepo}" + fn_script_log_fatal "Can not get version from Github Api for ${githubreleaseuser}/${githubreleaserepo}" + else + if [ "${githublocalversion}" == "${githubreleaseversion}" ]; then + echo -en "\n" + echo -e "No update from github.com/${githubreleaseuser}/${githubreleaserepo}/ available:" + echo -e "* Local build: ${red}${githublocalversion}${default}" + echo -e "* Remote build: ${green}${githubreleaseversion}${default}" + echo -en "\n" + else + # check if version that is installed is higher than the remote version to not override it + last_version=$(echo -e "${githublocalversion}\n${githubreleaseversion}" | sort -V | head -n1 ) + if [ "${githubreleaseversion}" == "${last_version}" ]; then + echo -en "\n" + echo -e "Update from github.com/${githubreleaseuser}/${githubreleaserepo}/ available:" + echo -e "* Local build: ${red}${githublocalversion}${default}" + echo -e "* Remote build: ${green}${githubreleaseversion}${default}" + echo -en "\n" + updateneeded=1 + else + # local version is higher than the remote version output this to the user + # strange case but could be possible, as a release could be removed from github + echo -en "\n" + echo -e "Local version is newer than the remote version" + echo -e "* Local version: ${green}${githublocalversion}${default}" + echo -e "* Remote version: ${green}${githubreleaseversion}${default}" + echo -en "\n" + exitcode=1 + fi + fi + fi +} diff --git a/lgsm/functions/core_legacy.sh b/lgsm/functions/core_legacy.sh index 9c95adcaf..811acfbba 100755 --- a/lgsm/functions/core_legacy.sh +++ b/lgsm/functions/core_legacy.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM core_legacy.sh function +# LinuxGSM core_legacy.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Code for backwards compatability with older versions of LinuxGSM. @@ -76,3 +77,8 @@ if [ -z "${wsstartmap}" ]; then wscollectionid="${ws_start_map}" fi fi + +fn_parms(){ + fn_reload_startparameters + parms="${startparameters}" +} diff --git a/lgsm/functions/core_logs.sh b/lgsm/functions/core_logs.sh index 00c4d0662..b999cb347 100755 --- a/lgsm/functions/core_logs.sh +++ b/lgsm/functions/core_logs.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM core_logs.sh function +# LinuxGSM core_logs.sh module # Author: Daniel Gibbs -# Contributor: UltimateByte +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Acts as a log rotator, removing old logs. diff --git a/lgsm/functions/core_messages.sh b/lgsm/functions/core_messages.sh index c467c2a4d..463f833c2 100755 --- a/lgsm/functions/core_messages.sh +++ b/lgsm/functions/core_messages.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM core_messages.sh function +# LinuxGSM core_messages.sh module # Author: Daniel Gibbs -# Contributor: s-eam +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Defines on-screen messages such as [ OK ] and how script logs look. @@ -116,7 +116,7 @@ fn_script_log_info(){ fi } -## Feb 28 14:56:58 ut99-server: Monitor: INFO: +## Feb 28 14:56:58 ut99-server: Monitor: UPDATE: fn_script_log_update(){ if [ -d "${lgsmlogdir}" ]; then if [ -n "${commandname}" ]; then @@ -359,9 +359,44 @@ fn_prompt_yn(){ done } +# Prompt for message +fn_prompt_message(){ + while true; do + unset prompt + local prompt="$1" + read -e -p "${prompt}" -r answer + if fn_prompt_yn "Continue" Y; then + break; + fi + done + echo "${answer}" +} + # On-Screen End of Line ################################## +# YES +fn_print_yes_eol(){ + echo -en "${cyan}YES${default}" + fn_sleep_time +} + +fn_print_yes_eol_nl(){ + echo -e "${cyan}YES${default}" + fn_sleep_time +} + +# NO +fn_print_no_eol(){ + echo -en "${red}NO${default}" + fn_sleep_time +} + +fn_print_no_eol_nl(){ + echo -e "${red}NO${default}" + fn_sleep_time +} + # OK fn_print_ok_eol(){ echo -en "${green}OK${default}" diff --git a/lgsm/functions/core_steamcmd.sh b/lgsm/functions/core_steamcmd.sh new file mode 100755 index 000000000..5fbd5db9f --- /dev/null +++ b/lgsm/functions/core_steamcmd.sh @@ -0,0 +1,330 @@ +#!/bin/bash +# LinuxGSM core_steamcmd.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Core functions for SteamCMD + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_install_steamcmd(){ + if [ "${shortname}" == "ark" ]&&[ "${installsteamcmd}" == "1" ]; then + steamcmddir="${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux" + fi + if [ ! -d "${steamcmddir}" ]; then + mkdir -p "${steamcmddir}" + fi + fn_fetch_file "http://media.steampowered.com/client/steamcmd_linux.tar.gz" "" "" "" "${tmpdir}" "steamcmd_linux.tar.gz" "" "norun" "noforce" "nohash" + fn_dl_extract "${tmpdir}" "steamcmd_linux.tar.gz" "${steamcmddir}" + chmod +x "${steamcmddir}/steamcmd.sh" +} + +fn_check_steamcmd_user(){ + # Checks if steamuser is setup. + if [ "${steamuser}" == "username" ]; then + fn_print_fail_nl "Steam login not set. Update steamuser in ${configdirserver}" + echo -e " * Change steamuser=\"username\" to a valid steam login." + if [ -d "${lgsmlogdir}" ]; then + fn_script_log_fatal "Steam login not set. Update steamuser in ${configdirserver}" + fi + core_exit.sh + fi + # Anonymous user is set if steamuser is missing. + if [ -z "${steamuser}" ]; then + if [ -d "${lgsmlogdir}" ]; then + fn_script_log_info "Using anonymous Steam login" + fi + steamuser="anonymous" + steampass='' + fi +} + +fn_check_steamcmd(){ + # Checks if SteamCMD exists when starting or updating a server. + # Only install if steamcmd package is missing or steamcmd dir is missing. + if [ ! -f "${steamcmddir}/steamcmd.sh" ]&&[ -z "$(command -v steamcmd 2>/dev/null)" ]; then + if [ "${commandname}" == "INSTALL" ]; then + fn_install_steamcmd + else + fn_print_warn_nl "SteamCMD is missing" + fn_script_log_warn "SteamCMD is missing" + fn_install_steamcmd + fi + elif [ "${commandname}" == "INSTALL" ]; then + fn_print_information "SteamCMD is already installed..." + fn_print_ok_eol_nl + fi +} + +fn_check_steamcmd_dir(){ + # Worksround that pre-installs the correct steam directories to ensure all packages use the correct Standard. + # https://github.com/ValveSoftware/steam-for-linux/issues/6976#issuecomment-610446347 + + # Create Steam installation directory. + if [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then + mkdir -p "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" + fi + + # Create common Steam directory. + if [ ! -d "${HOME}/.steam" ]; then + mkdir -p "${HOME}/.steam" + fi + + # Symbolic links to Steam installation directory. + if [ ! -L "${HOME}/.steam/root" ]; then + if [ -d "${HOME}/.steam/root" ]; then + rm "${HOME}/.steam/root" + fi + ln -s "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" "${HOME}/.steam/root" + fi + + if [ ! -L "${HOME}/.steam/steam" ]; then + if [ -d "${HOME}/.steam/steam" ]; then + rm -rf "${HOME}/.steam/steam" + fi + ln -s "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" "${HOME}/.steam/steam" + fi +} + +fn_check_steamcmd_dir_legacy(){ + # Remove old Steam installation directories ~/Steam and ${rootdir}/steamcmd + if [ -d "${rootdir}/steamcmd" ]&&[ "${steamcmddir}" == "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then + rm -rf "${rootdir:?}/steamcmd" + fi + + if [ -d "${HOME}/Steam" ]&&[ "${steamcmddir}" == "${XDG_DATA_HOME:="${HOME}/.local/share"}/Steam" ]; then + rm -rf "${HOME}/Steam" + fi +} + +fn_check_steamcmd_steamapp(){ + # Check that steamapp directory fixes issue #3481 + if [ ! -d "${serverfiles}/steamapps" ]; then + mkdir -p "${serverfiles}/steamapps" + fi +} + +fn_check_steamcmd_ark(){ + # Checks if SteamCMD exists in + # Engine/Binaries/ThirdParty/SteamCMD/Linux + # to allow ark mods to work + if [ ! -f "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamcmd.sh" ]; then + installsteamcmd=1 + if [ "${commandname}" == "INSTALL" ]; then + fn_install_steamcmd + else + fn_print_warn_nl "ARK mods SteamCMD is missing" + fn_script_log_warn "ARK mods SteamCMD is missing" + fn_install_steamcmd + fi + elif [ "${commandname}" == "INSTALL" ]; then + fn_print_information "ARK mods SteamCMD is already installed..." + fn_print_ok_eol_nl + fi +} + +fn_check_steamcmd_clear(){ + # Will remove steamcmd dir if steamcmd package is installed. + if [ "$(command -v steamcmd 2>/dev/null)" ]&&[ -d "${rootdir}/steamcmd" ]; then + rm -rf "${steamcmddir:?}" + exitcode=$? + if [ "${exitcode}" != 0 ]; then + fn_script_log_fatal "Removing ${rootdir}/steamcmd" + else + fn_script_log_pass "Removing ${rootdir}/steamcmd" + fi + fi +} + +fn_check_steamcmd_exec(){ + if [ "$(command -v steamcmd 2>/dev/null)" ]; then + steamcmdcommand="steamcmd" + else + steamcmdcommand="./steamcmd.sh" + fi +} + +fn_update_steamcmd_localbuild(){ + # Gets local build info. + fn_print_dots "Checking local build: ${remotelocation}" + fn_appmanifest_check + # Uses appmanifest to find local build. + localbuild=$(grep buildid "${appmanifestfile}" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\ -f3) + + # Set branch to public if no custom branch. + if [ -z "${branch}" ]; then + branch="public" + fi + + # Checks if localbuild variable has been set. + if [ -z "${localbuild}" ]||[ "${localbuild}" == "null" ]; then + fn_print_fail "Checking local build: ${remotelocation}" + fn_script_log_fatal "Checking local build" + core_exit.sh + else + fn_print_ok "Checking local build: ${remotelocation}" + fn_script_log_pass "Checking local build" + fi +} + +fn_update_steamcmd_remotebuild(){ + # Gets remote build info. + if [ -d "${steamcmddir}" ]; then + cd "${steamcmddir}" || exit + fi + + # Removes appinfo.vdf as a fix for not always getting up to date version info from SteamCMD. + if [ "$(find "${HOME}" -type f -name "appinfo.vdf" | wc -l)" -ne "0" ]; then + find "${HOME}" -type f -name "appinfo.vdf" -exec rm -f {} \; + fi + + # password for branch not needed to check the buildid + remotebuild=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed -e '/"branches"/,/^}/!d' | sed -n "/\"${branch}\"/,/}/p" | grep -m 1 buildid | tr -cd '[:digit:]') + + if [ "${firstcommandname}" != "INSTALL" ]; then + fn_print_dots "Checking remote build: ${remotelocation}" + # Checks if remotebuild variable has been set. + if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then + fn_print_fail "Checking remote build: ${remotelocation}" + fn_script_log_fatal "Checking remote build" + core_exit.sh + else + fn_print_ok "Checking remote build: ${remotelocation}" + fn_script_log_pass "Checking remote build" + fi + else + # Checks if remotebuild variable has been set. + if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then + fn_print_failure "Unable to get remote build" + fn_script_log_fatal "Unable to get remote build" + core_exit.sh + fi + fi +} + +fn_update_steamcmd_compare(){ + fn_print_dots "Checking for update: ${remotelocation}" + if [ "${localbuild}" != "${remotebuild}" ]; then + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "Update available" + echo -e "* Local build: ${red}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuild}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + if [ -n "${betapassword}" ]; then + echo -e "* Branch password: ${betapassword}" + fi + echo -e "https://steamdb.info/app/${appid}/" + echo -en "\n" + fn_script_log_info "Update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuild}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + if [ -n "${betapassword}" ]; then + fn_script_log_info "Branch password: ${betapassword}" + fi + fn_script_log_info "${localbuild} > ${remotebuild}" + + if [ "${commandname}" == "UPDATE" ]; then + unset updateonstart + check_status.sh + # If server stopped. + if [ "${status}" == "0" ]; then + fn_dl_steamcmd + # If server started. + else + fn_print_restart_warning + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + exitbypass=1 + fn_dl_steamcmd + exitbypass=1 + command_start.sh + fn_firstcommand_reset + unset exitbypass + fi + date +%s > "${lockdir}/lastupdate.lock" + alert="update" + elif [ "${commandname}" == "CHECK-UPDATE" ]; then + alert="check-update" + fi + alert.sh + else + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "No update available" + echo -e "* Local build: ${green}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuild}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + if [ -n "${betapassword}" ]; then + echo -e "* Branch password: ${betapassword}" + fi + echo -e "https://steamdb.info/app/${appid}/" + echo -en "\n" + fn_script_log_info "No update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuild}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + if [ -n "${betapassword}" ]; then + fn_script_log_info "Branch password: ${betapassword}" + fi + fi +} + +fn_appmanifest_info(){ + appmanifestfile=$(find "${serverfiles}" -type f -name "appmanifest_${appid}.acf") + appmanifestfilewc=$(find "${serverfiles}" -type f -name "appmanifest_${appid}.acf" | wc -l) +} + +fn_appmanifest_check(){ + fn_appmanifest_info + # Multiple or no matching appmanifest files may sometimes be present. + # This error is corrected if required. + if [ "${appmanifestfilewc}" -ge "2" ]; then + fn_print_error "Multiple appmanifest_${appid}.acf files found" + fn_script_log_error "Multiple appmanifest_${appid}.acf files found" + fn_print_dots "Removing x${appmanifestfilewc} appmanifest_${appid}.acf files" + for appfile in ${appmanifestfile}; do + rm -f "${appfile:?}" + done + appmanifestfilewc1="${appmanifestfilewc}" + fn_appmanifest_info + # if error can not be resolved. + if [ "${appmanifestfilewc}" -ge "2" ]; then + fn_print_fail "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files" + fn_script_log_fatal "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files" + echo -e "* Check user permissions" + for appfile in ${appmanifestfile}; do + echo -e " ${appfile}" + done + core_exit.sh + else + fn_print_ok "Removed x${appmanifestfilewc1} appmanifest_${appid}.acf files" + fn_script_log_pass "Removed x${appmanifestfilewc1} appmanifest_${appid}.acf files" + fn_print_info_nl "Forcing update to correct issue" + fn_script_log_info "Forcing update to correct issue" + fn_dl_steamcmd + fi + elif [ "${appmanifestfilewc}" -eq "0" ]; then + fn_print_error_nl "No appmanifest_${appid}.acf found" + fn_script_log_error "No appmanifest_${appid}.acf found" + fn_print_info_nl "Forcing update to correct issue" + fn_script_log_info "Forcing update to correct issue" + fn_dl_steamcmd + fn_appmanifest_info + if [ "${appmanifestfilewc}" -eq "0" ]; then + fn_print_fail_nl "Still no appmanifest_${appid}.acf found" + fn_script_log_fatal "Still no appmanifest_${appid}.acf found" + core_exit.sh + fi + fi +} diff --git a/lgsm/functions/core_trap.sh b/lgsm/functions/core_trap.sh index 769c27c96..a3eaf5675 100755 --- a/lgsm/functions/core_trap.sh +++ b/lgsm/functions/core_trap.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM core_trap.sh function +# LinuxGSM core_trap.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles CTRL-C trap to give an exit code. diff --git a/lgsm/functions/fix.sh b/lgsm/functions/fix.sh index 2e2931e41..1b5e63db6 100755 --- a/lgsm/functions/fix.sh +++ b/lgsm/functions/fix.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM fix.sh function +# LinuxGSM fix.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Overall function for managing fixes. # Runs functions that will fix an issue. @@ -82,6 +83,8 @@ if [ "${commandname}" != "INSTALL" ]&&[ -z "${fixbypass}" ]; then fix_mta.sh elif [ "${shortname}" == "unt" ]; then fix_unt.sh + elif [ "${shortname}" == "vh" ]; then + fix_vh.sh elif [ "${shortname}" == "wurm" ]; then fix_wurm.sh elif [ "${shortname}" == "zmr" ]; then @@ -93,7 +96,7 @@ fi if [ "${commandname}" == "INSTALL" ]; then if [ "${shortname}" == "av" ]||[ "${shortname}" == "cmw" ]||[ "${shortname}" == "kf" ]||[ "${shortname}" == "kf2" ]||[ "${shortname}" == "onset" ]||[ "${shortname}" == "ro" ]||[ "${shortname}" == "samp" ]||[ "${shortname}" == "ut2k4" ]||[ "${shortname}" == "ut" ]||[ "${shortname}" == "ut3" ]; then echo -e "" - echo -e "Applying Post-Install Fixes" + echo -e "${lightyellow}Applying Post-Install Fixes}${default}" echo -e "=================================" fn_sleep_time postinstall=1 diff --git a/lgsm/functions/fix_ark.sh b/lgsm/functions/fix_ark.sh index 4c4cf3f32..da0097cab 100755 --- a/lgsm/functions/fix_ark.sh +++ b/lgsm/functions/fix_ark.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM fix_ark.sh function +# LinuxGSM fix_ark.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves various issues with ARK: Survival Evolved. diff --git a/lgsm/functions/fix_arma3.sh b/lgsm/functions/fix_arma3.sh index f71fcde7b..bdd85af71 100755 --- a/lgsm/functions/fix_arma3.sh +++ b/lgsm/functions/fix_arma3.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM fix_arma3.sh function +# LinuxGSM fix_arma3.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves an issue with ARMA3. diff --git a/lgsm/functions/fix_av.sh b/lgsm/functions/fix_av.sh index 3edf7862b..f34a01c37 100755 --- a/lgsm/functions/fix_av.sh +++ b/lgsm/functions/fix_av.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM fix_av.sh function -# Author: Christian Birk +# LinuxGSM fix_av.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves startup issue with Avorion @@ -9,14 +10,10 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/linux64" if [ "${postinstall}" == "1" ]; then - fn_parms(){ - parms="--datapath ${avdatapath} --galaxy-name ${selfname} --init-folders-only" - } - + startparameters="--datapath ${avdatapath} --galaxy-name ${selfname} --init-folders-only" fn_print_information "starting ${gamename} server to generate configs." fn_sleep_time # go to the executeable dir and start the init of the server cd "${systemdir}" || return 2 - fn_parms - "${executabledir}/${executable}" ${parms} + "${executabledir}/${executable}" ${startparameters} fi diff --git a/lgsm/functions/fix_bo.sh b/lgsm/functions/fix_bo.sh index 545504f63..453691874 100644 --- a/lgsm/functions/fix_bo.sh +++ b/lgsm/functions/fix_bo.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM fix_hw.sh function +# LinuxGSM fix_hw.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves various issues with Ballistic Overkill. diff --git a/lgsm/functions/fix_cmw.sh b/lgsm/functions/fix_cmw.sh index 2f517b1b7..192f483e8 100755 --- a/lgsm/functions/fix_cmw.sh +++ b/lgsm/functions/fix_cmw.sh @@ -1,9 +1,12 @@ #!/bin/bash -# LinuxGSM fix_cmw.sh function -# Author: Christian Birk +# LinuxGSM fix_cmw.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves the issue of the not starting server on linux +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + if [ ! -f "${executabledir}/steam_appid.txt" ]; then fixname="steam_appid.txt" fn_fix_msg_start diff --git a/lgsm/functions/fix_csgo.sh b/lgsm/functions/fix_csgo.sh index 6b213d388..be59c42ec 100755 --- a/lgsm/functions/fix_csgo.sh +++ b/lgsm/functions/fix_csgo.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM fix_csgo.sh function +# LinuxGSM fix_csgo.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves various issues with CS:GO. diff --git a/lgsm/functions/fix_dst.sh b/lgsm/functions/fix_dst.sh index b203e1cd8..49fce22e3 100755 --- a/lgsm/functions/fix_dst.sh +++ b/lgsm/functions/fix_dst.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM fix_dst.sh function +# LinuxGSM fix_dst.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves various issues with Don't Starve Together. diff --git a/lgsm/functions/fix_hw.sh b/lgsm/functions/fix_hw.sh index 4fc3dcd0d..af06924db 100755 --- a/lgsm/functions/fix_hw.sh +++ b/lgsm/functions/fix_hw.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM fix_hw.sh function +# LinuxGSM fix_hw.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves various issues with Hurtworld. diff --git a/lgsm/functions/fix_ins.sh b/lgsm/functions/fix_ins.sh index f41dffbd4..21a979c4c 100755 --- a/lgsm/functions/fix_ins.sh +++ b/lgsm/functions/fix_ins.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM fix_ins.sh function +# LinuxGSM fix_ins.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves various issues with Insurgency. diff --git a/lgsm/functions/fix_kf.sh b/lgsm/functions/fix_kf.sh index c4a294515..e749a2d27 100755 --- a/lgsm/functions/fix_kf.sh +++ b/lgsm/functions/fix_kf.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM fix_kf.sh function +# LinuxGSM fix_kf.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves various issues with Killing Floor. diff --git a/lgsm/functions/fix_kf2.sh b/lgsm/functions/fix_kf2.sh index e826dea2a..b680a9937 100755 --- a/lgsm/functions/fix_kf2.sh +++ b/lgsm/functions/fix_kf2.sh @@ -1,14 +1,13 @@ #!/bin/bash -# LinuxGSM fix_kf2.sh function +# LinuxGSM fix_kf2.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves various issues with Killing Floor 2. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_parms(){ -parms="\"${defaultmap}?Game=KFGameContent.KFGameInfo_VersusSurvival\"" -} +startparameters="\"${defaultmap}?Game=KFGameContent.KFGameInfo_VersusSurvival\"" fn_print_information "starting ${gamename} server to generate configs." fn_sleep_time diff --git a/lgsm/functions/fix_mcb.sh b/lgsm/functions/fix_mcb.sh index 691647fb7..4768a40cf 100755 --- a/lgsm/functions/fix_mcb.sh +++ b/lgsm/functions/fix_mcb.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM fix_mcb.sh function +# LinuxGSM fix_mcb.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves possible startup issue with Minecraft Bedrock. diff --git a/lgsm/functions/fix_mta.sh b/lgsm/functions/fix_mta.sh index 549101a68..2c92e8d12 100755 --- a/lgsm/functions/fix_mta.sh +++ b/lgsm/functions/fix_mta.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM fix_mta.sh function +# LinuxGSM fix_mta.sh module # Author: Daniel Gibbs -# Contributor: ChaosMTA +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Installs the libmysqlclient for database functions on the server. diff --git a/lgsm/functions/fix_nmrih.sh b/lgsm/functions/fix_nmrih.sh index 2c9d8c743..4bb70c6f9 100755 --- a/lgsm/functions/fix_nmrih.sh +++ b/lgsm/functions/fix_nmrih.sh @@ -1,6 +1,8 @@ #!/bin/bash -# LinuxGSM fix_nmrih.sh function -# Author: Denperidge +# LinuxGSM fix_nmrih.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com # Description: Create symlinks for renamed No More Room In Hell serverfiles. # Solution from Steam Community post: https://steamcommunity.com/app/224260/discussions/2/1732089092441769414/ diff --git a/lgsm/functions/fix_onset.sh b/lgsm/functions/fix_onset.sh index 630245844..c444c1ae9 100755 --- a/lgsm/functions/fix_onset.sh +++ b/lgsm/functions/fix_onset.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM fix_onset.sh function -# Author: Frédéric C. +# LinuxGSM fix_onset.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves various issues with Onset. diff --git a/lgsm/functions/fix_ro.sh b/lgsm/functions/fix_ro.sh index c9254aa64..895c7c2da 100755 --- a/lgsm/functions/fix_ro.sh +++ b/lgsm/functions/fix_ro.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM fix_ro.sh function +# LinuxGSM fix_ro.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves various issues with Red Orchestra. diff --git a/lgsm/functions/fix_rust.sh b/lgsm/functions/fix_rust.sh index 607af491b..4488377a3 100755 --- a/lgsm/functions/fix_rust.sh +++ b/lgsm/functions/fix_rust.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM fix_rust.sh function +# LinuxGSM fix_rust.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves startup issue with Rust. @@ -8,3 +9,13 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" # Fixes: [Raknet] Server Shutting Down (Shutting Down). export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/RustDedicated_Data/Plugins/x86_64" + +# Part of random seed feature. +# If seed is not defined by user generate a seed file. +if [ -z "${seed}" ]; then + if [ ! -f "${datadir}/${selfname}-seed.txt" ]; then + shuf -i 1-2147483647 -n 1 > "${datadir}/${selfname}-seed.txt" + fi + seed="$(cat "${datadir}/${selfname}-seed.txt")" + randomseed=1 +fi diff --git a/lgsm/functions/fix_rw.sh b/lgsm/functions/fix_rw.sh index b02ec343e..aef41a703 100755 --- a/lgsm/functions/fix_rw.sh +++ b/lgsm/functions/fix_rw.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM fix_rw.sh function +# LinuxGSM fix_rw.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves various issues with Rising World. diff --git a/lgsm/functions/fix_samp.sh b/lgsm/functions/fix_samp.sh index b69779019..7a62bd4d1 100644 --- a/lgsm/functions/fix_samp.sh +++ b/lgsm/functions/fix_samp.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM fix_sfc.sh function -# Author: Christian Birk +# LinuxGSM fix_sfc.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves issue that the default rcon password is not changed diff --git a/lgsm/functions/fix_sdtd.sh b/lgsm/functions/fix_sdtd.sh index 2709102c4..e93db7970 100755 --- a/lgsm/functions/fix_sdtd.sh +++ b/lgsm/functions/fix_sdtd.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM fix_sdtd.sh function +# LinuxGSM fix_sdtd.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves various issues with 7 Days to Die. diff --git a/lgsm/functions/fix_sfc.sh b/lgsm/functions/fix_sfc.sh index 874d6eca7..51b95b9d5 100755 --- a/lgsm/functions/fix_sfc.sh +++ b/lgsm/functions/fix_sfc.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM fix_sfc.sh function +# LinuxGSM fix_sfc.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves various issues with Source Forts Classic. diff --git a/lgsm/functions/fix_sof2.sh b/lgsm/functions/fix_sof2.sh index 51224c8e0..002f42952 100755 --- a/lgsm/functions/fix_sof2.sh +++ b/lgsm/functions/fix_sof2.sh @@ -1,9 +1,11 @@ #!/bin/bash -# LinuxGSM fix_rust.sh function +# LinuxGSM fix_rust.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves various issues with Soldier of Fortune 2. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + # Fixes: error while loading shared libraries: libcxa.so.1 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}" diff --git a/lgsm/functions/fix_squad.sh b/lgsm/functions/fix_squad.sh index 8ec84a86f..b1ba1fde2 100644 --- a/lgsm/functions/fix_squad.sh +++ b/lgsm/functions/fix_squad.sh @@ -1,9 +1,12 @@ #!/bin/bash -# LinuxGSM fix_squad.sh function -# Author: Christian Birk +# LinuxGSM fix_squad.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves various issues with Squad. +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + # As the server base dir changed for the game, we need to migrate the default config from the old to the new location oldservercfg="${serverfiles}/Squad/ServerConfig/${servercfg}" if [ -f "${oldservercfg}" ]&&[ -f "${servercfgfullpath}" ]; then diff --git a/lgsm/functions/fix_st.sh b/lgsm/functions/fix_st.sh index 2495264da..b9fb5b084 100644 --- a/lgsm/functions/fix_st.sh +++ b/lgsm/functions/fix_st.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM fix_rust.sh function +# LinuxGSM fix_rust.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves startup issue with Stationeers. diff --git a/lgsm/functions/fix_steamcmd.sh b/lgsm/functions/fix_steamcmd.sh index 41d31e263..5fb151bad 100755 --- a/lgsm/functions/fix_steamcmd.sh +++ b/lgsm/functions/fix_steamcmd.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM fix_steamcmd.sh function +# LinuxGSM fix_steamcmd.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves various issues related to SteamCMD. @@ -79,6 +80,8 @@ elif [ "${shortname}" == "cmw" ]; then fn_fix_steamclient_so "32" "${executabledir}/lib" elif [ "${shortname}" == "cs" ]; then fn_fix_steamclient_so "32" "${serverfiles}" +elif [ "${shortname}" == "col" ]; then + fn_fix_steamclient_so "64" "${serverfiles}" elif [ "${shortname}" == "ins" ]; then fn_fix_steamclient_so "32" "${serverfiles}/bin" elif [ "${shortname}" == "pz" ]; then diff --git a/lgsm/functions/fix_terraria.sh b/lgsm/functions/fix_terraria.sh index 712416bd8..7758fdad9 100755 --- a/lgsm/functions/fix_terraria.sh +++ b/lgsm/functions/fix_terraria.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM fix_terraria.sh function +# LinuxGSM fix_terraria.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves an issue with Terraria. diff --git a/lgsm/functions/fix_tf2.sh b/lgsm/functions/fix_tf2.sh index 59b841226..27b35a0d2 100755 --- a/lgsm/functions/fix_tf2.sh +++ b/lgsm/functions/fix_tf2.sh @@ -1,7 +1,8 @@ #!/bin/bash -# LinuxGSM fix_tf2.sh function -# Author: Vector Sigma -# Website: https://github.com/vectorsigma +# LinuxGSM fix_tf2.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com # Description: Resolves various issues with Team Fortress 2. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/functions/fix_ts3.sh b/lgsm/functions/fix_ts3.sh index b019012f7..b1ed7d84b 100755 --- a/lgsm/functions/fix_ts3.sh +++ b/lgsm/functions/fix_ts3.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM fix_ts3.sh function +# LinuxGSM fix_ts3.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves various issues with Teamspeak 3. @@ -13,3 +14,20 @@ if [ ! -f "${serverfiles}/libmariadb.so.2" ]; then cp "${serverfiles}/redist/libmariadb.so.2" "${serverfiles}/libmariadb.so.2" fn_fix_msg_end fi + +# Fixes: failed to register local accounting service: No such file or directory. +accountingfile="/dev/shm/7gbhujb54g8z9hu43jre8" +if [ -f "${accountingfile}" ]; then + # Check permissions for the file if the current user owns it, if not exit. + if [ "$( stat -c %U ${accountingfile})" == "$(whoami)" ]; then + fixname="Delete file ${accountingfile}" + fn_fix_msg_start + rm -f "${accountingfile}" + fn_fix_msg_end + # file is not owned by the current user and needs to be deleted manually. + else + fn_print_error_nl "File ${accountingfile} is not owned by $(whoami) and needs to be deleted manually" + fn_script_log_fatal "File ${accountingfile} is not owned by $(whoami) and needs to be deleted manually" + core_exit.sh + fi +fi diff --git a/lgsm/functions/fix_unt.sh b/lgsm/functions/fix_unt.sh index d030ef318..eae2e6313 100755 --- a/lgsm/functions/fix_unt.sh +++ b/lgsm/functions/fix_unt.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM fix_rust.sh function +# LinuxGSM fix_rust.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves startup issue with Unturned. diff --git a/lgsm/functions/fix_ut.sh b/lgsm/functions/fix_ut.sh index f9c81348a..2e6686a8d 100755 --- a/lgsm/functions/fix_ut.sh +++ b/lgsm/functions/fix_ut.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM fix_ut.sh function -# Author: Alexander Hurd +# LinuxGSM fix_ut.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves various issues with Unreal Tournament. diff --git a/lgsm/functions/fix_ut2k4.sh b/lgsm/functions/fix_ut2k4.sh index cc1621815..49610e4b6 100755 --- a/lgsm/functions/fix_ut2k4.sh +++ b/lgsm/functions/fix_ut2k4.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM fix_ut2k4.sh function +# LinuxGSM fix_ut2k4.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves various issues with Unreal Tournament 2004. diff --git a/lgsm/functions/fix_ut3.sh b/lgsm/functions/fix_ut3.sh index 402683bf1..6bd26a53a 100755 --- a/lgsm/functions/fix_ut3.sh +++ b/lgsm/functions/fix_ut3.sh @@ -1,14 +1,13 @@ #!/bin/bash -# LinuxGSM fix_ut2.sh function +# LinuxGSM fix_ut2.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves various issues with Unreal Tournament 3. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_parms(){ -parms="server VCTF-Suspense?Game=UTGameContent.UTVehicleCTFGame_Content?bIsDedicated=true?bIsLanMatch=false?bUsesStats=false?bShouldAdvertise=false?PureServer=1?bAllowJoinInProgress=true?ConfigSubDir=${selfname} -port=${port} -queryport=${queryport} -multihome=${ip} -nohomedir -unattended -log=${gamelog}" -} +startparameters="server VCTF-Suspense?Game=UTGameContent.UTVehicleCTFGame_Content?bIsDedicated=true?bIsLanMatch=false?bUsesStats=false?bShouldAdvertise=false?PureServer=1?bAllowJoinInProgress=true?ConfigSubDir=${selfname} -port=${port} -queryport=${queryport} -multihome=${ip} -nohomedir -unattended -log=${gamelog}" fn_print_information "starting ${gamename} server to generate configs." fn_sleep_time diff --git a/lgsm/functions/fix_vh.sh b/lgsm/functions/fix_vh.sh new file mode 100755 index 000000000..551bd878f --- /dev/null +++ b/lgsm/functions/fix_vh.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# LinuxGSM fix_rust.sh function +# Author: Alasdair Haig +# Website: https://linuxgsm.com +# Description: Resolves startup issue with Valheim + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +export LD_LIBRARY_PATH=./linux64:$LD_LIBRARY_PATH diff --git a/lgsm/functions/fix_wurm.sh b/lgsm/functions/fix_wurm.sh index bf53e35b0..aba24d382 100755 --- a/lgsm/functions/fix_wurm.sh +++ b/lgsm/functions/fix_wurm.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM fix_wurm.sh function +# LinuxGSM fix_wurm.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves various issues with Wurm Unlimited. diff --git a/lgsm/functions/fix_zmr.sh b/lgsm/functions/fix_zmr.sh index 1825fa327..491c36638 100755 --- a/lgsm/functions/fix_zmr.sh +++ b/lgsm/functions/fix_zmr.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM fix_sfc.sh function +# LinuxGSM fix_sfc.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves various issues with Zombie Master: Reborn. diff --git a/lgsm/functions/info_config.sh b/lgsm/functions/info_config.sh index d13e000d9..07960e290 100755 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM info_config.sh function +# LinuxGSM info_config.sh module # Author: Daniel Gibbs -# Contributor: UltimateByte +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Gets specific details from config files. @@ -405,30 +405,6 @@ fn_info_config_factorio(){ fi } -fn_info_config_inss(){ - if [ ! -f "${servercfgfullpath}" ]; then - rconenabled="${unavailable}" - rconpassword="${unavailable}" - rconport="${zero}" - maxplayers="${zero}" - port="${zero}" - queryport="${zero}" - queryenabled="${unavailable}" - rconport="${zero}" - gamemode="${unavailable}" - gameworld="${unavailable}" - else - rconenabled=$(grep "bEnabled" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconpassword=$(grep "Password" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/Password//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//') - rconport=$(grep "ListenPort" "${servercfgfullpath}" | tr -cd '[:digit:]') - - # Not Set - rconenabled=${rconenabled:-"NOT SET"} - rconpassword=${rconpassword:-"NOT SET"} - rconport=${rconport:-"0"} - fi -} - fn_info_config_minecraft(){ if [ ! -f "${servercfgfullpath}" ]; then servername="${unavailable}" @@ -1088,15 +1064,15 @@ fn_info_config_unreal2(){ webadminuser="${unavailable}" webadminpass="${unavailable}" else - servername=$(grep "ServerName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/ServerName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//') - serverpassword=$(grep "GamePassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/GamePassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//') - adminpassword=$(grep "AdminPassword" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminPassword//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//') - port=$(grep "Port" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' | grep "^Port" | grep -v "#" | tr -cd '[:digit:]') + servername=$(sed -nr 's/^ServerName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + serverpassword=$(sed -nr 's/^GamePassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + adminpassword=$(sed -nr 's/^AdminPassword=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + port=$(sed -nr 's/^Port=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') queryport=$((port + 1)) - queryportgs=$(grep "OldQueryPortNumber" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - webadminenabled=$(grep "bEnabled" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/bEnabled//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//') - webadminport=$(grep "ListenPort" "${servercfgfullpath}" | grep -v "#" | tr -cd '[:digit:]') - webadminuser=$(grep "AdminName" "${servercfgfullpath}" | sed -e 's/^[ \t]*//g' -e '/^#/d' -e 's/AdminName//g' | tr -d '=\";,:' | sed -e 's/^[ \t]*//' -e 's/[ \t]*$//'| sed 's/\r$//') + queryportgs=$(sed -nr 's/^OldQueryPortNumber=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') + webadminenabled=$(sed -nr 's/^bEnabled=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') + webadminport=$(sed -nr 's/^ListenPort=(.*)$/\1/p' "${servercfgfullpath}" | tr -cd '[:digit:]') + webadminuser=$(sed -nr 's/^AdminName=(.*)$/\1/p' "${servercfgfullpath}" | tr -d '=\";,:' | sed 's/\r$//') webadminpass="${adminpassword}" # Not Set @@ -1525,6 +1501,92 @@ fn_info_config_pavlovvr(){ fi } +fn_info_config_col(){ + if [ -f "${servercfgfullpath}" ]; then + servername=$(jq -r '.ServerSettings.ServerName' "${servercfgfullpath}") + serverpassword=$(jq -r '.ServerSettings.ServerPassword' "${servercfgfullpath}") + maxplayers=$(jq -r '.ServerSettings.MaxPlayerCount' "${servercfgfullpath}") + port=$(jq -r '.ServerSettings.ServerGamePort' "${servercfgfullpath}") + steamport=$(jq -r '.ServerSettings.ServerSteamPort' "${servercfgfullpath}") + rconpassword=$(jq -r '.ServerSettings.RCONPassword' "${servercfgfullpath}") + configip=$(jq -r '.ServerSettings.ServerIP' "${servercfgfullpath}") + + # password not set + serverpassword=${serverpassword:-"NOT SET"} + queryport=${port:-"0"} + else + servername=${servername:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + port=${port:-"27004"} + steamport=${steamport:-"27005"} + rconpassword=${rconpassword:-"NOT SET"} + fi +} + +fn_info_config_vintagestory(){ + if [ ! -f "${servercfgfullpath}" ]; then + servername="${unavailable}" + maxplayers="${unavailable}" + serverpassword="${unavailable}" + port="${unavailable}" + queryport="${unavailable}" + configip="${unavailable}" + else + servername=$(jq -r '.ServerName' "${servercfgfullpath}") + maxplayers=$(jq -r '.MaxClients' "${servercfgfullpath}") + serverpassword=$(jq -r 'select(.Password != null) | .Password' "${servercfgfullpath}") + port=$(jq -r '.Port' "${servercfgfullpath}") + queryport=${port:-"0"} + configip=$(jq -r 'select(.Ip != null) | .Ip' "${servercfgfullpath}") + + serverpassword=${serverpassword:-"NOT SET"} + configip=${configip:-"0.0.0.0"} + fi +} + +fn_info_config_scpsl(){ + if [ -f "${servercfgfullpath}" ]; then + servername=$(sed -nr 's/^server_name: (.*)$/\1/p' "${servercfgfullpath}") + maxplayers=$(sed -nr 's/^max_players: (.*)$/\1/p' "${servercfgfullpath}") + configip=$(sed -nr 's/^ipv4_bind_ip: (.*)$/\1/p' "${servercfgfullpath}") + tickrate=$(sed -nr 's/^server_tickrate: (.*)$/\1/p' "${servercfgfullpath}") + adminpassword=$(sed -nr 's/^administrator_query_password: (.*)$/\1/p' "${servercfgfullpath}") + + if [ "${adminpassword}" == "none" ]; then + adminpassword="NOT SET" + fi + else + servername=${servername:-"NOT SET"} + maxplayers=${maxplayers:-"0"} + configip=${configip:-"0.0.0.0"} + tickrate=${tickrate:-"NOT SET"} + adminpassword=${adminpassword:-"NOT SET"} + fi +} + +fn_info_config_waterfall(){ + if [ -f "${servercfgfullpath}" ]; then + servername=$(sed -e '/^listeners:/,/^[a-z]/!d' "${servercfgfullpath}" | sed -nr 's/^[ ]+motd: (.*)$/\1/p' | tr -d "'" | sed 's/&1//') + queryport=$(sed -nr 's/^[ -]+query_port: ([0-9]+)/\1/p' "${servercfgfullpath}") + queryenabled=$(sed -nr 's/^[ ]+query_enabled: (.*)$/\1/p' "${servercfgfullpath}") + port=$(sed -nr 's/^[ ]+host: [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:([0-9]+)/\1/p' "${servercfgfullpath}") + # the normal max_players does only show in on the client side and has no effect how many players can connect + maxplayers=$(sed -nr 's/^player_limit: ([-]*[0-9])/\1/p' "${servercfgfullpath}") + configip=$(sed -nr 's/^[ ]+host: ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+):[0-9]+/\1/p' "${servercfgfullpath}") + + if [ "${maxplayers}" == "-1" ]||[ "${maxplayers}" == "0" ]; then + maxplayers="UNLIMITED" + fi + else + servername="${unavailable}" + maxplayers="${zero}" + port="${zero}" + queryport="${zero}" + queryenabled="${unavailable}" + fi +} + if [ "${shortname}" == "ac" ]; then fn_info_config_assettocorsa elif [ "${shortname}" == "ark" ]; then @@ -1551,14 +1613,14 @@ elif [ "${shortname}" == "cod4" ]; then fn_info_config_cod4 elif [ "${shortname}" == "codwaw" ]; then fn_info_config_codwaw +elif [ "${shortname}" == "col" ]; then + fn_info_config_col elif [ "${shortname}" == "dst" ]; then fn_info_config_dontstarve elif [ "${shortname}" == "eco" ]; then fn_info_config_eco elif [ "${shortname}" == "fctr" ]; then fn_info_config_factorio -elif [ "${shortname}" == "inss" ]; then - fn_info_config_inss elif [ "${shortname}" == "jc2" ]; then fn_info_config_justcause2 elif [ "${shortname}" == "jc3" ]; then @@ -1579,7 +1641,7 @@ elif [ "${shortname}" == "ql" ]; then fn_info_config_quakelive elif [ "${shortname}" == "jk2" ]; then fn_info_config_jk2 -elif [ "${shortname}" == "mc" ]; then +elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]; then fn_info_config_minecraft elif [ "${shortname}" == "mcb" ]; then fn_info_config_minecraft_bedrock @@ -1627,6 +1689,8 @@ elif [ "${engine}" == "unreal3" ]; then fn_info_config_unreal3 elif [ "${shortname}" == "ut" ]; then fn_info_config_ut +elif [ "${shortname}" == "scpsl" ]||[ "${shortname}" == "scpslsm" ]; then + fn_info_config_scpsl elif [ "${shortname}" == "sdtd" ]; then fn_info_config_sdtd elif [ "${shortname}" == "wet" ]; then @@ -1647,4 +1711,8 @@ elif [ "${shortname}" == "mh" ]; then fn_info_config_mordhau elif [ "${shortname}" == "pvr" ];then fn_info_config_pavlovvr +elif [ "${shortname}" == "vints" ]; then + fn_info_config_vintagestory +elif [ "${shortname}" == "wmc" ]; then + fn_info_config_waterfall fi diff --git a/lgsm/functions/info_distro.sh b/lgsm/functions/info_distro.sh index 11da3cc63..7f0dc2b19 100755 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM info_distro.sh function +# LinuxGSM info_distro.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Variables providing useful info on the Operating System such as disk and performace info. # Used for command_details.sh, command_debug.sh and alert.sh. @@ -72,14 +73,20 @@ glibcversion=$(ldd --version | sed -n '1s/.* //p') # e.g: tmux 1.6 if [ ! "$(command -V tmux 2>/dev/null)" ]; then tmuxv="${red}NOT INSTALLED!${default}" + tmuxvdigit="0" else - if [ "$(tmux -V | sed "s/tmux //" | sed -n '1 p' | tr -cd '[:digit:]')" -lt "16" ]; then + tmuxvdigit="$(tmux -V | sed "s/tmux //" | sed -n '1 p' | tr -cd '[:digit:]')" + if [ "${tmuxvdigit}" -lt "16" ]; then tmuxv="$(tmux -V) (>= 1.6 required for console log)" else tmuxv=$(tmux -V) fi fi +if [ "$(command -V java 2>/dev/null)" ]; then + javaversion=$(java -version 2>&1 | grep "version") +fi + ## Uptime uptime=$( Game\tINBOUND\t${port}\tudp" echo -e "> Query\tINBOUND\t${queryport}\tudp" - echo -e "> RCON\tINBOUND\t${rconport}\ttcp" + if [ -n "${rconport}" ]; then + echo -e "> RCON\tINBOUND\t${rconport}\ttcp" + fi } | column -s $'\t' -t } @@ -1069,6 +1149,7 @@ fn_info_message_rust(){ echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" echo -e "> Game/Query\tINBOUND\t${port}\tudp" echo -e "> RCON\tINBOUND\t${rconport}\ttcp" + echo -e "> App\tINBOUND\t${appport}\ttcp" } | column -s $'\t' -t } @@ -1256,9 +1337,9 @@ fn_info_message_unreal(){ fi if [ "${appid}" ]; then if [ "${appid}" == "223250" ]; then - echo -e "< Steam\tINBOUND\t20610\tudp" + echo -e "> Steam\tINBOUND\t20610\tudp" else - echo -e "< Steam\tINBOUND\t20660\tudp" + echo -e "> Steam\tINBOUND\t20660\tudp" fi fi echo -e "> Web Admin\tINBOUND\t${webadminport}\ttcp\tListenPort=${webadminport}" @@ -1338,6 +1419,16 @@ fn_info_message_ut(){ } | column -s $'\t' -t } +fn_info_message_vh(){ + echo -e "netstat -atunp | grep valheim" + echo -e "" + { + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" + echo -e "> Game\tINBOUND\t${port}\tudp" + echo -e "> Query\tINBOUND\t${queryport}\tudp" + } | column -s $'\t' -t +} + fn_info_message_kf2(){ fn_info_message_password_strip echo -e "netstat -atunp | grep KFGame" @@ -1385,7 +1476,7 @@ fn_info_message_mta(){ echo -e "" { echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game/Query\tOUTBOUND\t${port}\tudp" + echo -e "> Game/Query\tINBOUND\t${port}\tudp" echo -e "> HTTP Server\tINBOUND\t${httpport}\ttcp" if [ "${ase}" == "Enabled" ]; then echo -e "> Query Port\tOUTBOUND\t${queryport}\tudp" @@ -1445,6 +1536,34 @@ fn_info_message_pavlovvr(){ } | column -s $'\t' -t } +fn_info_message_colony(){ + echo -e "netstat -atunp | grep colonyserv" + echo -e "" + { + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" + echo -e "> Game\tINBOUND\t${port}\tudp" + echo -e "> Steam\tINBOUND\t${steamport}\tudp" + } | column -s $'\t' -t +} + +fn_info_message_vintagestory(){ + echo "netstat -atunp | grep cli" + echo -e "" + { + echo -e "DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL" + echo -e "> Game\tINBOUND\t${port}\tTCP" + } | column -s $'\t' -t +} + +fn_info_message_scpsl(){ + echo -e "netstat -atunp | grep SCPSL" + echo -e "" + { + echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" + echo -e "> Game\tINBOUND\t${port}\tudp" + } | column -s $'\t' -t +} + fn_info_message_select_engine(){ # Display details depending on game or engine. if [ "${shortname}" == "ac" ]; then @@ -1455,6 +1574,10 @@ fn_info_message_select_engine(){ fn_info_message_avorion elif [ "${shortname}" == "arma3" ]; then fn_info_message_arma3 + elif [ "${shortname}" == "bf1942" ]; then + fn_info_message_bf1942 + elif [ "${shortname}" == "bfv" ]; then + fn_info_message_bfv elif [ "${shortname}" == "bo" ]; then fn_info_message_ballisticoverkill elif [ "${shortname}" == "bt" ]; then @@ -1473,6 +1596,8 @@ fn_info_message_select_engine(){ fn_info_message_cod4 elif [ "${shortname}" == "codwaw" ]; then fn_info_message_codwaw + elif [ "${shortname}" == "col" ]; then + fn_info_message_colony elif [ "${shortname}" == "dst" ]; then fn_info_message_dst elif [ "${shortname}" == "eco" ]; then @@ -1493,8 +1618,18 @@ fn_info_message_select_engine(){ fn_info_message_justcause3 elif [ "${shortname}" == "kf2" ]; then fn_info_message_kf2 + elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]||[ "${shortname}" == "wmc" ]; then + fn_info_message_minecraft elif [ "${shortname}" == "mcb" ]; then fn_info_message_minecraft_bedrock + elif [ "${shortname}" == "mh" ]; then + fn_info_message_mordhau + elif [ "${shortname}" == "mohaa" ]; then + fn_info_message_mohaa + elif [ "${shortname}" == "mta" ]; then + fn_info_message_mta + elif [ "${shortname}" == "mumble" ]; then + fn_info_message_mumble elif [ "${shortname}" == "onset" ]; then fn_info_message_onset elif [ "${shortname}" == "mom" ]; then @@ -1515,6 +1650,8 @@ fn_info_message_select_engine(){ fn_info_message_quakelive elif [ "${shortname}" == "samp" ]; then fn_info_message_samp + elif [ "${shortname}" == "scpsl" ]||[ "${shortname}" == "scpslsm" ]; then + fn_info_message_scpsl elif [ "${shortname}" == "sdtd" ]; then fn_info_message_sdtd elif [ "${shortname}" == "squad" ]; then @@ -1541,26 +1678,16 @@ fn_info_message_select_engine(){ fn_info_message_unturned elif [ "${shortname}" == "ut" ]; then fn_info_message_ut - elif [ "${shortname}" == "mc" ]; then - fn_info_message_minecraft - elif [ "${shortname}" == "mh" ]; then - fn_info_message_mordhau - elif [ "${shortname}" == "mohaa" ]; then - fn_info_message_mohaa - elif [ "${shortname}" == "mta" ]; then - fn_info_message_mta - elif [ "${shortname}" == "mumble" ]; then - fn_info_message_mumble - elif [ "${shortname}" == "bf1942" ]; then - fn_info_message_bf1942 - elif [ "${shortname}" == "bfv" ]; then - fn_info_message_bfv + elif [ "${shortname}" == "vh" ]; then + fn_info_message_vh elif [ "${shortname}" == "rtcw" ]; then fn_info_message_rtcw elif [ "${shortname}" == "pvr" ]; then fn_info_message_pavlovvr elif [ "${shortname}" == "rust" ]; then fn_info_message_rust + elif [ "${shortname}" == "vints" ]; then + fn_info_message_vintagestory elif [ "${shortname}" == "wf" ]; then fn_info_message_warfork elif [ "${shortname}" == "wurm" ]; then @@ -1585,50 +1712,3 @@ fn_info_message_select_engine(){ fn_print_error_nl "Unable to detect server engine." fi } - -# Separator is different for details -fn_messages_separator(){ - if [ "${commandname}" == "details" ]; then - printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' = - else - echo -e "=================================" - fi -} - -# Removes the passwords form all but details -fn_info_message_password_strip(){ - if [ "${commandname}" != "DETAILS" ]; then - if [ "${serverpassword}" ]; then - serverpassword="********" - fi - - if [ "${rconpassword}" ]; then - rconpassword="********" - fi - - if [ "${adminpassword}" ]; then - adminpassword="********" - fi - - if [ "${statspassword}" ]; then - statspassword="********" - fi - - if [ "${webadminpass}" ]; then - webadminpass="********" - fi - - if [ "${telnetpass}" ]; then - telnetpass="********" - fi - - if [ "${wsapikey}" ]; then - wsapikey="********" - fi - - if [ "${gslt}" ]; then - gslt="********" - fi - - fi -} diff --git a/lgsm/functions/info_parms.sh b/lgsm/functions/info_parms.sh index 74c29b9df..47148f4b3 100755 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM info_parms.sh function +# LinuxGSM info_parms.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: If specific parms are not set then this will be displayed in details. @@ -134,12 +135,16 @@ fn_info_parms_rust(){ servername=${servername:-"NOT SET"} port=${port:-"0"} queryport=${port:-"0"} + appport=${appport:-"0"} rconport=${rconport:-"0"} + gamemode=${gamemode:-"NOT SET"} + maxplayers=${maxplayers:-"0"} rconpassword=${rconpassword:-"NOT SET"} rconweb=${rconweb:-"NOT SET"} - maxplayers=${maxplayers:-"0"} - saveinterval=${saveinterval:-"0"} tickrate=${tickrate:-"0"} + saveinterval=${saveinterval:-"0"} + serverlevel=${serverlevel:-"NOT SET"} + worldsize=${worldsize:-"0"} } fn_info_parms_samp(){ @@ -227,12 +232,28 @@ fn_info_parms_ut(){ port=${port:-"0"} } +fn_info_parms_vh(){ + port=${port:-"0"} + if [ "${public}" != "0" ]; then + queryport=$((port + 1)) + else + querymode="1" + fi + gameworld=${gameworld:-"NOT SET"} + serverpassword=${serverpassword:-"NOT SET"} + servername=${servername:-"NOT SET"} +} + fn_info_parms_wf(){ port=${port:-"0"} queryport="${port:-"0"}" webadminport=${webadminport:-"0"} } +fn_info_parms_queryport(){ + queryport="${port:-"0"}" +} + if [ "${shortname}" == "ark" ]; then fn_info_parms_ark elif [ "${shortname}" == "arma3" ]; then @@ -281,6 +302,8 @@ elif [ "${shortname}" == "tu" ]; then fn_info_parms_towerunite elif [ "${shortname}" == "tw" ]; then fn_info_parms_teeworlds +elif [ "${shortname}" == "vh" ]; then + fn_info_parms_vh elif [ "${shortname}" == "mh" ]; then fn_info_parms_mordhau elif [ "${shortname}" == "mta" ]; then @@ -295,4 +318,7 @@ elif [ "${shortname}" == "ut" ]; then fn_info_parms_ut elif [ "${shortname}" == "wf" ]; then fn_info_parms_wf +# for servers that have a missing queryport from the config +elif [ "${shortname}" == "scpsl" ]||[ "${shortname}" == "scpslsm" ]; then + fn_info_parms_queryport fi diff --git a/lgsm/functions/info_stats.sh b/lgsm/functions/info_stats.sh index 9bdee07fd..211208717 100755 --- a/lgsm/functions/info_stats.sh +++ b/lgsm/functions/info_stats.sh @@ -1,12 +1,12 @@ #!/bin/bash -# LinuxGSM info_stats.sh function +# LinuxGSM info_stats.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Collect optional Stats sent to LinuxGSM project. # Uses Google analytics. -local modulegroup="INFO" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" info_distro.sh @@ -23,10 +23,10 @@ fi if [ ! -f "${datadir}/uuid-${selfname}.txt" ]||[ ! -f "${datadir}/uuid-install.txt" ]; then # download dictionary words if [ ! -f "${datadir}/name-left.csv" ]; then - fn_fetch_file_github "lgsm/data" "name-left.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" + fn_fetch_file_github "lgsm/data" "name-left.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nohash" fi if [ ! -f "${datadir}/name-right.csv" ]; then - fn_fetch_file_github "lgsm/data" "name-right.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" + fn_fetch_file_github "lgsm/data" "name-right.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nohash" fi # generate instance uuid diff --git a/lgsm/functions/install_complete.sh b/lgsm/functions/install_complete.sh index 62eec08a2..ad258b224 100755 --- a/lgsm/functions/install_complete.sh +++ b/lgsm/functions/install_complete.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM install_complete.sh function +# LinuxGSM install_complete.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Prints installation completion message and hints. diff --git a/lgsm/functions/install_config.sh b/lgsm/functions/install_config.sh index fbff9dbbb..9b5ef01cd 100755 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM install_config.sh function +# LinuxGSM install_config.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Creates default server configs. @@ -25,7 +26,7 @@ fn_fetch_default_config(){ mkdir -p "${lgsmdir}/config-default/config-game" githuburl="https://raw.githubusercontent.com/GameServerManagers/Game-Server-Configs/master" for config in "${array_configs[@]}"; do - fn_fetch_file "${githuburl}/${gamedirname}/${config}" "${remote_fileurl_backup}" "GitHub" "Bitbucket" "${lgsmdir}/config-default/config-game" "${config}" "nochmodx" "norun" "forcedl" "nomd5" + fn_fetch_file "${githuburl}/${gamedirname}/${config}" "${remote_fileurl_backup}" "GitHub" "Bitbucket" "${lgsmdir}/config-default/config-game" "${config}" "nochmodx" "norun" "forcedl" "nohash" done } @@ -316,6 +317,13 @@ elif [ "${shortname}" == "cc" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations +elif [ "${shortname}" == "col" ]; then + gamedirname="ColonySurvival" + array_configs+=( colserver.json ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "cs" ]; then gamedirname="CounterStrike" array_configs+=( server.cfg ) @@ -506,7 +514,7 @@ elif [ "${shortname}" == "l4d2" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations -elif [ "${shortname}" == "mc" ]; then +elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]; then gamedirname="Minecraft" array_configs+=( server.properties ) fn_fetch_default_config @@ -660,6 +668,13 @@ elif [ "${shortname}" == "rust" ]; then fn_fetch_default_config fn_default_config_remote fn_list_config_locations +elif [ "${shortname}" == "scpsl" ]||[ "${shortname}" == "scpslsm" ]; then + gamedirname="SCPSecretLaboratory" + array_configs+=( config_gameplay.txt config_localadmin.txt ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "sol" ]; then gamedirname="Soldat" array_configs+=( soldat.ini ) @@ -786,6 +801,13 @@ elif [ "${shortname}" == "unt" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations +elif [ "${shortname}" == "vints" ]; then + gamedirname="VintageStory" + array_configs+=( serverconfig.json ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "vs" ]; then gamedirname="VampireSlayer" array_configs+=( server.cfg ) @@ -807,6 +829,12 @@ elif [ "${shortname}" == "wf" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations +elif [ "${shortname}" == "wmc" ]; then + gamedirname="Waterfall" + array_configs+=( config.yml ) + fn_fetch_default_config + fn_default_config_remote + fn_set_config_vars elif [ "${shortname}" == "wurm" ]; then gamedirname="WurmUnlimited" array_configs+=( server.cfg ) diff --git a/lgsm/functions/install_dst_token.sh b/lgsm/functions/install_dst_token.sh index 7eab2a153..50bc7ed97 100755 --- a/lgsm/functions/install_dst_token.sh +++ b/lgsm/functions/install_dst_token.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM install_dst_token.sh function -# Author: Daniel Gibbs & Marvin Lehmann (marvinl97) +# LinuxGSM install_dst_token.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Configures Don't Starve Together cluster with given token. diff --git a/lgsm/functions/install_eula.sh b/lgsm/functions/install_eula.sh index 1f50007f2..d7c0b0b7a 100755 --- a/lgsm/functions/install_eula.sh +++ b/lgsm/functions/install_eula.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM install_eula.sh function +# LinuxGSM install_eula.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Gets user to accept the EULA. @@ -8,7 +9,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ "${shortname}" == "ts3" ]; then eulaurl="https://www.teamspeak.com/en/privacy-and-terms" -elif [ "${shortname}" == "mc" ]; then +elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]; then eulaurl="https://account.mojang.com/documents/minecraft_eula" elif [ "${shortname}" == "ut" ]; then eulaurl="https://www.epicgames.com/unrealtournament/unreal-tournament-pre-alpha-test-development-build-eula" @@ -40,7 +41,7 @@ fi if [ "${shortname}" == "ts3" ]; then touch "${executabledir}/.ts3server_license_accepted" -elif [ "${shortname}" == "mc" ]; then +elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]; then touch "${serverfiles}/eula.txt" echo -e "eula=true" > "${serverfiles}/eula.txt" elif [ "${shortname}" == "ut" ]; then diff --git a/lgsm/functions/install_factorio_save.sh b/lgsm/functions/install_factorio_save.sh index 71690a7a7..f5fdb8a04 100755 --- a/lgsm/functions/install_factorio_save.sh +++ b/lgsm/functions/install_factorio_save.sh @@ -1,8 +1,9 @@ #!/bin/bash -# LinuxGSM install_factorio_save.sh function -# Author: Kristian Polso +# LinuxGSM install_factorio_save.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Creates the initial save file for Factorio +# Description: Creates the initial save file for Factorio. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/functions/install_gslt.sh b/lgsm/functions/install_gslt.sh index 27d384936..a8f8065c2 100755 --- a/lgsm/functions/install_gslt.sh +++ b/lgsm/functions/install_gslt.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM install_gslt.sh function +# LinuxGSM install_gslt.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Configures GSLT. diff --git a/lgsm/functions/install_header.sh b/lgsm/functions/install_header.sh index 420b827f8..4cf067f8f 100755 --- a/lgsm/functions/install_header.sh +++ b/lgsm/functions/install_header.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM install_header.sh function +# LinuxGSM install_header.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Prints installation header. diff --git a/lgsm/functions/install_logs.sh b/lgsm/functions/install_logs.sh index 6a272f2ef..57a41500c 100755 --- a/lgsm/functions/install_logs.sh +++ b/lgsm/functions/install_logs.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM install_logs.sh function +# LinuxGSM install_logs.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Creates log directories. diff --git a/lgsm/functions/install_modules.sh b/lgsm/functions/install_modules.sh deleted file mode 100755 index cc516bea0..000000000 --- a/lgsm/functions/install_modules.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# LinuxGSM install_modules.sh function -# Author: Daniel Gibbs -# Website: https://linuxgsm.com -# Description: Downloads all modules on install - -echo -e "" -echo -e "${lightyellow}Downloading LinuxGSM Modules${default}" -echo -e "=================================" - -fn_fetch_file "https://github.com/GameServerManagers/LinuxGSM/archive/master.tar.gz" "${tmpdir}" "master.tar.gz" "nochmodx" "norun" "noforce" "nomd5" -fn_dl_extract "${tmpdir}" "master.tar.gz" "${tmpdir}" -cp "${tmpdir}/LinuxGSM-master/lgsm/functions"/*.sh "${functionsdir}" -cp "${tmpdir}/LinuxGSM-master/lgsm/functions"/*.py "${functionsdir}" -chmod +x "${functionsdir}"/* -command_update_linuxgsm.sh -fn_firstcommand_reset diff --git a/lgsm/functions/install_mta_resources.sh b/lgsm/functions/install_mta_resources.sh index 194d9f546..011ad9b71 100755 --- a/lgsm/functions/install_mta_resources.sh +++ b/lgsm/functions/install_mta_resources.sh @@ -1,9 +1,9 @@ #!/bin/bash -# LinuxGSM install_mta_resources.sh function +# LinuxGSM install_mta_resources.sh module # Author: Daniel Gibbs -# Contributor: ChaosMTA +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com -# Description: Installs the libmysqlclient for database functions on the server and optionally installs default resources required to run the server +# Description: Installs the libmysqlclient for database functions on the server and optionally installs default resources required to run the server. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" diff --git a/lgsm/functions/install_retry.sh b/lgsm/functions/install_retry.sh index 070a4a816..080f864a2 100755 --- a/lgsm/functions/install_retry.sh +++ b/lgsm/functions/install_retry.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM install_retry.sh function +# LinuxGSM install_retry.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Asks for installation retry after failure. diff --git a/lgsm/functions/install_server_dir.sh b/lgsm/functions/install_server_dir.sh index 77c5ab138..9e75fb488 100755 --- a/lgsm/functions/install_server_dir.sh +++ b/lgsm/functions/install_server_dir.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM install_server_dir.sh function +# LinuxGSM install_server_dir.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Creates the server directory. diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index f8b6be4f0..b6b9f5240 100755 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM install_server_files.sh function +# LinuxGSM install_server_files.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Installs server files. @@ -26,7 +27,7 @@ fn_install_server_files(){ elif [ "${shortname}" == "codwaw" ]; then remote_fileurl="http://linuxgsm.download/CallOfDutyWorldAtWar/codwaw-lnxded-1.7-full.tar.xz"; local_filedir="${tmpdir}"; local_filename="codwaw-lnxded-1.7-full.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="2c6be1bb66ea631b9b2e7ae6216c6680" elif [ "${shortname}" == "etl" ]; then - remote_fileurl="http://linuxgsm.download/WolfensteinEnemyTerritory/etlegacy-v2.76-i386-et-260b.tar.xz"; local_filedir="${tmpdir}"; local_filename="etlegacy-v2.75-i386-et-260b.tar.bz2"; chmodx="nochmodx" run="norun"; force="noforce"; md5="178a00233cec1e25b69d130107ce1a79" + remote_fileurl="http://linuxgsm.download/WolfensteinEnemyTerritory/etlegacy-v2.77.1-i386-et-260b.tar.xz"; local_filedir="${tmpdir}"; local_filename="etlegacy-v2.77.1-i386-et-260b.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="cc307a9232abd3999be499b42d8e4ea8" elif [ "${shortname}" == "mohaa" ]; then remote_fileurl="http://linuxgsm.download/MedalofHonorAlliedAssault/moh_revival_v1.12_RC3.5.1.tar.xz"; local_filedir="${tmpdir}"; local_filename="moh_revival_v1.12_RC3.5.1.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="7c664538999252eeaf2b6d9949416480" elif [ "${shortname}" == "ns" ]; then @@ -48,7 +49,7 @@ fn_install_server_files(){ elif [ "${shortname}" == "ut2k4" ]; then remote_fileurl="http://linuxgsm.download/UnrealTournament2004/ut2004-server-3369-3-ultimate-linux.tar.xz"; local_filedir="${tmpdir}"; local_filename="ut2004-server-3369-3-ultimate-linux.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="9fceaab68554749f4b45be66613b9a15" elif [ "${shortname}" == "ut99" ]; then - remote_fileurl="http://linuxgsm.download/UnrealTournament99/ut99-server-469a-ultimate-linux.tar.xz"; local_filedir="${tmpdir}"; local_filename="ut99-server-469a-ultimate-linux.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="e3f2ffaab8e23b98d9e825d0244e8b9d" + remote_fileurl="http://linuxgsm.download/UnrealTournament99/ut99-server-469b-ultimate-linux.tar.xz"; local_filedir="${tmpdir}"; local_filename="ut99-server-469b-ultimate-linux.tar.xz"; chmodx="nochmodx" run="norun"; force="noforce"; md5="dba3f1122a5e60ee45ece7422fcf78f5" elif [ "${shortname}" == "ut" ]; then remote_fileurl="http://linuxgsm.download/UnrealTournament/UnrealTournament-Server-XAN-3525360-Linux.tar.xz"; local_filedir="${tmpdir}"; local_filename="UnrealTournament-Server-XAN-3525360-Linux.tar.xz"; chmodx="noexecute" run="norun"; force="noforce"; md5="41dd92015713a78211eaccf503b72393" elif [ "${shortname}" == "ut3" ]; then @@ -82,6 +83,11 @@ elif [ "${shortname}" == "mc" ]; then update_minecraft.sh elif [ "${shortname}" == "mcb" ]; then update_minecraft_bedrock.sh +elif [ "${shortname}" == "pmc" ]; then + install_eula.sh + update_papermc.sh +elif [ "${shortname}" == "wmc" ]; then + update_papermc.sh elif [ "${shortname}" == "mumble" ]; then update_mumble.sh elif [ "${shortname}" == "mta" ]; then @@ -91,6 +97,8 @@ elif [ "${shortname}" == "fctr" ]; then install_factorio_save.sh elif [ "${shortname}" == "jk2" ]; then update_jediknight2.sh +elif [ "${shortname}" == "vints" ]; then + update_vintagestory.sh elif [ -z "${appid}" ]||[ "${shortname}" == "ahl" ]||[ "${shortname}" == "bd" ]||[ "${shortname}" == "bb" ]||[ "${shortname}" == "ns" ]||[ "${shortname}" == "sfc" ]||[ "${shortname}" == "ts" ]||[ "${shortname}" == "vs" ]||[ "${shortname}" == "zmr" ]; then if [ "${shortname}" == "ut" ]; then install_eula.sh diff --git a/lgsm/functions/install_squad_license.sh b/lgsm/functions/install_squad_license.sh index b17b1ab7e..181646e85 100755 --- a/lgsm/functions/install_squad_license.sh +++ b/lgsm/functions/install_squad_license.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM install_squad_license.sh function +# LinuxGSM install_squad_license.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Configures the Squad server's license. diff --git a/lgsm/functions/install_stats.sh b/lgsm/functions/install_stats.sh index 355b7fa67..d3b45b40b 100755 --- a/lgsm/functions/install_stats.sh +++ b/lgsm/functions/install_stats.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM install_stats.sh function +# LinuxGSM install_stats.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Enabled LinuxGSM Stats. diff --git a/lgsm/functions/install_steamcmd.sh b/lgsm/functions/install_steamcmd.sh index 40acf435b..b1e64a42c 100755 --- a/lgsm/functions/install_steamcmd.sh +++ b/lgsm/functions/install_steamcmd.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM install_steamcmd.sh function +# LinuxGSM install_steamcmd.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Downloads SteamCMD on install. diff --git a/lgsm/functions/install_ts3db.sh b/lgsm/functions/install_ts3db.sh index a77a0ea38..07ab7a111 100755 --- a/lgsm/functions/install_ts3db.sh +++ b/lgsm/functions/install_ts3db.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM install_ts3db.sh function +# LinuxGSM install_ts3db.sh module # Author: Daniel Gibbs -# Contributor: PhilPhonic +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Installs the database server MariaDB for TeamSpeak 3. diff --git a/lgsm/functions/install_ut2k4_key.sh b/lgsm/functions/install_ut2k4_key.sh index 144ac278e..124052d05 100755 --- a/lgsm/functions/install_ut2k4_key.sh +++ b/lgsm/functions/install_ut2k4_key.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM install_ut2k4_key.sh function +# LinuxGSM install_ut2k4_key.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Activates ut2k4 server with given key. diff --git a/lgsm/functions/mods_core.sh b/lgsm/functions/mods_core.sh index 010ff109e..7e46f7977 100755 --- a/lgsm/functions/mods_core.sh +++ b/lgsm/functions/mods_core.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM command_mods_install.sh function +# LinuxGSM command_mods_install.sh module # Author: Daniel Gibbs -# Contributor: UltimateByte +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Core functions for mods list/install/update/remove diff --git a/lgsm/functions/mods_list.sh b/lgsm/functions/mods_list.sh index f60d9b30f..3863dfe47 100755 --- a/lgsm/functions/mods_list.sh +++ b/lgsm/functions/mods_list.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM mods_list.sh function +# LinuxGSM mods_list.sh module # Author: Daniel Gibbs -# Contributor: UltimateByte +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Lists and defines available mods for LinuxGSM supported servers; works along with mods_core.sh. # Usage: To add a mod, you need to add an array variable following the guide to set proper values; @@ -55,7 +55,7 @@ amxxtslatestfile="amxmodx-${amxxtsversion}-${amxxtsmod}-linux.tar.gz" amxxtsdownloadurl="https://www.amxmodx.org/release/${amxxtslatestfile}" amxxtsurl="${amxxtsdownloadurl}" # Metamod:Source -metamodsourceversion="1.10" +metamodsourceversion="1.11" metamodsourcescrapeurl="https://mms.alliedmods.net/mmsdrop/${metamodsourceversion}/mmsource-latest-linux" metamodsourcelatestfile=$(wget "${metamodsourcescrapeurl}" -q -O -) metamodsourcedownloadurl="https://www.metamodsource.net/latest.php?os=linux&version=${metamodsourceversion}" diff --git a/lgsm/functions/query_gamedig.sh b/lgsm/functions/query_gamedig.sh index 2443c6e99..123d8c86c 100755 --- a/lgsm/functions/query_gamedig.sh +++ b/lgsm/functions/query_gamedig.sh @@ -1,6 +1,7 @@ #!/bin/bash -# query_gamedig.sh function +# LinuxGSM query_gamedig.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Querys a gameserver using node-gamedig. # https://github.com/sonicsnes/node-gamedig @@ -45,7 +46,7 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; # maxplayers. gdmaxplayers=$(echo "${gamedigraw}" | jq -re '.maxplayers') if [ "${gdmaxplayers}" == "null" ]; then - unset maxplayers + unset gdmaxplayers elif [ "${gdmaxplayers}" == "[]" ]; then gdmaxplayers=0 fi @@ -67,5 +68,11 @@ if [ "$(command -v gamedig 2>/dev/null)" ]&&[ "$(command -v jq 2>/dev/null)" ]; if [ "${gdbots}" == "null" ]||[ "${gdbots}" == "0" ]; then unset gdbots fi + + # server version. + gdversion=$(echo "${gamedigraw}" | jq -re '.raw.version') + if [ "${gdversion}" == "null" ]||[ "${gdversion}" == "0" ]; then + unset gdversion + fi fi fi diff --git a/lgsm/functions/query_gsquery.py b/lgsm/functions/query_gsquery.py index 376f704b7..6c21b1a89 100755 --- a/lgsm/functions/query_gsquery.py +++ b/lgsm/functions/query_gsquery.py @@ -1,7 +1,8 @@ #! /usr/bin/env python3 # -*- coding: utf-8 -*- -# query_gsquery.py -# Author: Anonymous & Daniel Gibbs +# LinuxGSM query_gsquery.py function +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Allows querying of various game servers. diff --git a/lgsm/functions/update_factorio.sh b/lgsm/functions/update_factorio.sh index f13a48c43..47ccefe1b 100644 --- a/lgsm/functions/update_factorio.sh +++ b/lgsm/functions/update_factorio.sh @@ -1,13 +1,14 @@ #!/bin/bash -# LinuxGSM update_factorio.sh function +# LinuxGSM update_factorio.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles updating of Factorio servers. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_factorio_dl(){ - fn_fetch_file "https://factorio.com/get-download/${downloadbranch}/headless/${factorioarch}" "" "" "" "${tmpdir}" "factorio_headless_${factorioarch}-${remotebuild}.tar.xz" "" "norun" "noforce" "nomd5" + fn_fetch_file "https://factorio.com/get-download/${downloadbranch}/headless/${factorioarch}" "" "" "" "${tmpdir}" "factorio_headless_${factorioarch}-${remotebuild}.tar.xz" "" "norun" "noforce" "nohash" fn_dl_extract "${tmpdir}" "factorio_headless_${factorioarch}-${remotebuild}.tar.xz" "${tmpdir}" echo -e "copying to ${serverfiles}...\c" cp -R "${tmpdir}/factorio/"* "${serverfiles}" @@ -94,12 +95,14 @@ fn_update_factorio_compare(){ if [ "${status}" == "0" ]; then exitbypass=1 fn_update_factorio_dl - exitbypass=1 - command_start.sh - fn_firstcommand_reset - exitbypass=1 - command_stop.sh - fn_firstcommand_reset + if [ "${requirerestart}" == "1" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + fi # If server started. else fn_print_restart_warning diff --git a/lgsm/functions/update_jediknight2.sh b/lgsm/functions/update_jediknight2.sh index c2bdca1b6..3a3c40f14 100644 --- a/lgsm/functions/update_jediknight2.sh +++ b/lgsm/functions/update_jediknight2.sh @@ -1,15 +1,14 @@ #!/bin/bash -# LinuxGSM update_jk2.sh function +# LinuxGSM update_jk2.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles updating of jk2 servers. -local commandname="UPDATE" -local commandaction="Update" -local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_jk2_dl(){ - fn_fetch_file "https://github.com/mvdevs/jk2mv/releases/download/${remotebuild}/jk2mv-v${remotebuild}-dedicated.zip" "" "" "" "${tmpdir}" "jk2mv-${remotebuild}-dedicated.zip" "" "norun" "noforce" "nomd5" + fn_fetch_file "https://github.com/mvdevs/jk2mv/releases/download/${remotebuild}/jk2mv-v${remotebuild}-dedicated.zip" "" "" "" "${tmpdir}" "jk2mv-${remotebuild}-dedicated.zip" "" "norun" "noforce" "nohash" fn_dl_extract "${tmpdir}" "jk2mv-${remotebuild}-dedicated.zip" "${tmpdir}/jk2mv-v${remotebuild}-dedicated" echo -e "copying to ${serverfiles}...\c" cp -R "${tmpdir}/jk2mv-v${remotebuild}-dedicated/linux-amd64/jk2mvded"* "${serverfiles}/GameData" @@ -30,6 +29,7 @@ fn_update_jk2_localbuild(){ fn_print_dots "Checking local build: ${remotelocation}" # Uses log file to gather info. # Log is generated and cleared on startup but filled on shutdown. + requirerestart=1 localbuild=$(grep "\"version\"" "${consolelogdir}"/* 2>/dev/null | sed 's/.*://' | awk '{print $1}' | head -n 1) if [ -z "${localbuild}" ]; then fn_print_error "Checking local build: ${remotelocation}" @@ -118,11 +118,14 @@ fn_update_jk2_compare(){ if [ "${status}" == "0" ]; then exitbypass=1 fn_update_jk2_dl - exitbypass=1 - command_start.sh - exitbypass=1 - command_stop.sh - fn_firstcommand_reset + if [ "${requirerestart}" == "1" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + fi # If server started. else fn_print_restart_warning diff --git a/lgsm/functions/update_minecraft.sh b/lgsm/functions/update_minecraft.sh old mode 100755 new mode 100644 index e33840f3e..63a2fd51c --- a/lgsm/functions/update_minecraft.sh +++ b/lgsm/functions/update_minecraft.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM update_minecraft.sh function +# LinuxGSM update_minecraft.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles updating of Minecraft servers. @@ -12,7 +13,7 @@ fn_update_minecraft_dl(){ # Generate link to server.jar remotebuildurl=$(curl -s "${remotebuildlink}" | jq -r '.downloads.server.url') - fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "minecraft_server.${remotebuild}.jar" "" "norun" "noforce" "nomd5" + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "minecraft_server.${remotebuild}.jar" "" "norun" "noforce" "nohash" echo -e "copying to ${serverfiles}...\c" cp "${tmpdir}/minecraft_server.${remotebuild}.jar" "${serverfiles}/minecraft_server.jar" local exitcode=$? @@ -88,10 +89,10 @@ fn_update_minecraft_compare(){ echo -e "Update available" echo -e "* Local build: ${red}${localbuild}${default}" echo -e "* Remote build: ${green}${remotebuild}${default}" - echo -en "\n" if [ -n "${branch}" ]; then echo -e "* Branch: ${branch}" fi + echo -en "\n" fn_script_log_info "Update available" fn_script_log_info "Local build: ${localbuild}" fn_script_log_info "Remote build: ${remotebuild}" @@ -103,11 +104,14 @@ fn_update_minecraft_compare(){ if [ "${status}" == "0" ]; then exitbypass=1 fn_update_minecraft_dl - exitbypass=1 - command_start.sh - exitbypass=1 - command_stop.sh - fn_firstcommand_reset + if [ "${requirerestart}" == "1" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + fi # If server started. else fn_print_restart_warning diff --git a/lgsm/functions/update_minecraft_bedrock.sh b/lgsm/functions/update_minecraft_bedrock.sh index 34ada66b3..f4054ae00 100644 --- a/lgsm/functions/update_minecraft_bedrock.sh +++ b/lgsm/functions/update_minecraft_bedrock.sh @@ -1,13 +1,17 @@ #!/bin/bash -# LinuxGSM update_minecraft_bedrock.sh function +# LinuxGSM update_minecraft_bedrock.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles updating of Minecraft Bedrock servers. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +#random number for userAgent +randnum=$((1 + RANDOM % 5000)) + fn_update_minecraft_dl(){ - latestmcbuildurl=$(curl -Ls "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*zip') + latestmcbuildurl=$(curl -H "Accept-Encoding: identity" -H "Accept-Language: en" -Ls -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.${randnum}.212 Safari/537.36" "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*zip') fn_fetch_file "${latestmcbuildurl}" "" "" "" "${tmpdir}" "bedrock_server.${remotebuild}.zip" echo -e "Extracting to ${serverfiles}...\c" if [ "${firstcommandname}" == "INSTALL" ]; then @@ -34,6 +38,7 @@ fn_update_minecraft_localbuild(){ fn_print_dots "Checking local build: ${remotelocation}" # Uses log file to gather info. # Log is generated and cleared on startup but filled on shutdown. + requirerestart=1 localbuild=$(grep Version "${consolelogdir}"/* 2>/dev/null | tail -1 | sed 's/.*Version //') if [ -z "${localbuild}" ]; then fn_print_error "Checking local build: ${remotelocation}" @@ -77,7 +82,7 @@ fn_update_minecraft_localbuild(){ fn_update_minecraft_remotebuild(){ # Gets remote build info. - remotebuild=$(curl -Ls "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*' | sed 's/.*\///' | grep -Eo "[.0-9]+[0-9]") + remotebuild=$(curl -H "Accept-Encoding: identity" -H "Accept-Language: en" -Ls -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.${randnum}.212 Safari/537.36" "https://www.minecraft.net/en-us/download/server/bedrock/" | grep -o 'https://minecraft.azureedge.net/bin-linux/[^"]*' | sed 's/.*\///' | grep -Eo "[.0-9]+[0-9]") if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" # Checks if remotebuild variable has been set. @@ -122,11 +127,14 @@ fn_update_minecraft_compare(){ if [ "${status}" == "0" ]; then exitbypass=1 fn_update_minecraft_dl - exitbypass=1 - command_start.sh - exitbypass=1 - command_stop.sh - fn_firstcommand_reset + if [ "${requirerestart}" == "1" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + fi # If server started. else fn_print_restart_warning diff --git a/lgsm/functions/update_mta.sh b/lgsm/functions/update_mta.sh index 00ffc5a18..f49e54910 100644 --- a/lgsm/functions/update_mta.sh +++ b/lgsm/functions/update_mta.sh @@ -1,13 +1,14 @@ #!/bin/bash -# LinuxGSM update_mta.sh function +# LinuxGSM update_mta.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles updating of Multi Theft Auto servers. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_mta_dl(){ - fn_fetch_file "http://linux.mtasa.com/dl/multitheftauto_linux_x64.tar.gz" "" "" "" "${tmpdir}" "multitheftauto_linux_x64.tar.gz" "" "norun" "noforce" "nomd5" + fn_fetch_file "http://linux.mtasa.com/dl/multitheftauto_linux_x64.tar.gz" "" "" "" "${tmpdir}" "multitheftauto_linux_x64.tar.gz" "" "norun" "noforce" "nohash" mkdir "${tmpdir}/multitheftauto_linux_x64" fn_dl_extract "${tmpdir}" "multitheftauto_linux_x64.tar.gz" "${tmpdir}/multitheftauto_linux_x64" echo -e "copying to ${serverfiles}...\c" @@ -30,6 +31,7 @@ fn_update_mta_localbuild(){ fn_print_dots "Checking local build: ${remotelocation}" # Uses log file to gather info. # Gives time for log file to generate. + requirerestart=1 if [ ! -f "${serverfiles}/mods/deathmatch/logs/server.log" ]; then fn_print_error "Checking local build: ${remotelocation}" fn_print_error_nl "Checking local build: ${remotelocation}: no log files containing version info" @@ -151,11 +153,14 @@ fn_update_mta_compare(){ if [ "${status}" == "0" ]; then exitbypass=1 fn_update_mta_dl - exitbypass=1 - command_start.sh - exitbypass=1 - command_stop.sh - fn_firstcommand_reset + if [ "${requirerestart}" == "1" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + fi # If server started. else fn_print_restart_warning diff --git a/lgsm/functions/update_mumble.sh b/lgsm/functions/update_mumble.sh index 76ae837f3..8a54e7df2 100644 --- a/lgsm/functions/update_mumble.sh +++ b/lgsm/functions/update_mumble.sh @@ -1,13 +1,14 @@ #!/bin/bash -# LinuxGSM update_mumble.sh function +# LinuxGSM update_mumble.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles updating of Mumble servers. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_update_mumble_dl(){ - fn_fetch_file "https://github.com/mumble-voip/mumble/releases/download/${remotebuild}/murmur-static_${mumblearch}-${remotebuild}.tar.bz2" "" "" "" "${tmpdir}" "murmur-static_${mumblearch}-${remotebuild}.tar.bz2" "" "norun" "noforce" "nomd5" + fn_fetch_file "https://github.com/mumble-voip/mumble/releases/download/${remotebuild}/murmur-static_${mumblearch}-${remotebuild}.tar.bz2" "" "" "" "${tmpdir}" "murmur-static_${mumblearch}-${remotebuild}.tar.bz2" "" "norun" "noforce" "nohash" fn_dl_extract "${tmpdir}" "murmur-static_${mumblearch}-${remotebuild}.tar.bz2" "${tmpdir}" echo -e "copying to ${serverfiles}...\c" cp -R "${tmpdir}/murmur-static_${mumblearch}-${remotebuild}/"* "${serverfiles}" @@ -87,11 +88,14 @@ fn_update_mumble_compare(){ if [ "${status}" == "0" ]; then exitbypass=1 fn_update_mumble_dl - exitbypass=1 - command_start.sh - exitbypass=1 - command_stop.sh - fn_firstcommand_reset + if [ "${requirerestart}" == "1" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + fi # If server started. else fn_print_restart_warning diff --git a/lgsm/functions/update_papermc.sh b/lgsm/functions/update_papermc.sh new file mode 100644 index 000000000..2e669d93d --- /dev/null +++ b/lgsm/functions/update_papermc.sh @@ -0,0 +1,160 @@ +#!/bin/bash +# LinuxGSM update_papermc.sh function +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Handles updating of PaperMC and Waterfall servers. + +local commandname="UPDATE" +local commandaction="Update" +local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_update_papermc_dl(){ + # get build info + builddata=$(curl -s "https://${remotelocation}/api/v2/projects/${paperproject}/versions/${paperversion}/builds/${remotebuild}" | jq '.downloads' ) + buildname=$(echo -e "${builddata}" | jq -r '.application.name') + buildsha256=$(echo -e "${builddata}" | jq -r '.application.sha256') + + fn_fetch_file "https://${remotelocation}/api/v2/projects/${paperproject}/versions/${paperversion}/builds/${remotebuild}/downloads/${buildname}" "" "" "" "${tmpdir}" "${buildname}" "nochmodx" "norun" "force" "${buildsha256}" + + echo -e "copying to ${serverfiles}...\c" + cp -f "${tmpdir}/${buildname}" "${serverfiles}/${executable#./}" + local exitcode=$? + if [ "${exitcode}" == "0" ]; then + fn_print_ok_eol_nl + fn_script_log_pass "Copying to ${serverfiles}" + chmod u+x "${serverfiles}/${executable#./}" + echo "${remotebuild}" > "${localversionfile}" + fn_clear_tmp + else + fn_print_fail_eol_nl + fn_script_log_fatal "Copying to ${serverfiles}" + core_exit.sh + fi +} + +fn_update_papermc_localbuild(){ + # Gets local build info. + fn_print_dots "Checking for update: ${remotelocation}: checking local build" + sleep 0.5 + + if [ ! -f "${localversionfile}" ]; then + fn_print_error_nl "Checking for update: ${remotelocation}: checking local build: no local build files" + fn_script_log_error "No local build file found" + else + localbuild=$(head -n 1 "${localversionfile}") + fi + + if [ -z "${localbuild}" ]; then + localbuild="0" + fn_print_error "Checking for update: ${remotelocation}: waiting for local build: missing local build info" + fn_script_log_error "Missing local build info, Set localbuild to 0" + else + fn_print_ok "Checking for update: ${remotelocation}: checking local build" + fn_script_log_pass "Checking local build" + fi + sleep 0.5 +} + +fn_update_papermc_remotebuild(){ + # Gets remote build info. + remotebuild=$(curl -s "https://${remotelocation}/api/v2/projects/${paperproject}/versions/${paperversion}" | jq -r '.builds[-1]') + + # Checks if remotebuild variable has been set. + if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then + fn_print_failure "Unable to get remote build" + fn_script_log_fatal "Unable to get remote build" + core_exit.sh + else + fn_print_ok "Got build for version ${paperversion}" + fn_script_log "Got build for version ${paperversion}" + fi +} + +fn_update_papermc_compare(){ + fn_print_dots "Checking for update: ${remotelocation}" + sleep 0.5 + if [ "${localbuild}" != "${remotebuild}" ]||[ "${forceupdate}" == "1" ]; then + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "Update available for version ${paperversion}" + echo -e "* Local build: ${red}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuild}${default}" + fn_script_log_info "Update available for version ${paperversion}" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuild}" + fn_script_log_info "${localbuild} > ${remotebuild}" + echo -en "\n" + echo -en "applying update.\r" + echo -en "\n" + + unset updateonstart + + check_status.sh + # If server stopped. + if [ "${status}" == "0" ]; then + fn_update_papermc_dl + # If server started. + else + exitbypass=1 + command_stop.sh + exitbypass=1 + fn_update_papermc_dl + exitbypass=1 + command_start.sh + fi + alert="update" + alert.sh + else + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "No update available for version ${paperversion}" + echo -e "* Local build: ${green}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuild}${default}" + fn_script_log_info "No update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuild}" + fi +} + +# The location where the builds are checked and downloaded. +remotelocation="papermc.io" + +if [ "${shortname}" == "pmc" ]; then + paperproject="paper" +elif [ "${shortname}" == "wmc" ]; then + paperproject="waterfall" +fi + +localversionfile="${datadir}/${paperproject}-version" + +# check if datadir was created, if not create it +if [ ! -d "${datadir}" ]; then + mkdir -p "${datadir}" +fi + +# check version if the user did set one and check it +if [ "${mcversion}" == "latest" ]; then + paperversion=$(curl -s "https://${remotelocation}/api/v2/projects/${paperproject}" | jq -r '.versions[-1]') +else + # check if version there for the download from the api + paperversion=$(curl -s "https://${remotelocation}/api/v2/projects/${paperproject}" | jq -r -e --arg mcversion "${mcversion}" '.versions[]|select(. == $mcversion)') + if [ -z "${paperversion}" ]; then + # user passed version does not exist + fn_print_error_nl "Version ${mcversion} not available from ${remotelocation}" + fn_script_log_error "Version ${mcversion} not available from ${remotelocation}" + core_exit.sh + fi +fi + +if [ "${firstcommandname}" == "INSTALL" ]; then + fn_update_papermc_remotebuild + fn_update_papermc_dl +else + fn_print_dots "Checking for update: ${remotelocation}" + fn_script_log_info "Checking for update: ${remotelocation}" + sleep 0.5 + fn_update_papermc_localbuild + fn_update_papermc_remotebuild + fn_update_papermc_compare +fi diff --git a/lgsm/functions/update_steamcmd.sh b/lgsm/functions/update_steamcmd.sh index 28496f7d7..85bacb899 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -1,196 +1,14 @@ #!/bin/bash -# LinuxGSM update_steamcmd.sh function +# LinuxGSM update_steamcmd.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles updating using SteamCMD. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -fn_update_steamcmd_localbuild(){ - # Gets local build info. - fn_print_dots "Checking local build: ${remotelocation}" - fn_appmanifest_check - # Uses appmanifest to find local build. - localbuild=$(grep buildid "${appmanifestfile}" | tr '[:blank:]"' ' ' | tr -s ' ' | cut -d\ -f3) - - # Set branch to public if no custom branch. - if [ -z "${branch}" ]; then - branch="public" - fi - - # Checks if localbuild variable has been set. - if [ -z "${localbuild}" ]||[ "${localbuild}" == "null" ]; then - fn_print_fail "Checking local build: ${remotelocation}" - fn_script_log_fatal "Checking local build" - core_exit.sh - else - fn_print_ok "Checking local build: ${remotelocation}" - fn_script_log_pass "Checking local build" - fi -} - -fn_update_steamcmd_remotebuild(){ - # Gets remote build info. - if [ -d "${steamcmddir}" ]; then - cd "${steamcmddir}" || exit - fi - - # Removes appinfo.vdf as a fix for not always getting up to date version info from SteamCMD. - if [ "$(find "${HOME}" -type f -name "appinfo.vdf" | wc -l)" -ne "0" ]; then - find "${HOME}" -type f -name "appinfo.vdf" -exec rm -f {} \; - fi - - if [ -n "${branch}" ]&&[ -n "${betapassword}" ]; then - remotebuild=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" -beta "${branch}" -betapassword "${betapassword}" +quit | sed '1,/branches/d' | sed "1,/${branch}/d" | grep -m 1 buildid | tr -cd '[:digit:]') - elif [ -n "${branch}" ]; then - remotebuild=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" -beta "${branch}" +quit | sed '1,/branches/d' | sed "1,/${branch}/d" | grep -m 1 buildid | tr -cd '[:digit:]') - else - remotebuild=$(${steamcmdcommand} +login "${steamuser}" "${steampass}" +app_info_update 1 +app_info_print "${appid}" +quit | sed '1,/branches/d' | sed "1,/${branch}/d" | grep -m 1 buildid | tr -cd '[:digit:]') - fi - - if [ "${firstcommandname}" != "INSTALL" ]; then - fn_print_dots "Checking remote build: ${remotelocation}" - # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then - fn_print_fail "Checking remote build: ${remotelocation}" - fn_script_log_fatal "Checking remote build" - core_exit.sh - else - fn_print_ok "Checking remote build: ${remotelocation}" - fn_script_log_pass "Checking remote build" - fi - else - # Checks if remotebuild variable has been set. - if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then - fn_print_failure "Unable to get remote build" - fn_script_log_fatal "Unable to get remote build" - core_exit.sh - fi - fi -} - -fn_update_steamcmd_compare(){ - fn_print_dots "Checking for update: ${remotelocation}" - if [ "${localbuild}" != "${remotebuild}" ]; then - fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "Update available" - echo -e "* Local build: ${red}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuild}${default}" - if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" - fi - if [ -n "${betapassword}" ]; then - echo -e "* Branch password: ${betapassword}" - fi - echo -e "https://steamdb.info/app/${appid}/" - echo -en "\n" - fn_script_log_info "Update available" - fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuild}" - if [ -n "${branch}" ]; then - fn_script_log_info "Branch: ${branch}" - fi - if [ -n "${betapassword}" ]; then - fn_script_log_info "Branch password: ${betapassword}" - fi - fn_script_log_info "${localbuild} > ${remotebuild}" - - unset updateonstart - check_status.sh - # If server stopped. - if [ "${status}" == "0" ]; then - fn_dl_steamcmd - # If server started. - else - fn_print_restart_warning - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - exitbypass=1 - fn_dl_steamcmd - exitbypass=1 - command_start.sh - fn_firstcommand_reset - fi - unset exitbypass - date +%s > "${lockdir}/lastupdate.lock" - alert="update" - alert.sh - else - fn_print_ok_nl "Checking for update: ${remotelocation}" - echo -en "\n" - echo -e "No update available" - echo -e "* Local build: ${green}${localbuild}${default}" - echo -e "* Remote build: ${green}${remotebuild}${default}" - if [ -n "${branch}" ]; then - echo -e "* Branch: ${branch}" - fi - if [ -n "${betapassword}" ]; then - echo -e "* Branch password: ${betapassword}" - fi - echo -e "https://steamdb.info/app/${appid}/" - echo -en "\n" - fn_script_log_info "No update available" - fn_script_log_info "Local build: ${localbuild}" - fn_script_log_info "Remote build: ${remotebuild}" - if [ -n "${branch}" ]; then - fn_script_log_info "Branch: ${branch}" - fi - if [ -n "${betapassword}" ]; then - fn_script_log_info "Branch password: ${betapassword}" - fi - fi -} - -fn_appmanifest_info(){ - appmanifestfile=$(find "${serverfiles}" -type f -name "appmanifest_${appid}.acf") - appmanifestfilewc=$(find "${serverfiles}" -type f -name "appmanifest_${appid}.acf" | wc -l) -} - -fn_appmanifest_check(){ - fn_appmanifest_info - # Multiple or no matching appmanifest files may sometimes be present. - # This error is corrected if required. - if [ "${appmanifestfilewc}" -ge "2" ]; then - fn_print_error "Multiple appmanifest_${appid}.acf files found" - fn_script_log_error "Multiple appmanifest_${appid}.acf files found" - fn_print_dots "Removing x${appmanifestfilewc} appmanifest_${appid}.acf files" - for appfile in ${appmanifestfile}; do - rm -f "${appfile:?}" - done - appmanifestfilewc1="${appmanifestfilewc}" - fn_appmanifest_info - # if error can not be resolved. - if [ "${appmanifestfilewc}" -ge "2" ]; then - fn_print_fail "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files" - fn_script_log_fatal "Unable to remove x${appmanifestfilewc} appmanifest_${appid}.acf files" - echo -e "* Check user permissions" - for appfile in ${appmanifestfile}; do - echo -e " ${appfile}" - done - core_exit.sh - else - fn_print_ok "Removed x${appmanifestfilewc1} appmanifest_${appid}.acf files" - fn_script_log_pass "Removed x${appmanifestfilewc1} appmanifest_${appid}.acf files" - fn_print_info_nl "Forcing update to correct issue" - fn_script_log_info "Forcing update to correct issue" - fn_dl_steamcmd - fi - elif [ "${appmanifestfilewc}" -eq "0" ]; then - fn_print_error_nl "No appmanifest_${appid}.acf found" - fn_script_log_error "No appmanifest_${appid}.acf found" - fn_print_info_nl "Forcing update to correct issue" - fn_script_log_info "Forcing update to correct issue" - fn_dl_steamcmd - fn_appmanifest_info - if [ "${appmanifestfilewc}" -eq "0" ]; then - fn_print_fail_nl "Still no appmanifest_${appid}.acf found" - fn_script_log_fatal "Still no appmanifest_${appid}.acf found" - core_exit.sh - fi - fi -} +# init steamcmd functions +core_steamcmd.sh # The location where the builds are checked and downloaded. remotelocation="SteamCMD" diff --git a/lgsm/functions/update_ts3.sh b/lgsm/functions/update_ts3.sh index b72979ff4..782a138d1 100644 --- a/lgsm/functions/update_ts3.sh +++ b/lgsm/functions/update_ts3.sh @@ -1,6 +1,7 @@ #!/bin/bash -# LinuxGSM command_ts3.sh function +# LinuxGSM command_ts3.sh module # Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles updating of Teamspeak 3 servers. @@ -12,7 +13,7 @@ fn_update_ts3_dl(){ elif [ "${ts3arch}" == "x86" ]; then remotebuildurl=$(curl -s 'https://www.teamspeak.com/versions/server.json' | jq -r '.linux.x86.mirrors."teamspeak.com"') fi - fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "teamspeak3-server_linux_${ts3arch}-${remotebuild}.tar.bz2" "" "norun" "noforce" "nomd5" + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "teamspeak3-server_linux_${ts3arch}-${remotebuild}.tar.bz2" "" "norun" "noforce" "nohash" fn_dl_extract "${tmpdir}" "teamspeak3-server_linux_${ts3arch}-${remotebuild}.tar.bz2" "${tmpdir}" echo -e "copying to ${serverfiles}...\c" cp -R "${tmpdir}/teamspeak3-server_linux_${ts3arch}/"* "${serverfiles}" @@ -34,6 +35,7 @@ fn_update_ts3_localbuild(){ fn_print_dots "Checking local build: ${remotelocation}" # Uses log file to gather info. # Gives time for log file to generate. + requirerestart=1 if [ ! -d "${serverfiles}/logs" ]||[ -z "$(find "${serverfiles}/logs/"* -name 'ts3server*_0.log' 2> /dev/null)" ]; then fn_print_error "Checking local build: ${remotelocation}" fn_print_error_nl "Checking local build: ${remotelocation}: no log files containing version info" @@ -101,9 +103,9 @@ fn_update_ts3_localbuild(){ fn_update_ts3_remotebuild(){ # Gets remote build info. - if [ "${arch}" == "x86_64" ]; then + if [ "${ts3arch}" == "amd64" ]; then remotebuild=$(curl -s "https://www.teamspeak.com/versions/server.json" | jq -r '.linux.x86_64.version') - elif [ "${arch}" == "x86" ]; then + elif [ "${ts3arch}" == "x86" ]; then remotebuild=$(curl -s "https://www.teamspeak.com/versions/server.json" | jq -r '.linux.x86.version') fi if [ "${firstcommandname}" != "INSTALL" ]; then @@ -149,11 +151,14 @@ fn_update_ts3_compare(){ if [ "${status}" == "0" ]; then exitbypass=1 fn_update_ts3_dl - exitbypass=1 - command_start.sh - exitbypass=1 - command_stop.sh - fn_firstcommand_reset + if [ "${requirerestart}" == "1" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + fi # If server started. else fn_print_restart_warning diff --git a/lgsm/functions/update_vintagestory.sh b/lgsm/functions/update_vintagestory.sh new file mode 100755 index 000000000..b2231c66e --- /dev/null +++ b/lgsm/functions/update_vintagestory.sh @@ -0,0 +1,148 @@ +#!/bin/bash +# LinuxGSM update_vintagestory.sh module +# Author: Daniel Gibbs +# Contributors: http://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Handles updating of Vintage Story servers. + +functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +fn_update_vs_dl(){ + # get version info for download + remotebuildresponse=$(curl -s "${apiurl}" | jq --arg version "${remotebuild}" '.[$version].server') + remotebuildfile=$(echo -e "${remotebuildresponse}" | jq -r '.filename') + remotebuildlink=$(echo -e "${remotebuildresponse}" | jq -r '.urls.cdn') + remotebuildmd5=$(echo -e "${remotebuildresponse}" | jq -r '.md5') + + # Download and extract files to serverfiles + fn_fetch_file "${remotebuildlink}" "" "" "" "${tmpdir}" "${remotebuildfile}" "nochmodx" "norun" "force" "${remotebuildmd5}" + fn_dl_extract "${tmpdir}" "${remotebuildfile}" "${serverfiles}" + fn_clear_tmp +} + +fn_update_vs_localbuild(){ + # Gets local build info. + fn_print_dots "Checking local build: ${remotelocation}" + # Uses executable to find local build. + cd "${executabledir}" || exit + if [ -f "${executable}" ]; then + localbuild="$(${preexecutable} ${executable} --version | sed '/^[[:space:]]*$/d')" + fn_print_ok "Checking local build: ${remotelocation}" + fn_script_log_pass "Checking local build" + else + localbuild="0" + fn_print_error "Checking local build: ${remotelocation}" + fn_script_log_error "Checking local build" + fi +} + +fn_update_vs_remotebuild(){ + if [ "${branch}" == "stable" ]; then + remotebuild=$(curl -s "${apiurl}" | jq -r '[ to_entries[] ] | .[].key' | grep -Ev "\-rc|\-pre" | sort -r -V | head -1) + else + remotebuild=$(curl -s "${apiurl}" | jq -r '[ to_entries[] ] | .[].key' | grep -E "\-rc|\-pre" | sort -r -V | head -1) + fi + + if [ "${firstcommandname}" != "INSTALL" ]; then + fn_print_dots "Checking remote build: ${remotelocation}" + # Checks if remotebuild variable has been set. + if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then + fn_print_fail "Checking remote build: ${remotelocation}" + fn_script_log_fatal "Checking remote build" + core_exit.sh + else + fn_print_ok "Checking remote build: ${remotelocation}" + fn_script_log_pass "Checking remote build" + fi + else + # Checks if remotebuild variable has been set. + if [ -z "${remotebuild}" ]||[ "${remotebuild}" == "null" ]; then + fn_print_failure "Unable to get remote build" + fn_script_log_fatal "Unable to get remote build" + core_exit.sh + fi + fi +} + +fn_update_vs_compare(){ + # Removes dots so if statement can compare version numbers. + fn_print_dots "Checking for update: ${remotelocation}" + if [ "${localbuild}" != "${remotebuild}" ]||[ "${forceupdate}" == "1" ]; then + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "Update available" + echo -e "* Local build: ${red}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuild}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + echo -en "\n" + fn_script_log_info "Update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuild}" + fn_script_log_info "${localbuild} > ${remotebuild}" + + unset updateonstart + check_status.sh + # If server stopped. + if [ "${status}" == "0" ]; then + exitbypass=1 + fn_update_vs_dl + if [ "${requirerestart}" == "1" ]; then + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + fi + # If server started. + else + fn_print_restart_warning + exitbypass=1 + command_stop.sh + fn_firstcommand_reset + exitbypass=1 + fn_update_vs_dl + exitbypass=1 + command_start.sh + fn_firstcommand_reset + fi + unset exitbypass + date +%s > "${lockdir}/lastupdate.lock" + alert="update" + alert.sh + else + fn_print_ok_nl "Checking for update: ${remotelocation}" + echo -en "\n" + echo -e "No update available" + echo -e "* Local build: ${green}${localbuild}${default}" + echo -e "* Remote build: ${green}${remotebuild}${default}" + if [ -n "${branch}" ]; then + echo -e "* Branch: ${branch}" + fi + echo -en "\n" + fn_script_log_info "No update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuild}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + fi +} + +# The location where the builds are checked and downloaded. +remotelocation="vintagestory.at" +apiurl="http://api.${remotelocation}/stable-unstable.json" + +if [ "${firstcommandname}" == "INSTALL" ]; then + fn_update_vs_remotebuild + fn_update_vs_dl +else + fn_print_dots "Checking for update" + fn_print_dots "Checking for update: ${remotelocation}" + fn_script_log_info "Checking for update: ${remotelocation}" + fn_update_vs_localbuild + fn_update_vs_remotebuild + fn_update_vs_compare +fi diff --git a/linuxgsm.sh b/linuxgsm.sh index 18cd88326..462ea09ad 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Project: Game Server Managers - LinuxGSM +# Project: Linux Game Server Managers - LinuxGSM # Author: Daniel Gibbs # License: MIT License, Copyright (c) 2020 Daniel Gibbs # Purpose: Linux Game Server Management Script @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.6.1" +version="v21.2.5" shortname="core" gameservername="core" commandname="CORE" @@ -42,6 +42,7 @@ configdir="${lgsmdir}/config-lgsm" configdirserver="${configdir}/${gameservername}" configdirdefault="${lgsmdir}/config-default" userinput="${1}" +userinput2="${2}" ## GitHub Branch Select # Allows for the use of different function files @@ -338,11 +339,11 @@ if [ "${shortname}" == "core" ]; then if [ "${userinput}" == "list" ]||[ "${userinput}" == "l" ]; then { - tail -n +2 "${serverlist}" | awk -F "," '{print $2 "\t" $3}' + tail -n +1 "${serverlist}" | awk -F "," '{print $2 "\t" $3}' } | column -s $'\t' -t | more exit elif [ "${userinput}" == "install" ]||[ "${userinput}" == "i" ]; then - tail -n +2 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' > "${serverlistmenu}" + tail -n +1 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' > "${serverlistmenu}" fn_install_menu result "LinuxGSM" "Select game server to install." "${serverlistmenu}" userinput="${result}" fn_server_info @@ -401,32 +402,106 @@ else fi fi fi + fi + # Load the IP details before the first config is loaded. + check_ip.sh + # Configs have to be loaded twice to allow start startparameters to pick up all vars + # shellcheck source=/dev/null + source "${configdirserver}/_default.cfg" + # Load the common.cfg config. If missing download it. + if [ ! -f "${configdirserver}/common.cfg" ]; then + fn_fetch_config "lgsm/config-default/config-lgsm" "common-template.cfg" "${configdirserver}" "common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5" # shellcheck source=/dev/null - source "${configdirserver}/_default.cfg" - # Load the common.cfg config. If missing download it. - if [ ! -f "${configdirserver}/common.cfg" ]; then - fn_fetch_config "lgsm/config-default/config-lgsm" "common-template.cfg" "${configdirserver}" "common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5" - # shellcheck source=/dev/null - source "${configdirserver}/common.cfg" - else + source "${configdirserver}/common.cfg" + else + # shellcheck source=/dev/null + source "${configdirserver}/common.cfg" + fi + # Load the secrets-common.cfg config. If missing download it. + if [ ! -f "${configdirserver}/secrets-common.cfg" ]; then + fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-common-template.cfg" "${configdirserver}" "secrets-common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5" + # shellcheck source=/dev/null + source "${configdirserver}/secrets-common.cfg" + else + # shellcheck source=/dev/null + source "${configdirserver}/secrets-common.cfg" + fi + # Load the instance.cfg config. If missing download it. + if [ ! -f "${configdirserver}/${selfname}.cfg" ]; then + fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" + # shellcheck source=/dev/null + source "${configdirserver}/${selfname}.cfg" + else + # shellcheck source=/dev/null + source "${configdirserver}/${selfname}.cfg" + fi + # Load the secrets-instance.cfg config. If missing download it. + if [ ! -f "${configdirserver}/secrets-${selfname}.cfg" ]; then + fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-instance-template.cfg" "${configdirserver}" "secrets-${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" + # shellcheck source=/dev/null + source "${configdirserver}/secrets-${selfname}.cfg" + else + # shellcheck source=/dev/null + source "${configdirserver}/secrets-${selfname}.cfg" + fi + + # Reloads start parameter to ensure all vars in startparameters are set. + # Will reload the last defined startparameter. + fn_reload_startparameters(){ + # reload Wurm config. + if [ "${shortname}" == "wurm" ]; then # shellcheck source=/dev/null - source "${configdirserver}/common.cfg" + source "${servercfgfullpath}" fi - # Load the instance.cfg config. If missing download it. - if [ ! -f "${configdirserver}/${selfname}.cfg" ]; then - fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" - # shellcheck source=/dev/null - source "${configdirserver}/${selfname}.cfg" - else - # shellcheck source=/dev/null - source "${configdirserver}/${selfname}.cfg" + # reload startparameters. + if grep -qE "^[[:blank:]]*startparameters=" "${configdirserver}/secrets-${selfname}.cfg"; then + eval startparameters="$(sed -nr 's/^ *startparameters=(.*)$/\1/p' "${configdirserver}/secrets-${selfname}.cfg")" + elif grep -qE "^[[:blank:]]*startparameters=" "${configdirserver}/${selfname}.cfg"; then + eval startparameters="$(sed -nr 's/^ *startparameters=(.*)$/\1/p' "${configdirserver}/${selfname}.cfg")" + elif grep -qE "^[[:blank:]]*startparameters=" "${configdirserver}/secrets-common.cfg"; then + eval startparameters="$(sed -nr 's/^ *startparameters=(.*)$/\1/p' "${configdirserver}/secrets-common.cfg")" + elif grep -qE "^[[:blank:]]*startparameters=" "${configdirserver}/common.cfg"; then + eval startparameters="$(sed -nr 's/^ *startparameters=(.*)$/\1/p' "${configdirserver}/common.cfg")" + elif grep -qE "^[[:blank:]]*startparameters=" "${configdirserver}/_default.cfg"; then + eval startparameters="$(sed -nr 's/^ *startparameters=(.*)$/\1/p' "${configdirserver}/_default.cfg")" + fi + +# reload preexecutable. + if grep -qE "^[[:blank:]]*preexecutable=" "${configdirserver}/secrets-${selfname}.cfg"; then + eval preexecutable="$(sed -nr 's/^ *preexecutable=(.*)$/\1/p' "${configdirserver}/secrets-${selfname}.cfg")" + elif grep -qE "^[[:blank:]]*preexecutable=" "${configdirserver}/${selfname}.cfg"; then + eval preexecutable="$(sed -nr 's/^ *preexecutable=(.*)$/\1/p' "${configdirserver}/${selfname}.cfg")" + elif grep -qE "^[[:blank:]]*preexecutable=" "${configdirserver}/secrets-common.cfg"; then + eval preexecutable="$(sed -nr 's/^ *preexecutable=(.*)$/\1/p' "${configdirserver}/secrets-common.cfg")" + elif grep -qE "^[[:blank:]]*preexecutable=" "${configdirserver}/common.cfg"; then + eval preexecutable="$(sed -nr 's/^ *preexecutable=(.*)$/\1/p' "${configdirserver}/common.cfg")" + elif grep -qE "^[[:blank:]]*preexecutable=" "${configdirserver}/_default.cfg"; then + eval preexecutable="$(sed -nr 's/^ *preexecutable=(.*)$/\1/p' "${configdirserver}/_default.cfg")" fi - # Load the linuxgsm.sh in to tmpdir. If missing download it. - if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then - fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "chmodx" "norun" "noforcedl" "nomd5" + # For legacy configs that still use parms= 15.03.21 + if grep -qE "^[[:blank:]]*parms=" "${configdirserver}/secrets-${selfname}.cfg"; then + eval parms="$(sed -nr 's/^ *parms=(.*)$/\1/p' "${configdirserver}/secrets-${selfname}.cfg")" + elif grep -qE "^[[:blank:]]*parms=" "${configdirserver}/${selfname}.cfg"; then + eval parms="$(sed -nr 's/^ *parms=(.*)$/\1/p' "${configdirserver}/${selfname}.cfg")" + elif grep -qE "^[[:blank:]]*parms=" "${configdirserver}/secrets-common.cfg"; then + eval parms="$(sed -nr 's/^ *parms=(.*)$/\1/p' "${configdirserver}/secrets-common.cfg")" + elif grep -qE "^[[:blank:]]*parms=" "${configdirserver}/common.cfg"; then + eval parms="$(sed -nr 's/^ *parms=(.*)$/\1/p' "${configdirserver}/common.cfg")" + elif grep -qE "^[[:blank:]]*parms=" "${configdirserver}/_default.cfg"; then + eval parms="$(sed -nr 's/^ *parms=(.*)$/\1/p' "${configdirserver}/_default.cfg")" fi + + if [ -n "${parms}" ]; then + startparameters="${parms}" + fi + } + + # Load the linuxgsm.sh in to tmpdir. If missing download it. + if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then + fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "chmodx" "norun" "noforcedl" "nomd5" fi + # Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off. fn_ansi_loader # Prevents running of core_exit.sh for Travis-CI. diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh index 1730f7ba1..9b47f763d 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.6.1" +version="v21.2.5" shortname="fctr" gameservername="fctrserver" commandname="CORE" @@ -60,7 +60,7 @@ githubbranch="${TRAVIS_BRANCH}" # Core function that is required first. core_functions.sh(){ functionfile="${FUNCNAME[0]}" - fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" + fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" } # Bootstrap @@ -337,7 +337,7 @@ fi # LinuxGSM installer mode. if [ "${shortname}" == "core" ]; then # Download the latest serverlist. This is the complete list of all supported servers. - fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" + fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nohash" if [ ! -f "${serverlist}" ]; then echo -e "[ FAIL ] serverlist.csv could not be loaded." exit 1 @@ -382,7 +382,7 @@ else # Load the default config. If missing download it. If changed reload it. if [ ! -f "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" ]; then mkdir -p "${configdirdefault}/config-lgsm/${gameservername}" - fn_fetch_config "lgsm/config-default/config-lgsm/${gameservername}" "_default.cfg" "${configdirdefault}/config-lgsm/${gameservername}" "_default.cfg" "nochmodx" "norun" "noforcedl" "nomd5" + fn_fetch_config "lgsm/config-default/config-lgsm/${gameservername}" "_default.cfg" "${configdirdefault}/config-lgsm/${gameservername}" "_default.cfg" "nochmodx" "norun" "noforcedl" "nohash" fi if [ ! -f "${configdirserver}/_default.cfg" ]; then mkdir -p "${configdirserver}" @@ -414,26 +414,44 @@ else source "${configdirserver}/_default.cfg" # Load the common.cfg config. If missing download it. if [ ! -f "${configdirserver}/common.cfg" ]; then - fn_fetch_config "lgsm/config-default/config-lgsm" "common-template.cfg" "${configdirserver}" "common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5" + fn_fetch_config "lgsm/config-default/config-lgsm" "common-template.cfg" "${configdirserver}" "common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nohash" # shellcheck source=/dev/null source "${configdirserver}/common.cfg" else # shellcheck source=/dev/null source "${configdirserver}/common.cfg" fi + # Load the secrets-common.cfg config. If missing download it. + if [ ! -f "${configdirserver}/secrets-common.cfg" ]; then + fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-common-template.cfg" "${configdirserver}" "secrets-common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nohash" + # shellcheck source=/dev/null + source "${configdirserver}/secrets-common.cfg" + else + # shellcheck source=/dev/null + source "${configdirserver}/secrets-common.cfg" + fi # Load the instance.cfg config. If missing download it. if [ ! -f "${configdirserver}/${selfname}.cfg" ]; then - fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" + fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nohash" # shellcheck source=/dev/null source "${configdirserver}/${selfname}.cfg" else # shellcheck source=/dev/null source "${configdirserver}/${selfname}.cfg" fi + # Load the secrets-instance.cfg config. If missing download it. + if [ ! -f "${configdirserver}/secrets-${selfname}.cfg" ]; then + fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-instance-template.cfg" "${configdirserver}" "secrets-${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nohash" + # shellcheck source=/dev/null + source "${configdirserver}/secrets-${selfname}.cfg" + else + # shellcheck source=/dev/null + source "${configdirserver}/secrets-${selfname}.cfg" + fi # Load the linuxgsm.sh in to tmpdir. If missing download it. if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then - fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "chmodx" "norun" "noforcedl" "nomd5" + fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "chmodx" "norun" "noforcedl" "nohash" fi fi # Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off. @@ -448,9 +466,9 @@ fi fn_currentstatus_tmux(){ check_status.sh if [ "${status}" != "0" ]; then - currentstatus="ONLINE" + currentstatus="STARTED" else - currentstatus="OFFLINE" + currentstatus="STOPPED" fi } @@ -465,7 +483,7 @@ fn_setstatus(){ fn_currentstatus_tmux echo -en "New status: ${currentstatus}\\r" - if [ "${requiredstatus}" == "ONLINE" ]; then + if [ "${requiredstatus}" == "STARTED" ]; then (command_start.sh > /dev/null 2>&1) else (command_stop.sh > /dev/null 2>&1) @@ -731,7 +749,7 @@ echo -e "=================================" echo -e "Description:" echo -e "start ${gamename} server." echo -e "Command: ./${gameservername} start" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -750,7 +768,7 @@ echo -e "=================================" echo -e "Description:" echo -e "start ${gamename} server while already running." echo -e "Command: ./${gameservername} start" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -769,7 +787,7 @@ echo -e "=================================" echo -e "Description:" echo -e "will update server on start." echo -e "Command: ./${gameservername} start" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -788,7 +806,7 @@ echo -e "=================================" echo -e "Description:" echo -e "stop ${gamename} server." echo -e "Command: ./${gameservername} stop" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -807,7 +825,7 @@ echo -e "=================================" echo -e "Description:" echo -e "stop ${gamename} server while already stopped." echo -e "Command: ./${gameservername} stop" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -826,7 +844,7 @@ echo -e "=================================" echo -e "Description:" echo -e "restart ${gamename}." echo -e "Command: ./${gameservername} restart" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -845,7 +863,7 @@ echo -e "=================================" echo -e "Description:" echo -e "restart ${gamename} while already stopped." echo -e "Command: ./${gameservername} restart" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -868,7 +886,7 @@ echo -e "=================================" echo -e "Description:" echo -e "check for updates." echo -e "Command: ./${gameservername} update" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -888,7 +906,7 @@ echo -e "Description:" echo -e "update LinuxGSM." echo -e "" echo -e "Command: ./jc2server update-lgam" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -915,7 +933,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor server while already running." echo -e "Command: ./${gameservername} monitor" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -934,7 +952,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor while server is offline with lockfile." echo -e "Command: ./${gameservername} monitor" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus fn_print_info_nl "creating lockfile." date '+%s' > "${lockdir}/${selfname}.lock" @@ -957,7 +975,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor while server is offline with no lockfile." echo -e "Command: ./${gameservername} monitor" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -976,7 +994,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor while server is offline with no lockfile." echo -e "Command: ./${gameservername} test-alert" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -999,7 +1017,7 @@ echo -e "=================================" echo -e "Description:" echo -e "display details." echo -e "Command: ./${gameservername} details" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1018,7 +1036,7 @@ echo -e "=================================" echo -e "Description:" echo -e "post details." echo -e "Command: ./${gameservername} postdetails" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1041,7 +1059,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run a backup." echo -e "Command: ./${gameservername} backup" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus echo -e "test de-activated until issue #1839 fixed" #(command_backup.sh) @@ -1060,7 +1078,7 @@ echo -e "=================================" echo -e "Description:" echo -e "detect glibc." echo -e "Command: ./${gameservername} detect-glibc" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1079,7 +1097,7 @@ echo -e "=================================" echo -e "Description:" echo -e "detect ldd." echo -e "Command: ./${gameservername} detect-ldd" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1098,7 +1116,7 @@ echo -e "=================================" echo -e "Description:" echo -e "detect dependencies." echo -e "Command: ./${gameservername} detect-deps" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1117,7 +1135,7 @@ echo -e "=================================" echo -e "Description:" echo -e "raw query output." echo -e "Command: ./${gameservername} query-raw" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1141,7 +1159,7 @@ echo -e "=================================" echo -e "Description:" echo -e "donate." echo -e "Command: ./${gameservername} donate" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1159,7 +1177,7 @@ echo -e "=================================" echo -e "Server Tests - Complete!" echo -e "Using: ${gamename}" echo -e "=================================" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus core_exit.sh diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index 18e5f964b..da0fd91ce 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.6.1" +version="v21.2.5" shortname="jc2" gameservername="jc2server" commandname="CORE" @@ -61,7 +61,7 @@ githubbranch="${TRAVIS_BRANCH}" # Core function that is required first. core_functions.sh(){ functionfile="${FUNCNAME[0]}" - fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" + fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" } # Bootstrap @@ -338,7 +338,7 @@ fi # LinuxGSM installer mode. if [ "${shortname}" == "core" ]; then # Download the latest serverlist. This is the complete list of all supported servers. - fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" + fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nohash" if [ ! -f "${serverlist}" ]; then echo -e "[ FAIL ] serverlist.csv could not be loaded." exit 1 @@ -383,7 +383,7 @@ else # Load the default config. If missing download it. If changed reload it. if [ ! -f "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" ]; then mkdir -p "${configdirdefault}/config-lgsm/${gameservername}" - fn_fetch_config "lgsm/config-default/config-lgsm/${gameservername}" "_default.cfg" "${configdirdefault}/config-lgsm/${gameservername}" "_default.cfg" "nochmodx" "norun" "noforcedl" "nomd5" + fn_fetch_config "lgsm/config-default/config-lgsm/${gameservername}" "_default.cfg" "${configdirdefault}/config-lgsm/${gameservername}" "_default.cfg" "nochmodx" "norun" "noforcedl" "nohash" fi if [ ! -f "${configdirserver}/_default.cfg" ]; then mkdir -p "${configdirserver}" @@ -415,26 +415,44 @@ else source "${configdirserver}/_default.cfg" # Load the common.cfg config. If missing download it. if [ ! -f "${configdirserver}/common.cfg" ]; then - fn_fetch_config "lgsm/config-default/config-lgsm" "common-template.cfg" "${configdirserver}" "common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5" + fn_fetch_config "lgsm/config-default/config-lgsm" "common-template.cfg" "${configdirserver}" "common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nohash" # shellcheck source=/dev/null source "${configdirserver}/common.cfg" else # shellcheck source=/dev/null source "${configdirserver}/common.cfg" fi + # Load the secrets-common.cfg config. If missing download it. + if [ ! -f "${configdirserver}/secrets-common.cfg" ]; then + fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-common-template.cfg" "${configdirserver}" "secrets-common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nohash" + # shellcheck source=/dev/null + source "${configdirserver}/secrets-common.cfg" + else + # shellcheck source=/dev/null + source "${configdirserver}/secrets-common.cfg" + fi # Load the instance.cfg config. If missing download it. if [ ! -f "${configdirserver}/${selfname}.cfg" ]; then - fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" + fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nohash" # shellcheck source=/dev/null source "${configdirserver}/${selfname}.cfg" else # shellcheck source=/dev/null source "${configdirserver}/${selfname}.cfg" fi + # Load the secrets-instance.cfg config. If missing download it. + if [ ! -f "${configdirserver}/secrets-${selfname}.cfg" ]; then + fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-instance-template.cfg" "${configdirserver}" "secrets-${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nohash" + # shellcheck source=/dev/null + source "${configdirserver}/secrets-${selfname}.cfg" + else + # shellcheck source=/dev/null + source "${configdirserver}/secrets-${selfname}.cfg" + fi # Load the linuxgsm.sh in to tmpdir. If missing download it. if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then - fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "chmodx" "norun" "noforcedl" "nomd5" + fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "chmodx" "norun" "noforcedl" "nohash" fi fi # Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off. @@ -449,9 +467,9 @@ fi fn_currentstatus_tmux(){ check_status.sh if [ "${status}" != "0" ]; then - currentstatus="ONLINE" + currentstatus="STARTED" else - currentstatus="OFFLINE" + currentstatus="STOPPED" fi } @@ -466,7 +484,7 @@ fn_setstatus(){ fn_currentstatus_tmux echo -en "New status: ${currentstatus}\\r" - if [ "${requiredstatus}" == "ONLINE" ]; then + if [ "${requiredstatus}" == "STARTED" ]; then (command_start.sh > /dev/null 2>&1) else (command_stop.sh > /dev/null 2>&1) @@ -736,7 +754,7 @@ echo -e "=================================" echo -e "Description:" echo -e "start ${gamename} server." echo -e "Command: ./${gameservername} start" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -755,7 +773,7 @@ echo -e "=================================" echo -e "Description:" echo -e "start ${gamename} server while already running." echo -e "Command: ./${gameservername} start" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -774,7 +792,7 @@ echo -e "=================================" echo -e "Description:" echo -e "will update server on start." echo -e "Command: ./${gameservername} start" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -793,7 +811,7 @@ echo -e "=================================" echo -e "Description:" echo -e "stop ${gamename} server." echo -e "Command: ./${gameservername} stop" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -812,7 +830,7 @@ echo -e "=================================" echo -e "Description:" echo -e "stop ${gamename} server while already stopped." echo -e "Command: ./${gameservername} stop" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -831,7 +849,7 @@ echo -e "=================================" echo -e "Description:" echo -e "restart ${gamename}." echo -e "Command: ./${gameservername} restart" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -850,7 +868,7 @@ echo -e "=================================" echo -e "Description:" echo -e "restart ${gamename} while already stopped." echo -e "Command: ./${gameservername} restart" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -873,7 +891,7 @@ echo -e "=================================" echo -e "Description:" echo -e "check for updates." echo -e "Command: ./${gameservername} update" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -892,7 +910,7 @@ echo -e "=================================" echo -e "Description:" echo -e "change the buildid tricking SteamCMD to update." echo -e "Command: ./jc2server update" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus fn_print_info_nl "changed buildid to 0." sed -i 's/[0-9]\+/0/' "${serverfiles}/steamapps/appmanifest_${appid}.acf" @@ -913,7 +931,7 @@ echo -e "=================================" echo -e "Description:" echo -e "change the buildid tricking SteamCMD to update server while already running." echo -e "Command: ./jc2server update" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus fn_print_info_nl "changed buildid to 0." sed -i 's/[0-9]\+/0/' "${serverfiles}/steamapps/appmanifest_${appid}.acf" @@ -934,7 +952,7 @@ echo -e "=================================" echo -e "Description:" echo -e "removing appmanifest file will cause script to repair." echo -e "Command: ./jc2server update" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus fn_print_info_nl "removed appmanifest_${appid}.acf." rm --verbose "${serverfiles:?}/steamapps/appmanifest_${appid}.acf" @@ -955,7 +973,7 @@ echo -e "=================================" echo -e "Description:" echo -e "force-update bypassing update check." echo -e "Command: ./jc2server force-update" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -974,7 +992,7 @@ echo -e "=================================" echo -e "Description:" echo -e "force-update bypassing update check server while already running." echo -e "Command: ./jc2server force-update" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -993,7 +1011,7 @@ echo -e "=================================" echo -e "Description:" echo -e "validate server files." echo -e "Command: ./jc2server validate" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1013,7 +1031,7 @@ echo -e "Description:" echo -e "validate server files while server already running." echo -e "" echo -e "Command: ./jc2server validate" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1033,7 +1051,7 @@ echo -e "Description:" echo -e "update LinuxGSM." echo -e "" echo -e "Command: ./jc2server update-lgam" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1074,7 +1092,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor server while already running." echo -e "Command: ./${gameservername} monitor" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1093,7 +1111,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor while server is offline with lockfile." echo -e "Command: ./${gameservername} monitor" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus fn_print_info_nl "creating lockfile." date '+%s' > "${lockdir}/${selfname}.lock" @@ -1116,7 +1134,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor while server is offline with no lockfile." echo -e "Command: ./${gameservername} monitor" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1135,7 +1153,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor while server is offline with no lockfile." echo -e "Command: ./${gameservername} test-alert" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus cp "${servercfgfullpath}" "config.lua" sed -i 's/[0-9]\+/0/' "${servercfgfullpath}" @@ -1165,7 +1183,7 @@ echo -e "=================================" echo -e "Description:" echo -e "display details." echo -e "Command: ./${gameservername} details" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1184,7 +1202,7 @@ echo -e "=================================" echo -e "Description:" echo -e "post details." echo -e "Command: ./${gameservername} postdetails" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1207,7 +1225,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run a backup." echo -e "Command: ./${gameservername} backup" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus echo -e "test de-activated until issue #1839 fixed" #(command_backup.sh) @@ -1226,7 +1244,7 @@ echo -e "=================================" echo -e "Description:" echo -e "detect glibc." echo -e "Command: ./${gameservername} detect-glibc" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1245,7 +1263,7 @@ echo -e "=================================" echo -e "Description:" echo -e "detect ldd." echo -e "Command: ./${gameservername} detect-ldd" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1264,7 +1282,7 @@ echo -e "=================================" echo -e "Description:" echo -e "detect dependencies." echo -e "Command: ./${gameservername} detect-deps" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1283,7 +1301,7 @@ echo -e "=================================" echo -e "Description:" echo -e "raw query output." echo -e "Command: ./${gameservername} query-raw" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1306,7 +1324,7 @@ echo -e "=================================" echo -e "Description:" echo -e "donate." echo -e "Command: ./${gameservername} donate" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1324,6 +1342,6 @@ echo -e "=================================" echo -e "Server Tests - Complete!" echo -e "Using: ${gamename}" echo -e "=================================" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus core_exit.sh diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 8aa7f73c3..501b64a43 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.6.1" +version="v21.2.5" shortname="mc" gameservername="mcserver" commandname="CORE" @@ -61,7 +61,7 @@ githubbranch="${TRAVIS_BRANCH}" # Core function that is required first. core_functions.sh(){ functionfile="${FUNCNAME[0]}" - fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" + fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" } # Bootstrap @@ -338,7 +338,7 @@ fi # LinuxGSM installer mode. if [ "${shortname}" == "core" ]; then # Download the latest serverlist. This is the complete list of all supported servers. - fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" + fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nohash" if [ ! -f "${serverlist}" ]; then echo -e "[ FAIL ] serverlist.csv could not be loaded." exit 1 @@ -383,7 +383,7 @@ else # Load the default config. If missing download it. If changed reload it. if [ ! -f "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" ]; then mkdir -p "${configdirdefault}/config-lgsm/${gameservername}" - fn_fetch_config "lgsm/config-default/config-lgsm/${gameservername}" "_default.cfg" "${configdirdefault}/config-lgsm/${gameservername}" "_default.cfg" "nochmodx" "norun" "noforcedl" "nomd5" + fn_fetch_config "lgsm/config-default/config-lgsm/${gameservername}" "_default.cfg" "${configdirdefault}/config-lgsm/${gameservername}" "_default.cfg" "nochmodx" "norun" "noforcedl" "nohash" fi if [ ! -f "${configdirserver}/_default.cfg" ]; then mkdir -p "${configdirserver}" @@ -415,26 +415,44 @@ else source "${configdirserver}/_default.cfg" # Load the common.cfg config. If missing download it. if [ ! -f "${configdirserver}/common.cfg" ]; then - fn_fetch_config "lgsm/config-default/config-lgsm" "common-template.cfg" "${configdirserver}" "common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5" + fn_fetch_config "lgsm/config-default/config-lgsm" "common-template.cfg" "${configdirserver}" "common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nohash" # shellcheck source=/dev/null source "${configdirserver}/common.cfg" else # shellcheck source=/dev/null source "${configdirserver}/common.cfg" fi + # Load the secrets-common.cfg config. If missing download it. + if [ ! -f "${configdirserver}/secrets-common.cfg" ]; then + fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-common.cfg" "${configdirserver}" "secrets-common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nohash" + # shellcheck source=/dev/null + source "${configdirserver}/secrets-common.cfg" + else + # shellcheck source=/dev/null + source "${configdirserver}/secrets-common.cfg" + fi # Load the instance.cfg config. If missing download it. if [ ! -f "${configdirserver}/${selfname}.cfg" ]; then - fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" + fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nohash" # shellcheck source=/dev/null source "${configdirserver}/${selfname}.cfg" else # shellcheck source=/dev/null source "${configdirserver}/${selfname}.cfg" fi + # Load the secrets-instance.cfg config. If missing download it. + if [ ! -f "${configdirserver}/secrets-${selfname}.cfg" ]; then + fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-instance-template.cfg" "${configdirserver}" "secrets-${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nohash" + # shellcheck source=/dev/null + source "${configdirserver}/secrets-${selfname}.cfg" + else + # shellcheck source=/dev/null + source "${configdirserver}/secrets-${selfname}.cfg" + fi # Load the linuxgsm.sh in to tmpdir. If missing download it. if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then - fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "chmodx" "norun" "noforcedl" "nomd5" + fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "chmodx" "norun" "noforcedl" "nohash" fi fi # Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off. @@ -449,9 +467,9 @@ fi fn_currentstatus_tmux(){ check_status.sh if [ "${status}" != "0" ]; then - currentstatus="ONLINE" + currentstatus="STARTED" else - currentstatus="OFFLINE" + currentstatus="STOPPED" fi } @@ -466,7 +484,7 @@ fn_setstatus(){ fn_currentstatus_tmux echo -en "New status: ${currentstatus}\\r" - if [ "${requiredstatus}" == "ONLINE" ]; then + if [ "${requiredstatus}" == "STARTED" ]; then (command_start.sh > /dev/null 2>&1) else (command_stop.sh > /dev/null 2>&1) @@ -730,7 +748,7 @@ echo -e "=================================" echo -e "Description:" echo -e "start ${gamename} server." echo -e "Command: ./${gameservername} start" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -749,7 +767,7 @@ echo -e "=================================" echo -e "Description:" echo -e "start ${gamename} server while already running." echo -e "Command: ./${gameservername} start" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -768,7 +786,7 @@ echo -e "=================================" echo -e "Description:" echo -e "will update server on start." echo -e "Command: ./${gameservername} start" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -786,7 +804,7 @@ echo -e "=================================" echo -e "Description:" echo -e "give time for server to fully start." echo -e "Command: sleep 30" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus sleep 30 @@ -796,7 +814,7 @@ echo -e "=================================" echo -e "Description:" echo -e "stop ${gamename} server." echo -e "Command: ./${gameservername} stop" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -815,7 +833,7 @@ echo -e "=================================" echo -e "Description:" echo -e "stop ${gamename} server while already stopped." echo -e "Command: ./${gameservername} stop" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -834,7 +852,7 @@ echo -e "=================================" echo -e "Description:" echo -e "restart ${gamename}." echo -e "Command: ./${gameservername} restart" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -853,7 +871,7 @@ echo -e "=================================" echo -e "Description:" echo -e "restart ${gamename} while already stopped." echo -e "Command: ./${gameservername} restart" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -876,7 +894,7 @@ echo -e "=================================" echo -e "Description:" echo -e "check for updates." echo -e "Command: ./${gameservername} update" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -896,7 +914,7 @@ echo -e "Description:" echo -e "update LinuxGSM." echo -e "" echo -e "Command: ./jc2server update-lgam" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -937,7 +955,7 @@ echo -e "=================================" echo -e "Description:" echo -e "give time for server to fully start." echo -e "Command: sleep 30" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus sleep 30 @@ -947,7 +965,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor server while already running." echo -e "Command: ./${gameservername} monitor" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -966,7 +984,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor while server is offline with lockfile." echo -e "Command: ./${gameservername} monitor" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus fn_print_info_nl "creating lockfile." date '+%s' > "${lockdir}/${selfname}.lock" @@ -989,7 +1007,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor while server is offline with no lockfile." echo -e "Command: ./${gameservername} monitor" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1008,7 +1026,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor while server is offline with no lockfile." echo -e "Command: ./${gameservername} test-alert" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1031,7 +1049,7 @@ echo -e "=================================" echo -e "Description:" echo -e "display details." echo -e "Command: ./${gameservername} details" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1050,7 +1068,7 @@ echo -e "=================================" echo -e "Description:" echo -e "post details." echo -e "Command: ./${gameservername} postdetails" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1073,7 +1091,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run a backup." echo -e "Command: ./${gameservername} backup" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus echo -e "test de-activated until issue #1839 fixed" #(command_backup.sh) @@ -1092,7 +1110,7 @@ echo -e "=================================" echo -e "Description:" echo -e "detect glibc." echo -e "Command: ./${gameservername} detect-glibc" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1111,7 +1129,7 @@ echo -e "=================================" echo -e "Description:" echo -e "detect ldd." echo -e "Command: ./${gameservername} detect-ldd" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1130,7 +1148,7 @@ echo -e "=================================" echo -e "Description:" echo -e "detect dependencies." echo -e "Command: ./${gameservername} detect-deps" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1163,7 +1181,7 @@ echo -e "=================================" echo -e "Description:" echo -e "raw query output." echo -e "Command: ./${gameservername} query-raw" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1186,7 +1204,7 @@ echo -e "=================================" echo -e "Description:" echo -e "donate." echo -e "Command: ./${gameservername} donate" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1204,7 +1222,7 @@ echo -e "=================================" echo -e "Server Tests - Complete!" echo -e "Using: ${gamename}" echo -e "=================================" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus core_exit.sh diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index 7c5212f40..b9941598a 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v20.6.1" +version="v21.2.5" shortname="ts3" gameservername="ts3server" commandname="CORE" @@ -61,7 +61,7 @@ githubbranch="${TRAVIS_BRANCH}" # Core function that is required first. core_functions.sh(){ functionfile="${FUNCNAME[0]}" - fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" + fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" } # Bootstrap @@ -338,7 +338,7 @@ fi # LinuxGSM installer mode. if [ "${shortname}" == "core" ]; then # Download the latest serverlist. This is the complete list of all supported servers. - fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" + fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nohash" if [ ! -f "${serverlist}" ]; then echo -e "[ FAIL ] serverlist.csv could not be loaded." exit 1 @@ -383,7 +383,7 @@ else # Load the default config. If missing download it. If changed reload it. if [ ! -f "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" ]; then mkdir -p "${configdirdefault}/config-lgsm/${gameservername}" - fn_fetch_config "lgsm/config-default/config-lgsm/${gameservername}" "_default.cfg" "${configdirdefault}/config-lgsm/${gameservername}" "_default.cfg" "nochmodx" "norun" "noforcedl" "nomd5" + fn_fetch_config "lgsm/config-default/config-lgsm/${gameservername}" "_default.cfg" "${configdirdefault}/config-lgsm/${gameservername}" "_default.cfg" "nochmodx" "norun" "noforcedl" "nohash" fi if [ ! -f "${configdirserver}/_default.cfg" ]; then mkdir -p "${configdirserver}" @@ -415,26 +415,44 @@ else source "${configdirserver}/_default.cfg" # Load the common.cfg config. If missing download it. if [ ! -f "${configdirserver}/common.cfg" ]; then - fn_fetch_config "lgsm/config-default/config-lgsm" "common-template.cfg" "${configdirserver}" "common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5" + fn_fetch_config "lgsm/config-default/config-lgsm" "common-template.cfg" "${configdirserver}" "common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nohash" # shellcheck source=/dev/null source "${configdirserver}/common.cfg" else # shellcheck source=/dev/null source "${configdirserver}/common.cfg" fi + # Load the secrets-common.cfg config. If missing download it. + if [ ! -f "${configdirserver}/secrets-common.cfg" ]; then + fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-common-template.cfg" "${configdirserver}" "secrets-common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nohash" + # shellcheck source=/dev/null + source "${configdirserver}/secrets-common.cfg" + else + # shellcheck source=/dev/null + source "${configdirserver}/secrets-common.cfg" + fi # Load the instance.cfg config. If missing download it. if [ ! -f "${configdirserver}/${selfname}.cfg" ]; then - fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5" + fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nohash" # shellcheck source=/dev/null source "${configdirserver}/${selfname}.cfg" else # shellcheck source=/dev/null source "${configdirserver}/${selfname}.cfg" fi + # Load the secrets-instance.cfg config. If missing download it. + if [ ! -f "${configdirserver}/secrets-${selfname}.cfg" ]; then + fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-instance-template.cfg" "${configdirserver}" "secrets-${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nohash" + # shellcheck source=/dev/null + source "${configdirserver}/secrets-${selfname}.cfg" + else + # shellcheck source=/dev/null + source "${configdirserver}/secrets-${selfname}.cfg" + fi # Load the linuxgsm.sh in to tmpdir. If missing download it. if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then - fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "chmodx" "norun" "noforcedl" "nomd5" + fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "chmodx" "norun" "noforcedl" "nohash" fi fi # Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off. @@ -449,9 +467,9 @@ fi fn_currentstatus_tmux(){ check_status.sh if [ "${status}" != "0" ]; then - currentstatus="ONLINE" + currentstatus="STARTED" else - currentstatus="OFFLINE" + currentstatus="STOPPED" fi } @@ -466,7 +484,7 @@ fn_setstatus(){ fn_currentstatus_tmux echo -en "New status: ${currentstatus}\\r" - if [ "${requiredstatus}" == "ONLINE" ]; then + if [ "${requiredstatus}" == "STARTED" ]; then (command_start.sh > /dev/null 2>&1) else (command_stop.sh > /dev/null 2>&1) @@ -730,7 +748,7 @@ echo -e "=================================" echo -e "Description:" echo -e "start ${gamename} server." echo -e "Command: ./${gameservername} start" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -749,7 +767,7 @@ echo -e "=================================" echo -e "Description:" echo -e "start ${gamename} server while already running." echo -e "Command: ./${gameservername} start" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -768,7 +786,7 @@ echo -e "=================================" echo -e "Description:" echo -e "will update server on start." echo -e "Command: ./${gameservername} start" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -787,7 +805,7 @@ echo -e "=================================" echo -e "Description:" echo -e "stop ${gamename} server." echo -e "Command: ./${gameservername} stop" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -806,7 +824,7 @@ echo -e "=================================" echo -e "Description:" echo -e "stop ${gamename} server while already stopped." echo -e "Command: ./${gameservername} stop" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -825,7 +843,7 @@ echo -e "=================================" echo -e "Description:" echo -e "restart ${gamename}." echo -e "Command: ./${gameservername} restart" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -844,7 +862,7 @@ echo -e "=================================" echo -e "Description:" echo -e "restart ${gamename} while already stopped." echo -e "Command: ./${gameservername} restart" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -867,7 +885,7 @@ echo -e "=================================" echo -e "Description:" echo -e "check for updates." echo -e "Command: ./${gameservername} update" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -887,7 +905,7 @@ echo -e "Description:" echo -e "update LinuxGSM." echo -e "" echo -e "Command: ./jc2server update-lgam" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -914,7 +932,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor server while already running." echo -e "Command: ./${gameservername} monitor" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -933,7 +951,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor while server is offline with lockfile." echo -e "Command: ./${gameservername} monitor" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus fn_print_info_nl "creating lockfile." date '+%s' > "${lockdir}/${selfname}.lock" @@ -956,7 +974,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor while server is offline with no lockfile." echo -e "Command: ./${gameservername} monitor" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -975,7 +993,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor while server is offline with no lockfile." echo -e "Command: ./${gameservername} test-alert" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -998,7 +1016,7 @@ echo -e "=================================" echo -e "Description:" echo -e "display details." echo -e "Command: ./${gameservername} details" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1017,7 +1035,7 @@ echo -e "=================================" echo -e "Description:" echo -e "post details." echo -e "Command: ./${gameservername} postdetails" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1040,7 +1058,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run a backup." echo -e "Command: ./${gameservername} backup" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus echo -e "test de-activated until issue #1839 fixed" #(command_backup.sh) @@ -1059,7 +1077,7 @@ echo -e "=================================" echo -e "Description:" echo -e "detect glibc." echo -e "Command: ./${gameservername} detect-glibc" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1078,7 +1096,7 @@ echo -e "=================================" echo -e "Description:" echo -e "detect ldd." echo -e "Command: ./${gameservername} detect-ldd" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1097,7 +1115,7 @@ echo -e "=================================" echo -e "Description:" echo -e "detect dependencies." echo -e "Command: ./${gameservername} detect-deps" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1116,7 +1134,7 @@ echo -e "=================================" echo -e "Description:" echo -e "raw query output." echo -e "Command: ./${gameservername} query-raw" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1139,7 +1157,7 @@ echo -e "=================================" echo -e "Description:" echo -e "donate." echo -e "Command: ./${gameservername} donate" -requiredstatus="ONLINE" +requiredstatus="STARTED" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1157,7 +1175,7 @@ echo -e "=================================" echo -e "Server Tests - Complete!" echo -e "Using: ${gamename}" echo -e "=================================" -requiredstatus="OFFLINE" +requiredstatus="STOPPED" fn_setstatus core_exit.sh