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 31d08d206..d3c1adfbb 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,12 +1,8 @@ --- -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 8ba27fa9f..dc51fe40e 100644 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,9 +1,6 @@ --- -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 84176741f..ada8638cc 100644 --- a/.github/ISSUE_TEMPLATE/new-server-request.md +++ b/.github/ISSUE_TEMPLATE/new-server-request.md @@ -1,9 +1,6 @@ --- -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 new file mode 100644 index 000000000..ee6d724f1 --- /dev/null +++ b/.github/issue_label_bot.yaml @@ -0,0 +1,4 @@ +label-alias: + bug: 'type: bug' + feature_request: 'type: feature request' + question: 'question' diff --git a/.github/lock.yml b/.github/lock.yml new file mode 100644 index 000000000..dd136ecdc --- /dev/null +++ b/.github/lock.yml @@ -0,0 +1,38 @@ +# 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 new file mode 100644 index 000000000..a883b161e --- /dev/null +++ b/.github/no-response.yml @@ -0,0 +1,10 @@ +# 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 27bcee3fb..1387c5e19 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -1,4 +1,4 @@ template: | - ## What’s Changed + ## Changelog - $CHANGES + $CHANGES \ No newline at end of file diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml deleted file mode 100644 index f82cb60d9..000000000 --- a/.github/workflows/create-release.yml +++ /dev/null @@ -1,17 +0,0 @@ -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 a5a827096..c058b6d24 100644 --- a/.github/workflows/git-sync.yml +++ b/.github/workflows/git-sync.yml @@ -1,4 +1,4 @@ -name: Github to Bitbucket sync +name: Backup Repo # 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 deleted file mode 100644 index 316f08b98..000000000 --- a/.github/workflows/labeler.yml +++ /dev/null @@ -1,16 +0,0 @@ -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 deleted file mode 100644 index 63f0cf2db..000000000 --- a/.github/workflows/lock.yml +++ /dev/null @@ -1,21 +0,0 @@ -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 4a114d2fc..bcb1caf7f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -48,7 +48,8 @@ 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 the** [**support page**](https://linuxgsm.com/support) for links to other support options. +* **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. * **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 728671a7a..f64c34ac3 100644 --- a/lgsm/config-default/config-lgsm/acserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/acserver/_default.cfg @@ -15,7 +15,9 @@ steampass='password' ## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-c ${servercfgfullpath}" +fn_parms(){ +parms="-c ${servercfgfullpath}" +} #### LinuxGSM Settings #### @@ -78,7 +80,6 @@ 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,7 +112,6 @@ 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 533d827f1..505076703 100644 --- a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg @@ -21,7 +21,9 @@ defaultmap="act_airport" maxplayers="20" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game ahl2 -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game ahl2 -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -84,7 +86,6 @@ 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,16 +115,6 @@ 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 @@ -147,6 +138,14 @@ 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 931d3bd4b..9e52094a0 100644 --- a/lgsm/config-default/config-lgsm/ahlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg @@ -16,7 +16,9 @@ defaultmap="ahl_hydro" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game action -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers} " +fn_parms(){ +parms="-game action -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers} " +} #### LinuxGSM Settings #### @@ -79,7 +81,6 @@ 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,7 +113,6 @@ 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 57635b6d3..f289cd1fb 100644 --- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg @@ -13,13 +13,15 @@ ip="0.0.0.0" port="7777" queryport="27015" rconport="27020" -# Default Map: TheIsland, Ragnarok, CrystalIsles, Aberration_P, ScorchedEarth_P, TheCenter, Extinction, Valguero_P, Genesis +# Default Map: TheIsland, Ragnarok, CrystalIsles, Aberration_P, ScorchedEarth_P defaultmap="TheIsland" altsavedirectoryname="${defaultmap}" maxplayers="70" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="${defaultmap}?AltSaveDirectoryName=${altsavedirectoryname}?listen?MultiHome=${ip}?MaxPlayers=${maxplayers}?QueryPort=${queryport}?RCONPort=${rconport}?Port=${port} -automanagedmods -crossplay -PublicIPForEpic=${ip}" +fn_parms(){ +parms="${defaultmap}?AltSaveDirectoryName=${altsavedirectoryname}?listen?MultiHome=${ip}?MaxPlayers=${maxplayers}?QueryPort=${queryport}?RCONPort=${rconport}?Port=${port} -automanagedmods -crossplay -PublicIPForEpic=${ip}" +} #### LinuxGSM Settings #### @@ -82,7 +84,6 @@ 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,7 +116,6 @@ 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 7b338811a..acdbedb59 100644 --- a/lgsm/config-default/config-lgsm/arma3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/arma3server/_default.cfg @@ -32,7 +32,9 @@ servermods="" bepath="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-ip=${ip} -port=${port} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod=${mods} -servermod=${servermods} -bepath=${bepath} -autoinit -loadmissiontomemory" +fn_parms(){ +parms="-ip=${ip} -port=${port} -cfg=${networkcfgfullpath} -config=${servercfgfullpath} -mod=${mods} -servermod=${servermods} -bepath=${bepath} -autoinit -loadmissiontomemory" +} #### LinuxGSM Settings #### @@ -95,7 +97,6 @@ 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="" @@ -128,7 +129,6 @@ 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.27" +glibc="2.13" #### Directories #### # Edit with care @@ -174,7 +174,7 @@ glibc="2.27" ## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" -executable="./arma3server_x64" +executable="./arma3server" 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 17d670d0f..a8e6fb049 100644 --- a/lgsm/config-default/config-lgsm/avserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/avserver/_default.cfg @@ -12,12 +12,14 @@ port="27000" # https://steamidfinder.com adminsteamid="" -if [ -n "${adminsteamid}" ]; then - admincmd="--admin ${adminsteamid}" -fi ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="--galaxy-name ${selfname} --ip ${ip} --datapath ${avdatapath} ${admincmd}" +fn_parms(){ +if [ ! -z "${adminsteamid}" ]; then + admincmd="--admin ${adminsteamid}" +fi +parms="--galaxy-name ${selfname} --ip ${ip} --datapath ${avdatapath} ${admincmd}" +} #### LinuxGSM Settings #### @@ -26,7 +28,6 @@ startparameters="--galaxy-name ${selfname} --ip ${ip} --datapath ${avdatapath} $ # https://docs.linuxgsm.com/configuration/linuxgsm-stats # (on|off) stats="off" - ## Notification Alerts # (on|off) @@ -80,7 +81,6 @@ 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,11 +109,9 @@ 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="" @@ -143,10 +141,6 @@ 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 800379706..2f35f1c9d 100644 --- a/lgsm/config-default/config-lgsm/bb2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bb2server/_default.cfg @@ -22,7 +22,9 @@ maxplayers="20" gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game brainbread2 -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game brainbread2 -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -85,7 +87,6 @@ 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,7 +119,6 @@ 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 9576c708f..573c9964b 100644 --- a/lgsm/config-default/config-lgsm/bbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bbserver/_default.cfg @@ -16,7 +16,9 @@ defaultmap="bb_chp4_slaywatch" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game brainbread -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game brainbread -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -79,7 +81,6 @@ 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,7 +113,6 @@ 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 f1ae81a1f..746169c5b 100644 --- a/lgsm/config-default/config-lgsm/bdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bdserver/_default.cfg @@ -16,7 +16,9 @@ defaultmap="pve_tomb" maxplayers="3" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game bdef -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game bdef -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -79,7 +81,6 @@ 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,7 +113,6 @@ 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 12f9ea76c..6a498aaaf 100644 --- a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg @@ -9,7 +9,9 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="+hostServer 1 +dedicated 1" +fn_parms(){ +parms="+hostServer 1 +dedicated 1" +} #### LinuxGSM Settings #### @@ -72,7 +74,6 @@ 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 f8d7994e2..a62b9cdcd 100644 --- a/lgsm/config-default/config-lgsm/bfvserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bfvserver/_default.cfg @@ -9,7 +9,9 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="+statusMonitor 1" +fn_parms(){ +parms="+statusMonitor 1" +} #### LinuxGSM Settings #### @@ -72,7 +74,6 @@ 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 2921250d7..b9ebbce02 100644 --- a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg @@ -22,7 +22,9 @@ maxplayers="16" gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game bms -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game bms -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -85,7 +87,6 @@ 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,7 +119,6 @@ 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 dd779cd6a..907f72a4c 100644 --- a/lgsm/config-default/config-lgsm/boserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/boserver/_default.cfg @@ -15,7 +15,9 @@ gslt="" ip="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-batchmode -nographics -dedicated -configfile=${servercfgfullpath}" +fn_parms(){ +parms="-batchmode -nographics -dedicated -configfile=${servercfgfullpath}" +} #### LinuxGSM Settings #### @@ -78,7 +80,6 @@ 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,7 +112,6 @@ 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 8a9af8b1a..f23980d49 100644 --- a/lgsm/config-default/config-lgsm/bsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/bsserver/_default.cfg @@ -26,7 +26,9 @@ maxplayers="16" gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game "${serverfiles}/berimbau" -autoupdate -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +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}" +} #### LinuxGSM Settings #### @@ -89,7 +91,6 @@ 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="" @@ -122,7 +123,6 @@ 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 aa4785985..84b059dbe 100644 --- a/lgsm/config-default/config-lgsm/bt1944server/_default.cfg +++ b/lgsm/config-default/config-lgsm/bt1944server/_default.cfg @@ -14,7 +14,9 @@ port="7777" queryport="7780" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="/Game/Maps/Final_Maps/Derailed?Game=/Script/ShooterGame.WartideGameMode?listen -log -broadcastip=\"${extip}\" -PORT=${port} -QueryPort=${queryport} -defgameini=\"${servercfgfullpath}\"" +fn_parms(){ +parms="/Game/Maps/Final_Maps/Derailed?Game=/Script/ShooterGame.WartideGameMode?listen -log -broadcastip=\"${extip}\" -PORT=${port} -QueryPort=${queryport} -defgameini=\"${servercfgfullpath}\"" +} #### LinuxGSM Settings #### @@ -77,7 +79,6 @@ 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,7 +111,6 @@ 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,7 +161,6 @@ 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 dd695ec70..c22a70533 100644 --- a/lgsm/config-default/config-lgsm/btserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/btserver/_default.cfg @@ -9,7 +9,9 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="" +fn_parms(){ +parms="" +} #### LinuxGSM Settings #### @@ -72,7 +74,6 @@ 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="" @@ -105,7 +106,6 @@ 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 c9ceb5f5f..202535ce1 100644 --- a/lgsm/config-default/config-lgsm/ccserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ccserver/_default.cfg @@ -17,7 +17,9 @@ defaultmap="cbe_bunker" maxplayers="6" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game cure -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game cure -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -80,7 +82,6 @@ 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,7 +114,6 @@ 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 da790a356..3f3e29c8b 100644 --- a/lgsm/config-default/config-lgsm/cmwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cmwserver/_default.cfg @@ -14,8 +14,13 @@ port="7777" queryport="7779" defaultmap="AOCTD-Frigid_p" + ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="${defaultmap}?steamsockets -multihome=${ip} -Port=${port} -QueryPort=${queryport} -seekfreeloadingserver -configsubdir=${gamelogdir} -log=${gamelog}" +fn_parms(){ + +parms="${defaultmap}?steamsockets -multihome=${ip} -Port=${port} -QueryPort=${queryport} -seekfreeloadingserver -configsubdir=${gamelogdir} -log=${gamelog}" + +} #### LinuxGSM Settings #### @@ -78,7 +83,6 @@ 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,7 +115,6 @@ 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="" @@ -153,7 +156,6 @@ 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 611a8a086..9dfb852e5 100644 --- a/lgsm/config-default/config-lgsm/cod2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod2server/_default.cfg @@ -15,7 +15,9 @@ defaultmap="mp_leningrad" maxplayers="20" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -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}" +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}" +} #### LinuxGSM Settings #### @@ -78,7 +80,6 @@ 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 30dfbd177..b5ee4bc63 100644 --- a/lgsm/config-default/config-lgsm/cod4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/cod4server/_default.cfg @@ -15,7 +15,9 @@ defaultmap="mp_crossfire" maxplayers="32" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -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}" +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}" +} #### LinuxGSM Settings #### @@ -78,7 +80,6 @@ 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 7e22c1707..377c2e6e4 100644 --- a/lgsm/config-default/config-lgsm/codserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codserver/_default.cfg @@ -15,7 +15,9 @@ defaultmap="mp_neuville" maxplayers="20" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -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}" +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}" +} #### LinuxGSM Settings #### @@ -78,7 +80,6 @@ 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 19ba2098b..0f179903a 100644 --- a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg @@ -15,7 +15,9 @@ defaultmap="mp_cassino" maxplayers="20" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -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}" +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}" +} #### LinuxGSM Settings #### @@ -78,7 +80,6 @@ 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 427237992..1430387bc 100644 --- a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg @@ -15,7 +15,9 @@ defaultmap="mp_castle" maxplayers="20" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -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}" +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}" +} #### LinuxGSM Settings #### @@ -78,7 +80,6 @@ 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 deleted file mode 100644 index 85a1aab06..000000000 --- a/lgsm/config-default/config-lgsm/colserver/_default.cfg +++ /dev/null @@ -1,178 +0,0 @@ -################################## -######## 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 5edbaee9c..a0fb7fea8 100644 --- a/lgsm/config-default/config-lgsm/csczserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csczserver/_default.cfg @@ -16,7 +16,9 @@ defaultmap="de_dust2" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game czero -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game czero -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -79,7 +81,6 @@ 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,7 +113,6 @@ 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 28f3082b3..2ed74049e 100644 --- a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg @@ -42,7 +42,9 @@ wscollectionid="" wsstartmap="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -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" +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" +} #### LinuxGSM Settings #### @@ -105,7 +107,6 @@ 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="" @@ -138,7 +139,6 @@ 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="9" +stopmode="3" ## 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 a72d3b3cd..a5661c890 100644 --- a/lgsm/config-default/config-lgsm/csserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/csserver/_default.cfg @@ -16,7 +16,9 @@ defaultmap="de_dust2" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game cstrike -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game cstrike -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -79,7 +81,6 @@ 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,7 +113,6 @@ 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 a8b6b122b..56f430bb6 100644 --- a/lgsm/config-default/config-lgsm/cssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/cssserver/_default.cfg @@ -22,7 +22,9 @@ maxplayers="16" gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game cstrike -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game cstrike -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +sv_setsteamaccount ${gslt} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -85,7 +87,6 @@ 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,7 +119,6 @@ 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 61050282e..ea6bcf390 100644 --- a/lgsm/config-default/config-lgsm/dabserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dabserver/_default.cfg @@ -17,7 +17,9 @@ defaultmap="da_rooftops" maxplayers="10" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -80,7 +82,6 @@ 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,7 +114,6 @@ 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 335ba7b56..8babab1dd 100644 --- a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg @@ -16,7 +16,9 @@ defaultmap="dcdm5" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game dmc -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game dmc -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -79,7 +81,6 @@ 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,7 +113,6 @@ 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 1e87b20b6..83b051930 100644 --- a/lgsm/config-default/config-lgsm/dodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodserver/_default.cfg @@ -16,7 +16,9 @@ defaultmap="dod_Anzio" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game dod -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game dod -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -79,7 +81,6 @@ 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,7 +113,6 @@ 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 87caa5a69..3af945122 100644 --- a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg @@ -17,7 +17,9 @@ defaultmap="dod_Anzio" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game dod -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game dod -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -80,7 +82,6 @@ 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,7 +114,6 @@ 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 2099d2296..deb15b2dc 100644 --- a/lgsm/config-default/config-lgsm/doiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/doiserver/_default.cfg @@ -18,7 +18,9 @@ maxplayers="32" tickrate="64" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game doi -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -tickrate ${tickrate} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers} -workshop -norestart" +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" +} #### LinuxGSM Settings #### @@ -81,7 +83,6 @@ 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,7 +115,6 @@ 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 766b3a706..6e746fb83 100644 --- a/lgsm/config-default/config-lgsm/dstserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dstserver/_default.cfg @@ -20,7 +20,9 @@ persistentstorageroot="${HOME}/.klei" confdir="DoNotStarveTogether" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-persistent_storage_root ${persistentstorageroot} -conf_dir ${confdir} -cluster ${cluster} -shard ${shard}" +fn_parms(){ +parms="-persistent_storage_root ${persistentstorageroot} -conf_dir ${confdir} -cluster ${cluster} -shard ${shard}" +} #### LinuxGSM Settings #### @@ -83,7 +85,6 @@ 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,7 +117,6 @@ 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 59d36fa9f..c45a12bee 100644 --- a/lgsm/config-default/config-lgsm/dysserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/dysserver/_default.cfg @@ -22,7 +22,9 @@ maxplayers="16" gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game "${serverfiles}/dystopia" -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +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}" +} #### LinuxGSM Settings #### @@ -85,7 +87,6 @@ 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,7 +119,6 @@ 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 d99a754d2..c515595e2 100644 --- a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg @@ -9,7 +9,9 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-nogui" +fn_parms(){ +parms="-nogui" +} #### LinuxGSM Settings #### @@ -72,7 +74,6 @@ 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="" @@ -105,7 +106,6 @@ 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="yes" -consoleinteract="no" +consoleverbose="" +consoleinteract="" ## 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 6e782cc24..be13dac6b 100644 --- a/lgsm/config-default/config-lgsm/emserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/emserver/_default.cfg @@ -22,7 +22,9 @@ maxplayers="62" gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game empires -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game empires -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -85,7 +87,6 @@ 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,7 +119,6 @@ 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 dec02d4b3..0d2bf1a8c 100644 --- a/lgsm/config-default/config-lgsm/etlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/etlserver/_default.cfg @@ -9,7 +9,9 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="+set net_strict 1 +set fs_homepath ${serverfiles} +exec ${servercfg}" +fn_parms(){ +parms="+set net_strict 1 +set fs_homepath ${serverfiles} +exec ${servercfg}" +} #### LinuxGSM Settings #### @@ -72,7 +74,6 @@ 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 b6d1fcd34..8a808f7f3 100644 --- a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg @@ -17,7 +17,9 @@ rconpassword="CHANGE_ME" branch="stable" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="--bind ${ip} --start-server ${serverfiles}/save1.zip --server-settings ${servercfgfullpath} --port ${port} --rcon-port ${rconport} --rcon-password ${rconpassword}" +fn_parms(){ +parms="--bind ${ip} --start-server ${serverfiles}/save1.zip --server-settings ${servercfgfullpath} --port ${port} --rcon-port ${rconport} --rcon-password ${rconpassword}" +} #### LinuxGSM Settings #### @@ -80,7 +82,6 @@ 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 736d78ca8..1452805b8 100644 --- a/lgsm/config-default/config-lgsm/fofserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/fofserver/_default.cfg @@ -17,7 +17,9 @@ defaultmap="fof_depot" maxplayers="20" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game fof -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game fof -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -80,7 +82,6 @@ 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,7 +114,6 @@ 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 ed8b2f8e8..1e8fb92aa 100644 --- a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg @@ -18,18 +18,24 @@ maxplayers="16" tickrate="66" gamemode="sandbox" -## Workshop Parameters | https://wiki.facepunch.com/gmod/Workshop_for_Dedicated_Servers +## Workshop Parameters | https://wiki.garrysmod.com/page/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 -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" +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}" +} #### LinuxGSM Settings #### @@ -92,7 +98,6 @@ 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,7 +130,6 @@ 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 6c268b108..f356b1238 100644 --- a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg @@ -17,7 +17,9 @@ defaultmap="dm_lockdown" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game hl2mp -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game hl2mp -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -80,7 +82,6 @@ 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,7 +114,6 @@ 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 361c1f7b7..41b702789 100644 --- a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg @@ -16,7 +16,9 @@ defaultmap="crossfire" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game valve -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game valve -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -79,7 +81,6 @@ 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,7 +113,6 @@ 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 127519b40..7c04267ad 100644 --- a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg @@ -17,7 +17,9 @@ defaultmap="crossfire" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game hl1mp -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game hl1mp -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -80,7 +82,6 @@ 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,7 +114,6 @@ 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 793e3d77c..eda9972d3 100644 --- a/lgsm/config-default/config-lgsm/hwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/hwserver/_default.cfg @@ -28,7 +28,9 @@ loadsave="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters # Edit with care | http://hurtworld.wikia.com/wiki/Hosting_A_Server -startparameters="-batchmode -nographics -exec \"host ${port} ${defaultmap} ${loadsave};queryport ${queryport};maxplayers ${maxplayers};servername ${servername};creativemode ${creativemode};${admins}\"" +fn_parms(){ +parms="-batchmode -nographics -exec \"host ${port} ${defaultmap} ${loadsave};queryport ${queryport};maxplayers ${maxplayers};servername ${servername};creativemode ${creativemode};${admins}\"" +} #### LinuxGSM Settings #### @@ -91,7 +93,6 @@ 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="" @@ -124,7 +125,6 @@ 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 6dbf464ce..50e3e8721 100644 --- a/lgsm/config-default/config-lgsm/insserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/insserver/_default.cfg @@ -23,7 +23,9 @@ tickrate="64" gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -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" +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" +} #### LinuxGSM Settings #### @@ -86,7 +88,6 @@ 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,7 +120,6 @@ 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 e9895b132..07bc89a60 100644 --- a/lgsm/config-default/config-lgsm/inssserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/inssserver/_default.cfg @@ -13,13 +13,20 @@ 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 -## 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" +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 +} #### LinuxGSM Settings #### @@ -82,7 +89,6 @@ 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,7 +121,6 @@ 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="" @@ -165,6 +170,7 @@ 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 6ba806960..c322ed383 100644 --- a/lgsm/config-default/config-lgsm/iosserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/iosserver/_default.cfg @@ -17,7 +17,9 @@ defaultmap="8v8_vienna" maxplayers="32" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game iosoccer -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game iosoccer -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -80,7 +82,6 @@ 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,7 +114,6 @@ 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 d57520398..c57af02ea 100644 --- a/lgsm/config-default/config-lgsm/jc2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc2server/_default.cfg @@ -9,7 +9,9 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="" +fn_parms(){ +parms="" +} #### LinuxGSM Settings #### @@ -72,7 +74,6 @@ 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="" @@ -105,7 +106,6 @@ 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 46ab112a4..e208a42f4 100644 --- a/lgsm/config-default/config-lgsm/jc3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jc3server/_default.cfg @@ -9,7 +9,9 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="" +fn_parms(){ +parms="" +} #### LinuxGSM Settings #### @@ -72,7 +74,6 @@ 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="" @@ -105,7 +106,6 @@ 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,6 +162,7 @@ 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 a6bf4f7b1..cb42989a7 100644 --- a/lgsm/config-default/config-lgsm/jk2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/jk2server/_default.cfg @@ -1,33 +1,29 @@ ################################## ######## 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. +# 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 -#### Game Server Settings #### +#### Server Settings #### ## SteamCMD Login | https://docs.linuxgsm.com/steamcmd#steamcmd-login steamuser="username" steampass='password' -## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +## Server Start Settings | https://docs.linuxgsm.com/configuration/start-parameters ip="0.0.0.0" port="27960" defaultmap="ffa_bespin" -## 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}" +## 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}" +} #### 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) @@ -41,6 +37,10 @@ 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,14 +74,9 @@ 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="" @@ -103,25 +98,15 @@ logdays="7" # Query delay time querydelay="1" -## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors -ansi="on" +#### LinuxGSM Advanced Settings #### -#### Advanced Settings #### +# ANSI Colors +ansi="on" -## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +# Message Display Time sleeptime="0.5" -## 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 +# Stop Mode | https://docs.linuxgsm.com/steamcmd/stopmode # 1: tmux kill # 2: CTRL+c # 3: quit @@ -130,9 +115,8 @@ steammaster="true" # 6: q # 7: exit # 8: 7 Days to Die -# 9: GoldSrc -# 10: Avorion -# 11: end +# 9: Gold Source +# 10: Teamspeak 3 stopmode="3" ## Query mode @@ -148,7 +132,15 @@ querytype="protocol-quake3" consoleverbose="yes" consoleinteract="yes" -## Game Server Details +## 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 # Do not edit gamename="Jedi Knight II: Jedi Outcast" engine="idtech3" @@ -157,7 +149,7 @@ glibc="2.15" #### Directories #### # Edit with care -## Game Server Directories +## Server Specific Directories systemdir="${serverfiles}/GameData" executabledir="${systemdir}" executable="./jk2mvded" @@ -167,7 +159,7 @@ servercfgdir="${systemdir}" servercfgfullpath="${servercfgdir}/${servercfg}" ## Backup Directory -backupdir="${lgsmdir}/backups" +backupdir="${rootdir}/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 5617a4cf5..175e082ab 100644 --- a/lgsm/config-default/config-lgsm/kf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/kf2server/_default.cfg @@ -15,7 +15,9 @@ defaultmap="KF-BioticsLab" gamemode="KFGameContent.KFGameInfo_VersusSurvival" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="\"${defaultmap}?Game=${gamemode}?ConfigSubDir=${selfname} -QueryPort=${queryport}\"" +fn_parms(){ +parms="\"${defaultmap}?Game=${gamemode}?ConfigSubDir=${selfname} -QueryPort=${queryport}\"" +} #### LinuxGSM Settings #### @@ -78,7 +80,6 @@ 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,7 +112,6 @@ 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,7 +153,6 @@ 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 d1a672dcc..0169f48d0 100644 --- a/lgsm/config-default/config-lgsm/kfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/kfserver/_default.cfg @@ -17,11 +17,13 @@ ip="0.0.0.0" defaultmap="KF-BioticsLab.rom" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="server ${defaultmap}?game=KFmod.KFGameType?VACSecured=true -nohomedir ini=${servercfg} log=${gamelog}" +fn_parms(){ +parms="server ${defaultmap}?game=KFmod.KFGameType?VACSecured=true -nohomedir ini=${servercfg} log=${gamelog}" ## Server Parameters for Objective mode #defaultmap="KFO-Steamland" -#startparameters="server ${defaultmap}?Game=KFStoryGame.KFStoryGame?VACSecured=true -nohomedir ini=${servercfg} log=${gamelog}" +#parms="server ${defaultmap}?Game=KFStoryGame.KFStoryGame?VACSecured=true -nohomedir ini=${servercfg} log=${gamelog}" +} #### LinuxGSM Settings #### @@ -84,7 +86,6 @@ 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,7 +118,6 @@ 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 5d947eca0..718432852 100644 --- a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg @@ -16,7 +16,9 @@ defaultmap="c5m1_waterfront" maxplayers="8" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game left4dead2 -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game left4dead2 -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -79,7 +81,6 @@ 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,7 +113,6 @@ 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 0f1b2f4a4..beacac9bb 100644 --- a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg @@ -16,7 +16,9 @@ defaultmap="l4d_hospital01_apartment" maxplayers="8" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game left4dead -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game left4dead -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -79,7 +81,6 @@ 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,7 +113,6 @@ 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 d5ad3b59f..b894ade1d 100644 --- a/lgsm/config-default/config-lgsm/mcbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mcbserver/_default.cfg @@ -9,7 +9,9 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="" +fn_parms(){ +parms="" +} #### LinuxGSM Settings #### @@ -72,7 +74,6 @@ 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="" @@ -122,7 +123,7 @@ stopmode="5" # 3: gamedig # 4: gsquery # 5: tcp -querymode="2" +querymode="4" 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 6cbdd8e15..b78195e3e 100644 --- a/lgsm/config-default/config-lgsm/mcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mcserver/_default.cfg @@ -12,7 +12,9 @@ javaram="1024" # -Xmx$1024M ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="nogui" +fn_parms(){ +parms="nogui" +} ## Release Settings | https://docs.linuxgsm.com/game-servers/minecraft#release-settings # Branch (release|snapshot) @@ -81,7 +83,6 @@ 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="" @@ -150,8 +151,7 @@ glibc="null" ## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" -preexecutable="java -Xmx${javaram}M -jar" -executable="./minecraft_server.jar" +executable="java -Xmx${javaram}M -jar ${serverfiles}/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 bb4847c00..c71081b89 100644 --- a/lgsm/config-default/config-lgsm/mhserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mhserver/_default.cfg @@ -17,7 +17,9 @@ queryport="27015" defaultmap="FFA_ThePit" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="Mordhau ${defaultmap} -log -MultiHome=${ip} -Port=${port} -BeaconPort=${beaconport} -QueryPort=${queryport}" +fn_parms(){ +parms="Mordhau ${defaultmap} -log -MultiHome=${ip} -Port=${port} -BeaconPort=${beaconport} -QueryPort=${queryport}" +} #### LinuxGSM Settings #### @@ -80,7 +82,6 @@ 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,7 +114,6 @@ 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 9ab26b75a..54bdb5a06 100644 --- a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg @@ -14,7 +14,9 @@ port="12203" defaultmap="dm/mohdm1" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -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}" +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}" +} #### LinuxGSM Settings #### @@ -77,7 +79,6 @@ 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 c4f469c61..7909b67e2 100644 --- a/lgsm/config-default/config-lgsm/momserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/momserver/_default.cfg @@ -15,7 +15,9 @@ beaconport="15000" maxplayers="32" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-port="${port}" -beaconport="${beaconport}" -MULTIHOME="${ip}" -maxplayers=${maxplayers}" +fn_parms(){ +parms="-port="${port}" -beaconport="${beaconport}" -MULTIHOME="${ip}" -maxplayers=${maxplayers}" +} #### LinuxGSM Settings #### @@ -78,7 +80,6 @@ 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,7 +112,6 @@ 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,10 +141,6 @@ 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 027aa8cef..3a97169f8 100644 --- a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg @@ -13,7 +13,9 @@ ip="0.0.0.0" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters # Edit with care -startparameters="" +fn_parms(){ +parms="" +} #### LinuxGSM Settings #### @@ -76,7 +78,6 @@ 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 0fe4ffabc..3e798e2ee 100644 --- a/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/mumbleserver/_default.cfg @@ -9,7 +9,9 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-fg -ini ${servercfgfullpath}" +fn_parms(){ +parms="-fg -ini ${servercfgfullpath}" +} #### LinuxGSM Settings #### @@ -72,7 +74,6 @@ 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="" @@ -152,6 +153,7 @@ 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 ee43d1f5d..7ef270919 100644 --- a/lgsm/config-default/config-lgsm/ndserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ndserver/_default.cfg @@ -17,7 +17,9 @@ defaultmap="hydro" maxplayers="32" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game nucleardawn -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game nucleardawn -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -80,7 +82,6 @@ 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,7 +114,6 @@ 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 c3594cec8..41c057356 100644 --- a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg @@ -22,7 +22,9 @@ maxplayers="8" gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game nmrih -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game nmrih -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -85,7 +87,6 @@ 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,7 +119,6 @@ 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 f6e717698..1ccb9706e 100644 --- a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg @@ -24,7 +24,9 @@ serverpassword="" # -password \"${serverpassword}\" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -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}\"" +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}\"" +} #### LinuxGSM Settings #### @@ -87,7 +89,6 @@ 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,7 +121,6 @@ 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 a4b93ad93..c132d539d 100644 --- a/lgsm/config-default/config-lgsm/ns2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ns2server/_default.cfg @@ -28,7 +28,9 @@ serverpassword="" # -password \"${serverpassword}\" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -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}\"" +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}\"" +} #### LinuxGSM Settings #### @@ -91,7 +93,6 @@ 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="" @@ -124,7 +125,6 @@ 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 6ef66dc68..2a2425f73 100644 --- a/lgsm/config-default/config-lgsm/nsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/nsserver/_default.cfg @@ -16,7 +16,9 @@ defaultmap="ns_hera" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game ns -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game ns -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -79,7 +81,6 @@ 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,7 +113,6 @@ 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 fc795cc6a..d564020ed 100644 --- a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg @@ -9,7 +9,9 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="--config ${servercfgfullpath}" +fn_parms(){ +parms="--config ${servercfgfullpath}" +} #### LinuxGSM Settings #### @@ -72,7 +74,6 @@ 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="" @@ -105,7 +106,6 @@ 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 ccd430e6f..f0e54f511 100644 --- a/lgsm/config-default/config-lgsm/opforserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/opforserver/_default.cfg @@ -16,7 +16,9 @@ defaultmap="op4_bootcamp" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game gearbox -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game gearbox -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -79,7 +81,6 @@ 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,7 +113,6 @@ 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 231948872..c02992f92 100644 --- a/lgsm/config-default/config-lgsm/pcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pcserver/_default.cfg @@ -9,7 +9,9 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="--config ${servercfg}" +fn_parms(){ +parms="--config ${servercfg}" +} #### LinuxGSM Settings #### @@ -72,7 +74,6 @@ 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="" @@ -105,7 +106,6 @@ 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 deleted file mode 100644 index 8369b782c..000000000 --- a/lgsm/config-default/config-lgsm/pmcserver/_default.cfg +++ /dev/null @@ -1,173 +0,0 @@ -################################## -######## 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 2a8a9cbc6..62a8af0ba 100644 --- a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg @@ -19,7 +19,9 @@ maxplayers="40" reservedslots="0" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="MULTIHOME=${ip} RANDOM=${randommap} Port=${port} QueryPort=${queryport} RCONPORT=${rconport} FIXEDMAXPLAYERS=${maxplayers} NumReservedSlots=${reservedslots}" +fn_parms(){ +parms="MULTIHOME=${ip} RANDOM=${randommap} Port=${port} QueryPort=${queryport} RCONPORT=${rconport} FIXEDMAXPLAYERS=${maxplayers} NumReservedSlots=${reservedslots}" +} #### LinuxGSM Settings #### @@ -82,7 +84,6 @@ 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,7 +116,6 @@ 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 7003c4a8e..96442da3d 100644 --- a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg @@ -17,7 +17,9 @@ defaultmap="bt_island" maxplayers="24" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game pvkii -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game pvkii -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -80,7 +82,6 @@ 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,7 +114,6 @@ 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 3fa9a8864..0177b2a95 100644 --- a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg @@ -16,7 +16,9 @@ port="7777" defaultmap="datacenter" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="${defaultmap} -log -MultiHome=${ip} -Port=${port}" +fn_parms(){ +parms="${defaultmap} -log -MultiHome=${ip} -Port=${port}" +} #### LinuxGSM Settings #### @@ -79,7 +81,6 @@ 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,7 +113,6 @@ 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 720db40d5..ab22be682 100644 --- a/lgsm/config-default/config-lgsm/pzserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/pzserver/_default.cfg @@ -13,7 +13,9 @@ ip="0.0.0.0" adminpassword="CHANGE_ME" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-ip ${ip} -adminpassword \"${adminpassword}\" -servername ${selfname}" +fn_parms(){ +parms="-ip ${ip} -adminpassword \"${adminpassword}\" -servername ${selfname}" +} #### LinuxGSM Settings #### @@ -76,7 +78,6 @@ 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,7 +110,6 @@ 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 cc11f34a8..63306512d 100644 --- a/lgsm/config-default/config-lgsm/q2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q2server/_default.cfg @@ -14,7 +14,9 @@ port="27910" defaultmap="q2dm1" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="+set dedicated 1 +set ip ${ip} +set port ${port} +exec ${servercfg} +set deathmatch 1 +map ${defaultmap}" +fn_parms(){ +parms="+set dedicated 1 +set ip ${ip} +set port ${port} +exec ${servercfg} +set deathmatch 1 +map ${defaultmap}" +} #### LinuxGSM Settings #### @@ -77,7 +79,6 @@ 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 e7c003815..8ff151fc0 100644 --- a/lgsm/config-default/config-lgsm/q3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/q3server/_default.cfg @@ -14,7 +14,9 @@ port="27960" defaultmap="q3dm17" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -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}" +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}" +} #### LinuxGSM Settings #### @@ -77,7 +79,6 @@ 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 69ed4d662..25d1f43bc 100644 --- a/lgsm/config-default/config-lgsm/qlserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qlserver/_default.cfg @@ -9,7 +9,9 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="+exec ${servercfg}" +fn_parms(){ +parms="+exec ${servercfg}" +} #### LinuxGSM Settings #### @@ -72,7 +74,6 @@ 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="" @@ -105,7 +106,6 @@ 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 7f5484895..e4541086c 100644 --- a/lgsm/config-default/config-lgsm/qwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/qwserver/_default.cfg @@ -13,7 +13,9 @@ ip="0.0.0.0" port="27500" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-port ${port} -game ktx +exec ${servercfg}" +fn_parms(){ +parms="-port ${port} -game ktx +exec ${servercfg}" +} #### LinuxGSM Settings #### @@ -76,7 +78,6 @@ 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 93a9a8432..c443cbb47 100644 --- a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg @@ -16,7 +16,9 @@ defaultmap="rc_arena" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game ricochet -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game ricochet -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -79,7 +81,6 @@ 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,7 +113,6 @@ 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 36ad5d5e8..f5659b550 100644 --- a/lgsm/config-default/config-lgsm/roserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/roserver/_default.cfg @@ -17,7 +17,9 @@ ip="0.0.0.0" defaultmap="RO-Arad.rom" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="server ${defaultmap}?game=ROGame.ROTeamGame?VACSecured=true -nohomedir ini=${servercfg} log=${gamelog}" +fn_parms(){ +parms="server ${defaultmap}?game=ROGame.ROTeamGame?VACSecured=true -nohomedir ini=${servercfg} log=${gamelog}" +} #### LinuxGSM Settings #### @@ -80,7 +82,6 @@ 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,7 +114,6 @@ 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 54571e2af..f2647542b 100644 --- a/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg @@ -14,7 +14,9 @@ port="27960" defaultmap="mp_beach" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="+set sv_punkbuster 0 +set fs_basepath ${serverfiles} +set dedicated 1 +set net_ip ${ip} +set net_port ${port} +exec ${servercfg} +map ${defaultmap}" +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}" +} #### LinuxGSM Settings #### @@ -77,7 +79,6 @@ 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 c956b492c..b518b00ba 100644 --- a/lgsm/config-default/config-lgsm/rustserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg @@ -14,20 +14,19 @@ port="28015" rconport="28016" appport=28082 rconpassword="CHANGE_ME" -rconweb="1" # Value is: 1 for the Facepunch web panel, Rustadmin desktop and Rustadmin Online; 0 for RCON tools like Rusty. +rconweb="1" # Value is: 1 for the Facepunch web panel; 0 for RCON tools like Rusty or Rustadmin. servername="Rust" -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}\" +maxplayers="50" 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 -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" +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" +} #### LinuxGSM Settings #### @@ -90,7 +89,6 @@ 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,7 +108,7 @@ logdays="7" ## Monitor | https://docs.linuxgsm.com/commands/monitor # Query delay time -querydelay="10" +querydelay="5" ## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors ansi="on" @@ -123,7 +121,6 @@ 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 3ff7bc137..cddf99818 100644 --- a/lgsm/config-default/config-lgsm/rwserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/rwserver/_default.cfg @@ -12,7 +12,9 @@ javaram="2048" # -Xmx$2048M ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="" +fn_parms(){ +parms="" +} #### LinuxGSM Settings #### @@ -75,7 +77,6 @@ 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 +109,6 @@ 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,8 +154,7 @@ glibc="null" ## Game Server Directories systemdir="${serverfiles}" executabledir="${serverfiles}" -preexecutable="java -Xmx${javaram}M -jar" -executable="./server.jar" +executable="java -Xmx${javaram}m -jar ${serverfiles}/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 d1add1c0e..4f88ee743 100644 --- a/lgsm/config-default/config-lgsm/sampserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sampserver/_default.cfg @@ -13,7 +13,9 @@ ip="0.0.0.0" port="7777" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="" +fn_parms(){ +parms="" +} #### LinuxGSM Settings #### @@ -76,7 +78,6 @@ 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 438a37e0a..c0867e1c8 100644 --- a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg @@ -17,7 +17,9 @@ 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 -startparameters="Port=${port}?QueryPort=${queryport} -startup_map ${defaultmap} -server_name \"${servername}\"" +fn_parms(){ +parms="Port=${port}?QueryPort=${queryport} -startup_map ${defaultmap} -server_name \"${servername}\"" +} #### LinuxGSM Settings #### @@ -80,7 +82,6 @@ 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,7 +114,6 @@ 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 03093c44c..b3bffbcad 100644 --- a/lgsm/config-default/config-lgsm/sbserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sbserver/_default.cfg @@ -16,7 +16,9 @@ steampass='password' ip="0.0.0.0" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="" +fn_parms(){ +parms="" +} #### LinuxGSM Settings #### @@ -79,7 +81,6 @@ 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,7 +113,6 @@ 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 deleted file mode 100644 index 871d8d18c..000000000 --- a/lgsm/config-default/config-lgsm/scpslserver/_default.cfg +++ /dev/null @@ -1,180 +0,0 @@ -################################## -######## 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 deleted file mode 100644 index 7a4c80253..000000000 --- a/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg +++ /dev/null @@ -1,180 +0,0 @@ -################################## -######## 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 d8ca86974..3dad1f106 100644 --- a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg @@ -12,7 +12,9 @@ ip="0.0.0.0" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-quit -batchmode -nographics -dedicated -configfile=${servercfgfullpath}" +fn_parms(){ +parms="-quit -batchmode -nographics -dedicated -configfile=${servercfgfullpath}" +} #### LinuxGSM Settings #### @@ -75,7 +77,6 @@ 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 +109,6 @@ 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 deleted file mode 100644 index d8ded6aa9..000000000 --- a/lgsm/config-default/config-lgsm/secrets-common-template.cfg +++ /dev/null @@ -1,5 +0,0 @@ -################################## -######## 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 deleted file mode 100644 index 5446d3718..000000000 --- a/lgsm/config-default/config-lgsm/secrets-instance-template.cfg +++ /dev/null @@ -1,5 +0,0 @@ -################################## -####### 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 8dc17afb9..746b9e84c 100644 --- a/lgsm/config-default/config-lgsm/sfcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg @@ -17,7 +17,9 @@ defaultmap="sf_astrodome" maxplayers="32" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game sfclassic -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game sfclassic -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -80,7 +82,6 @@ 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,7 +114,6 @@ 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 36922b437..79b6ff01b 100644 --- a/lgsm/config-default/config-lgsm/sof2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/sof2server/_default.cfg @@ -14,7 +14,9 @@ port="20100" defaultmap="mp_shop" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="+set sv_punkbuster 0 +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +exec ${servercfg} +map ${defaultmap}" +fn_parms(){ +parms="+set sv_punkbuster 0 +set dedicated 2 +set net_ip ${ip} +set net_port ${port} +exec ${servercfg} +map ${defaultmap}" +} #### LinuxGSM Settings #### @@ -77,7 +79,6 @@ 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 6ce6ce1cf..b0fda3b81 100644 --- a/lgsm/config-default/config-lgsm/solserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/solserver/_default.cfg @@ -13,7 +13,9 @@ ip="0.0.0.0" maplist="mapslist.txt" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-b ${ip} -m ${maplist} -c ${servercfg}" +fn_parms(){ +parms="-b ${ip} -m ${maplist} -c ${servercfg}" +} #### LinuxGSM Settings #### @@ -76,15 +78,11 @@ 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" @@ -109,12 +107,9 @@ 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 a4d8496d8..c329b06b4 100644 --- a/lgsm/config-default/config-lgsm/squadserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/squadserver/_default.cfg @@ -14,7 +14,9 @@ queryport="27165" randommap="ALWAYS" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="MULTIHOME=${ip} RANDOM=${randommap} Port=${port} QueryPort=${queryport}" +fn_parms(){ +parms="MULTIHOME=${ip} RANDOM=${randommap} Port=${port} QueryPort=${queryport}" +} #### LinuxGSM Settings #### @@ -77,7 +79,6 @@ 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,7 +111,6 @@ 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 c58182cdd..d7caf33e6 100644 --- a/lgsm/config-default/config-lgsm/stserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/stserver/_default.cfg @@ -19,7 +19,9 @@ worldname="moon_save" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters # Edit with care -startparameters="-batchmode -nographics -autostart -gameport=${port} -updateport=${queryport} -worldtype=${worldtype} -loadworld=${worldname} -worldname=${worldname} -autosaveinterval=${autosaveinterval} -clearallinterval=${clearinterval}" +fn_parms(){ +parms="-batchmode -nographics -autostart -gameport=${port} -updateport=${queryport} -worldtype=${worldtype} -loadworld=${worldname} -worldname=${worldname} -autosaveinterval=${autosaveinterval} -clearallinterval=${clearinterval}" +} #### LinuxGSM Settings #### @@ -82,7 +84,6 @@ 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,7 +116,6 @@ 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 1d7b97c7f..908dd046d 100644 --- a/lgsm/config-default/config-lgsm/svenserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/svenserver/_default.cfg @@ -16,7 +16,9 @@ defaultmap="svencoop1" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game svencoop -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} +maxplayers ${maxplayers}" +fn_parms(){ +parms="-game svencoop -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} +maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -79,7 +81,6 @@ 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,7 +113,6 @@ 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 27306d89e..79e683f65 100644 --- a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg @@ -16,7 +16,9 @@ steampass='password' ip="0.0.0.0" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-config ${servercfgfullpath}" +fn_parms(){ +parms="-config ${servercfgfullpath}" +} #### LinuxGSM Settings #### @@ -79,7 +81,6 @@ 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,7 +113,6 @@ 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 72f79304d..3aa580d39 100644 --- a/lgsm/config-default/config-lgsm/tf2server/_default.cfg +++ b/lgsm/config-default/config-lgsm/tf2server/_default.cfg @@ -22,7 +22,9 @@ maxplayers="16" gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game tf -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game tf -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +sv_setsteamaccount ${gslt} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -85,7 +87,6 @@ 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,7 +119,6 @@ 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 a9339fda9..c29b43642 100644 --- a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg @@ -16,7 +16,9 @@ defaultmap="dustbowl" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game tfc -strictportbind _ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game tfc -strictportbind _ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -79,7 +81,6 @@ 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,7 +113,6 @@ 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 3bfaf5d10..34cb54fb8 100644 --- a/lgsm/config-default/config-lgsm/ts3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ts3server/_default.cfg @@ -9,7 +9,9 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="inifile=${servercfgfullpath} pid_file=ts3server.pid" +fn_parms(){ +parms="inifile=${servercfgfullpath} pid_file=ts3server.pid" +} #### LinuxGSM Settings #### @@ -72,7 +74,6 @@ 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 b9ad02e2b..fb4fb9f01 100644 --- a/lgsm/config-default/config-lgsm/tsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tsserver/_default.cfg @@ -16,7 +16,9 @@ defaultmap="ts_neobaroque" maxplayers="32" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game ts -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers} " +fn_parms(){ +parms="-game ts -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers} " +} #### LinuxGSM Settings #### @@ -79,7 +81,6 @@ 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,7 +113,6 @@ 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 c0a119abe..eed1cbdcb 100644 --- a/lgsm/config-default/config-lgsm/tuserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/tuserver/_default.cfg @@ -19,7 +19,9 @@ queryport="27015" gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-log -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -TowerServerINI=${selfname}.ini" +fn_parms(){ +parms="-log -MultiHome=${ip} -Port=${port} -QueryPort=${queryport} -TowerServerINI=${selfname}.ini" +} #### LinuxGSM Settings #### @@ -82,7 +84,6 @@ 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,7 +116,6 @@ 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 c8a53240e..9140ed859 100644 --- a/lgsm/config-default/config-lgsm/twserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/twserver/_default.cfg @@ -16,7 +16,9 @@ steampass='password' ip="0.0.0.0" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-f ${servercfg}" +fn_parms(){ +parms="-f ${servercfg}" +} #### LinuxGSM Settings #### @@ -79,7 +81,6 @@ 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,7 +113,6 @@ 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 507005e58..1a8230e0a 100644 --- a/lgsm/config-default/config-lgsm/untserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/untserver/_default.cfg @@ -15,7 +15,9 @@ maxplayers="20" defaultmap="pei" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-port:${port} -players:${maxplayers} --nographics -${defaultmap} -batchmode +secureserver/${selfname}" +fn_parms(){ +parms="-port:${port} -players:${maxplayers} --nographics -${defaultmap} -batchmode +secureserver/${selfname}" +} #### LinuxGSM Settings #### @@ -78,7 +80,6 @@ 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,7 +112,6 @@ 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 cba690fd7..1bf464c29 100644 --- a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg @@ -13,7 +13,9 @@ defaultmap="DM-Rankin" ip="0.0.0.0" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="server ${defaultmap}?game=XGame.xDeathMatch -nohomedir ini=${servercfg} log=${gamelog}" +fn_parms(){ +parms="server ${defaultmap}?game=XGame.xDeathMatch -nohomedir ini=${servercfg} log=${gamelog}" +} #### LinuxGSM Settings #### @@ -76,7 +78,6 @@ 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 727e79df7..e8f93eb02 100644 --- a/lgsm/config-default/config-lgsm/ut3server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut3server/_default.cfg @@ -28,8 +28,10 @@ gsusername="" gspassword="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -# 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}" +# 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}" +} #### LinuxGSM Settings #### @@ -92,7 +94,6 @@ 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 c0bb5619a..70699e1c4 100644 --- a/lgsm/config-default/config-lgsm/ut99server/_default.cfg +++ b/lgsm/config-default/config-lgsm/ut99server/_default.cfg @@ -13,7 +13,9 @@ defaultmap="DM-Deck16][" ip="0.0.0.0" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="server ${defaultmap}.unr ini=${servercfgfullpath}" +fn_parms(){ +parms="server ${defaultmap}.unr ini=${servercfgfullpath}" +} #### LinuxGSM Settings #### @@ -76,7 +78,6 @@ 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 ed19edd39..a21c4a1bc 100644 --- a/lgsm/config-default/config-lgsm/utserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/utserver/_default.cfg @@ -17,7 +17,9 @@ gametype="DM" timelimit="10" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="UnrealTournament ${defaultmap}?Game=${gametype}?TimeLimit=${timelimit} -port=${port}" +fn_parms(){ +parms="UnrealTournament ${defaultmap}?Game=${gametype}?TimeLimit=${timelimit} -port=${port}" +} #### LinuxGSM Settings #### @@ -80,7 +82,6 @@ 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 deleted file mode 100644 index 096faf2a4..000000000 --- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg +++ /dev/null @@ -1,181 +0,0 @@ -################################## -######## 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 deleted file mode 100644 index 42b6c42fa..000000000 --- a/lgsm/config-default/config-lgsm/vintsserver/_default.cfg +++ /dev/null @@ -1,170 +0,0 @@ -################################## -######## 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 dace8b1ab..f6bb4394c 100644 --- a/lgsm/config-default/config-lgsm/vsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/vsserver/_default.cfg @@ -16,7 +16,9 @@ defaultmap="vs_frost" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game vs -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game vs -strictportbind +ip ${ip} -port ${port} +clientport ${clientport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -79,7 +81,6 @@ 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,7 +113,6 @@ 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 296b7bd16..b9ed41c69 100644 --- a/lgsm/config-default/config-lgsm/wetserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wetserver/_default.cfg @@ -9,7 +9,9 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="+set net_strict 1 +set fs_homepath ${serverfiles} +exec ${servercfg}" +fn_parms(){ +parms="+set net_strict 1 +set fs_homepath ${serverfiles} +exec ${servercfg}" +} #### LinuxGSM Settings #### @@ -72,7 +74,6 @@ 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 5bb63c67f..73f0bb8df 100644 --- a/lgsm/config-default/config-lgsm/wfserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wfserver/_default.cfg @@ -14,7 +14,9 @@ port="44400" httpport="44444" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="+exec ${servercfg} +sv_http_ip ${ip} +set sv_http_port ${httpport} +sv_ip ${ip} +sv_port ${port}" +fn_parms(){ +parms="+exec ${servercfg} +sv_http_ip ${ip} +set sv_http_port ${httpport} +sv_ip ${ip} +sv_port ${port}" +} #### LinuxGSM Settings #### @@ -77,15 +79,11 @@ 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,17 +105,6 @@ 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 @@ -141,6 +128,16 @@ 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 deleted file mode 100644 index b0df8cbfd..000000000 --- a/lgsm/config-default/config-lgsm/wmcserver/_default.cfg +++ /dev/null @@ -1,173 +0,0 @@ -################################## -######## 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 49b342436..0ad05ae4b 100644 --- a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg @@ -9,8 +9,11 @@ #### Game Server Settings #### ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -# 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\"" +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\"" +} #### LinuxGSM Settings #### @@ -73,15 +76,11 @@ 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" @@ -106,7 +105,6 @@ 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="" @@ -152,13 +150,11 @@ glibc="2.14" ## Game Server Directories systemdir="${serverfiles}" executabledir="${systemdir}" -preexecutable="xvfb-run" -executable="./WurmServerLauncher" +executable="xvfb-run ./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 b5bfa3359..ce5cb3329 100644 --- a/lgsm/config-default/config-lgsm/zmrserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg @@ -17,7 +17,9 @@ defaultmap="zm_docksofthedead" maxplayers="16" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game zombie_master_reborn -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game zombie_master_reborn -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -80,7 +82,6 @@ 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,7 +114,6 @@ 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 bf3c26e22..cf26a9e84 100644 --- a/lgsm/config-default/config-lgsm/zpsserver/_default.cfg +++ b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg @@ -22,7 +22,9 @@ maxplayers="20" gslt="" ## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters -startparameters="-game zps -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +fn_parms(){ +parms="-game zps -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" +} #### LinuxGSM Settings #### @@ -85,7 +87,6 @@ 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,7 +119,6 @@ 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 deleted file mode 100644 index d63ee5c3d..000000000 Binary files a/lgsm/data/bo_header.jpg and /dev/null differ diff --git a/lgsm/data/rust_header.jpg b/lgsm/data/rust_header.jpg deleted file mode 100644 index e4006b070..000000000 Binary files a/lgsm/data/rust_header.jpg and /dev/null differ diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 687a3f63d..ad3bc9a19 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -21,7 +21,6 @@ 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 @@ -68,7 +67,6 @@ 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 @@ -85,8 +83,6 @@ 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 @@ -106,12 +102,9 @@ 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 c1c823fac..01de5f0c7 100755 --- a/lgsm/functions/README.md +++ b/lgsm/functions/README.md @@ -1,16 +1,16 @@ -# LinuxGSM - Modules +# Linux Game Server Manager - Functions -These modules are scripts that are called upon by the primary script linuxgsm.sh +These functions are universal functions that work in all scripts. -## Module Names -Modules have been named to give an idea of what the function does. +## Function Names +Functions have been named to give an idea of what the function does. -* core: Essential modules that will always run first. +* core: Essential functions that will always run first. * command: Primary command function. * check: Runs checks that will either halt on or fix an issue. -* dev: development modules. +* dev: development functions. * fix: Applies a game server specific fix. * info: retrieves information from a source such as config file or the OS. -* install: modules related to the installer. -* monitor: modules related to monitor. -* update: modules that update the game server. +* install: Functions related to the installer. +* monitor: Functions related to monitor. +* update: Functions that update the game server. diff --git a/lgsm/functions/alert.sh b/lgsm/functions/alert.sh index 5fd999728..3b54230eb 100755 --- a/lgsm/functions/alert.sh +++ b/lgsm/functions/alert.sh @@ -1,14 +1,11 @@ #!/bin/bash -# LinuxGSM alert.sh module +# LinuxGSM alert.sh function # 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 @@ -63,15 +60,6 @@ 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" @@ -100,8 +88,6 @@ 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 @@ -118,6 +104,12 @@ 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 1d047b60b..a8ce373f0 100755 --- a/lgsm/functions/alert_discord.sh +++ b/lgsm/functions/alert_discord.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM alert_discord.sh module +# LinuxGSM alert_discord.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributor: faflfama, diamondburned # Website: https://linuxgsm.com # Description: Sends Discord alert. @@ -15,13 +15,13 @@ fi json=$(cat < +# Website: https://bytegaming.de # Description: Sends Telegram Messenger alert. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" @@ -17,7 +16,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://${telegramapi}/bot${telegramtoken}/sendMessage" | grep "error_code") +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") 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 523445c5d..7ce2e9824 100755 --- a/lgsm/functions/check.sh +++ b/lgsm/functions/check.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM check.sh module +# LinuxGSM check.sh function # 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 5b8d51691..2b4443cb3 100755 --- a/lgsm/functions/check_config.sh +++ b/lgsm/functions/check_config.sh @@ -1,27 +1,31 @@ #!/bin/bash -# LinuxGSM check_config.sh module +# LinuxGSM check_config.sh function # 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 [ -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 +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 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" +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 fi diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index 722a0a4da..7a43e2f3a 100755 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/functions/check_deps.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM check_deps.sh module +# LinuxGSM check_deps.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Checks if required dependencies are installed for LinuxGSM. @@ -186,7 +185,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" ]; } || { [ "${distroid}" == "pop" ]&&[ "${distroversion}" == "20.10" ]; }; then + if { [ "${distroid}" == "debian" ]&&[ "${distroversion}" == "11" ]; }||{ [ "${distroid}" == "ubuntu" ]&&[ "${distroversion}" == "20.10" ]; }; then if [ "${deptocheck}" == "glibc.i686" ]||[ "${deptocheck}" == "libstdc++64.i686" ]||[ "${deptocheck}" == "lib32gcc-s1" ]||[ "${deptocheck}" == "lib32stdc++6" ]; then steamcmdfail=1 fi @@ -344,13 +343,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 cpio ) + array_deps_required=( curl wget ca-certificates file bsdmainutils util-linux python3 tar bzip2 gzip unzip binutils bc jq tmux netcat ) # All servers except ts3, mumble, GTA and minecraft servers require lib32stdc++6 and lib32gcc1. - if [ "${shortname}" != "ts3" ]&&[ "${shortname}" != "mumble" ]&&[ "${shortname}" != "mc" ]&&[ "${shortname}" != "pmc" ]&&[ "${shortname}" != "wmc" ]&&[ "${engine}" != "renderware" ]; then + if [ "${shortname}" != "ts3" ]&&[ "${shortname}" != "mumble" ]&&[ "${shortname}" != "mc" ]&&[ "${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" ]; }||{ [ "${distroid}" == "pop" ]&&[ "${distroversion}" == "20.10" ]; }; then + if { [ "${distroid}" == "debian" ]&&[ "${distroversion}" == "11" ]; }|| { [ "${distroid}" == "ubuntu" ]&&[ "${distroversion}" == "20.10" ]; }; then array_deps_required+=( lib32gcc-s1 lib32stdc++6 ) else array_deps_required+=( lib32gcc1 lib32stdc++6 ) @@ -365,7 +364,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 libsdl2-2.0-0:i386 ) + array_deps_required+=( steamcmd ) fi fi @@ -386,9 +385,6 @@ 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 @@ -414,20 +410,8 @@ fn_deps_build_debian(){ # Hurtword/Rust elif [ "${shortname}" == "hw" ]||[ "${shortname}" == "rust" ]; then array_deps_required+=( lib32z1 ) - # 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 + # Minecraft, Rising World, Wurm + elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "rw" ]; then javaversion=$(java -version 2>&1 | grep "version") if [ "${javaversion}" ]; then # Added for users using Oracle JRE to bypass the check. @@ -447,34 +431,28 @@ 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 ) - # Vintage Story - elif [ "${shortname}" == "vints" ]; then - array_deps_required+=( mono-complete ) + # 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 ) # 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 } @@ -486,15 +464,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 cpio ) + array_deps_required=( epel-release curl wget util-linux python3 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat ) 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 cpio ) + array_deps_required=( epel-release curl wget util-linux python36 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat ) elif [ "${distroid}" == "fedora" ]; then - array_deps_required=( curl wget util-linux python3 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat cpio ) + array_deps_required=( curl wget util-linux python3 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat ) 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 cpio ) + array_deps_required=( curl wget util-linux python3 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat ) else - array_deps_required=( curl wget util-linux python3 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat cpio ) + array_deps_required=( curl wget util-linux python3 file tar gzip bzip2 unzip binutils bc jq tmux nmap-ncat ) fi # All servers except ts3, mumble, multi theft auto and minecraft servers require glibc.i686 and libstdc++.i686. @@ -523,8 +501,8 @@ fn_deps_build_redhat(){ # Battlefield: Vietnam elif [ "${shortname}" == "bfv" ]; then array_deps_required+=( compat-libstdc++-33.i686 glibc.i686 ) - # 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 + # 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 array_deps_required+=( ncurses-libs.i686 ) # Brainbread 2, Don't Starve Together & Team Fortress 2 elif [ "${shortname}" == "bb2" ]||[ "${shortname}" == "dst" ]||[ "${shortname}" == "tf2" ]; then @@ -542,7 +520,7 @@ fn_deps_build_redhat(){ elif [ "${shortname}" == "hw" ]||[ "${shortname}" == "rust" ]; then array_deps_required+=( zlib-devel ) # Minecraft, Rising World, Wurm - elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]||[ "${shortname}" == "wmc" ]||[ "${shortname}" == "rw" ]; then + elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "rw" ]; then javaversion=$(java -version 2>&1 | grep "version") if [ "${javaversion}" ]; then # Added for users using Oracle JRE to bypass the check. @@ -565,28 +543,25 @@ fn_deps_build_redhat(){ # Sven Co-op elif [ "${shortname}" == "sven" ]; then : # not compatible - # Vintage Story - elif [ "${shortname}" == "vints" ]; then - array_deps_required+=( mono-complete ) + # 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 ) # 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 252c6c8d2..8623dc303 100755 --- a/lgsm/functions/check_executable.sh +++ b/lgsm/functions/check_executable.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM check_executable.sh module +# LinuxGSM check_executable.sh function # 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 b1a959f5b..02f7ad459 100755 --- a/lgsm/functions/check_glibc.sh +++ b/lgsm/functions/check_glibc.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM check_glibc.sh module +# LinuxGSM check_glibc.sh function # 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 ae1b99b77..a4ddf7ae0 100755 --- a/lgsm/functions/check_ip.sh +++ b/lgsm/functions/check_ip.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM check_ip.sh module +# LinuxGSM check_ip.sh function # 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 07e9d3883..99253d749 100755 --- a/lgsm/functions/check_last_update.sh +++ b/lgsm/functions/check_last_update.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM check_last_update.sh module +# LinuxGSM check_last_update.sh function # 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 b8dad203c..694b1678a 100755 --- a/lgsm/functions/check_logs.sh +++ b/lgsm/functions/check_logs.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM check_logs.sh module +# LinuxGSM check_logs.sh function # 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 d4421dba1..7f95f5da7 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 -# Contributors: http://linuxgsm.com/contrib +# Contributor: UltimateByte # 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 1eb6309cb..b6886938f 100755 --- a/lgsm/functions/check_root.sh +++ b/lgsm/functions/check_root.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM check_root.sh module +# LinuxGSM check_root.sh function # 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 670669e50..178adcf6b 100755 --- a/lgsm/functions/check_status.sh +++ b/lgsm/functions/check_status.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM check_status.sh module +# LinuxGSM check_status.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributor: UltimateByte # 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 030cbbf03..647ee7525 100755 --- a/lgsm/functions/check_steamcmd.sh +++ b/lgsm/functions/check_steamcmd.sh @@ -1,14 +1,150 @@ #!/bin/bash -# LinuxGSM check_steamcmd.sh module +# LinuxGSM check_steamcmd.sh function # 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]}")")" -# init steamcmd functions -core_steamcmd.sh +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 +} fn_check_steamcmd_clear fn_check_steamcmd @@ -17,6 +153,5 @@ 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 0a732d6d1..ce7ff5ba5 100755 --- a/lgsm/functions/check_system_dir.sh +++ b/lgsm/functions/check_system_dir.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM check_system_dir.sh module +# LinuxGSM check_system_dir.sh function # 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 cc72288fb..7a8b73de5 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 -# Contributors: http://linuxgsm.com/contrib +# Contributor: UltimateByte # 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" ]||[ "${shortname}" == "pmc" ]||[ "${shortname}" == "wmc" ]; then +elif [ "${shortname}" == "mc" ]; 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 e11b55861..4f5fd2e29 100755 --- a/lgsm/functions/check_tmuxception.sh +++ b/lgsm/functions/check_tmuxception.sh @@ -1,9 +1,9 @@ #!/bin/bash -# LinuxGSM check_config.sh module +# LinuxGSM check_config.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributor: UltimateByte # 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 a0f3d4435..15f0284bb 100755 --- a/lgsm/functions/check_version.sh +++ b/lgsm/functions/check_version.sh @@ -1,13 +1,10 @@ #!/bin/bash -# LinuxGSM command_version.sh module +# LinuxGSM command_version.sh function # 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 100644 new mode 100755 index adce957c9..e778cb8a6 --- a/lgsm/functions/command_backup.sh +++ b/lgsm/functions/command_backup.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM command_backup.sh module +# LinuxGSM command_backup.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributor: UltimateByte # Website: https://linuxgsm.com # Description: Creates a .tar.gz file in the backup directory. @@ -24,8 +24,6 @@ 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 } @@ -255,11 +253,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 deleted file mode 100755 index 9648dd49e..000000000 --- a/lgsm/functions/command_check_update.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/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 5b84789e6..0de924ea6 100755 --- a/lgsm/functions/command_console.sh +++ b/lgsm/functions/command_console.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM command_console.sh module +# LinuxGSM command_console.sh function # 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 aac203ac9..fe2e8a38e 100755 --- a/lgsm/functions/command_debug.sh +++ b/lgsm/functions/command_debug.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM command_debug.sh module +# LinuxGSM command_debug.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Runs the server without tmux and directly from the terminal. @@ -29,6 +28,7 @@ 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,15 +67,11 @@ 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} ${startparameters} -debug" -elif [ "${engine}" == "quake" ]; then - echo -e "${executable} ${startparameters} -condebug" + echo -e "${executable} ${parms} -debug" else - echo -e "${preexecutable} ${executable} ${startparameters}" + echo -e "${executable} ${parms}" fi echo -e "" echo -e "Use for identifying server issues only!" @@ -105,19 +101,18 @@ fn_script_log_info "Lockfile generated" fn_script_log_info "${lockdir}/${selfname}.lock" cd "${executabledir}" || exit -# Note: do not add double quotes to ${executable} ${startparameters}. +# Note: do not add double quotes to ${executable} ${parms}. if [ "${engine}" == "source" ]||[ "${engine}" == "goldsrc" ]; then - ${executable} ${startparameters} -debug + ${executable} ${parms} -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} ${startparameters} -condebug + ${executable} ${parms} -condebug else - # shellcheck disable=SC2086 - ${preexecutable} ${executable} ${startparameters} + ${executable} ${parms} fi fn_lockfile_trap diff --git a/lgsm/functions/command_details.sh b/lgsm/functions/command_details.sh index 14765ca99..2db605656 100755 --- a/lgsm/functions/command_details.sh +++ b/lgsm/functions/command_details.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM command_details.sh module +# LinuxGSM command_details.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributor: UltimateByte # Website: https://linuxgsm.com # Description: Displays server information. @@ -32,6 +32,7 @@ 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 87c77515d..96a637c52 100755 --- a/lgsm/functions/command_dev_clear_functions.sh +++ b/lgsm/functions/command_dev_clear_functions.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM command_dev_clear_functions.sh module +# command_dev_clear_functions.sh function # 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 957709898..e959509cd 100755 --- a/lgsm/functions/command_dev_debug.sh +++ b/lgsm/functions/command_dev_debug.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM command_dev_debug.sh module +# LinuxGSM command_dev_debug.sh function # 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 976bf94dc..2a620fd66 100755 --- a/lgsm/functions/command_dev_detect_deps.sh +++ b/lgsm/functions/command_dev_detect_deps.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM command_dev_detect_deps.sh module +# LinuxGSM command_dev_detect_deps.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Detects dependencies the server binary requires. @@ -156,11 +155,6 @@ 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 304d255fd..e538c456e 100755 --- a/lgsm/functions/command_dev_detect_glibc.sh +++ b/lgsm/functions/command_dev_detect_glibc.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM command_dev_detect_glibc.sh module +# LinuxGSM command_dev_detect_glibc.sh function # 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 7d6e942a1..e6ddfb09f 100755 --- a/lgsm/functions/command_dev_detect_ldd.sh +++ b/lgsm/functions/command_dev_detect_ldd.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM command_dev_detect_ldd.sh module +# command_dev_detect_ldd.sh function # 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 7c2dd95f9..ac1e9f688 100755 --- a/lgsm/functions/command_dev_query_raw.sh +++ b/lgsm/functions/command_dev_query_raw.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM command_dev_query_raw.sh module +# command_dev_query_raw.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Raw gamedig output of the server. @@ -52,7 +51,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" "nohash" + fn_fetch_file_github "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nomd5" 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 f00a4d702..18e6dce5a 100755 --- a/lgsm/functions/command_donate.sh +++ b/lgsm/functions/command_donate.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM command_donate.sh module +# LinuxGSM command_donate.sh function # 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 d6ab960bd..4f8ebd863 100755 --- a/lgsm/functions/command_fastdl.sh +++ b/lgsm/functions/command_fastdl.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM command_fastdl.sh module +# LinuxGSM command_fastdl.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributor: UltimateByte # 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" "*.vmt" "*.vtf" ) + local allowed_extentions_array=( "*.vtx" "*.vvd" "*.mdl" "*.phy" "*.jpg" "*.png" ) 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 e56890b4d..3e5d27872 100755 --- a/lgsm/functions/command_install.sh +++ b/lgsm/functions/command_install.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM command_install.sh module +# LinuxGSM command_install.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributor: UltimateByte # 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 3a94444a3..503948a3c 100755 --- a/lgsm/functions/command_install_resources_mta.sh +++ b/lgsm/functions/command_install_resources_mta.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM command_install_resources_mta.sh module +# LinuxGSM command_install_resources_mta.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Installs the default resources for Multi Theft Auto. @@ -14,7 +13,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" "nohash" + fn_fetch_file "http://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip" "" "" "" "${tmpdir}" "mtasa-resources-latest.zip" "nochmodx" "norun" "noforce" "nomd5" 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 a5eaaf83c..d644e0cf0 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 module +# LinuxGSM command_mods_install.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributor: UltimateByte # 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 8647a21ed..507251e87 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 module +# LinuxGSM command_mods_uninstall.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributor: UltimateByte # 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 50bbf9d67..9328a493d 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 module +# LinuxGSM command_mods_update.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributor: UltimateByte # 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 3602bef93..edc101012 100755 --- a/lgsm/functions/command_monitor.sh +++ b/lgsm/functions/command_monitor.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM command_monitor.sh module +# LinuxGSM command_monitor.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributor: UltimateByte # 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" "nohash" + fn_fetch_file_github "lgsm/functions" "query_gsquery.py" "${functionsdir}" "chmodx" "norun" "noforce" "nomd5" 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 fa2907b1e..0f18b12a9 100755 --- a/lgsm/functions/command_postdetails.sh +++ b/lgsm/functions/command_postdetails.sh @@ -1,9 +1,9 @@ #!/bin/bash -# LinuxGSM command_postdetails.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# LinuxGSM command_postdetails.sh function +# Author: CedarLUG +# Contributor: CedarLUG # 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,6 +52,7 @@ 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 47a6b904c..9498c618c 100755 --- a/lgsm/functions/command_restart.sh +++ b/lgsm/functions/command_restart.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM command_restart.sh module +# LinuxGSM command_restart.sh function # 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 deleted file mode 100644 index 4b653c0be..000000000 --- a/lgsm/functions/command_send.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/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 deleted file mode 100644 index 7b7d67d5f..000000000 --- a/lgsm/functions/command_skeleton.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/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 caa933320..897cc90aa 100755 --- a/lgsm/functions/command_start.sh +++ b/lgsm/functions/command_start.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM command_start.sh module +# LinuxGSM command_start.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributor: UltimateByte # Website: https://linuxgsm.com # Description: Starts the server. @@ -41,7 +41,9 @@ fn_start_jk2(){ fn_start_tmux(){ if [ "${parmsbypass}" ]; then - startparameters="" + parms="" + else + fn_parms fi # check for tmux size variables. if [[ "${servercfgtmuxwidth}" =~ ^[0-9]+$ ]]; then @@ -71,9 +73,8 @@ 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}" "${preexecutable} ${executable} ${startparameters}" 2> "${lgsmlogdir}/.${selfname}-tmux-error.tmp" + tmux new-session -d -x "${sessionwidth}" -y "${sessionheight}" -s "${sessionname}" "${executable} ${parms}" 2> "${lgsmlogdir}/.${selfname}-tmux-error.tmp" # Create logfile. touch "${consolelog}" @@ -81,22 +82,26 @@ fn_start_tmux(){ # Create last start lock file date +%s > "${lockdir}/${selfname}-laststart.lock" - # 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}" + # 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}" if [ "${consolelogging}" == "on" ]||[ -z "${consolelogging}" ]; then tmux pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'" fi - elif [ -n "${tmuxv}" ]; then + elif [ "${tmuxversion}" ]; then + # Get the digit version of tmux. + tmuxversion=$(tmux -V | sed "s/tmux //" | sed -n '1 p' | tr -cd '[:digit:]') # tmux pipe-pane not supported in tmux versions < 1.6. - if [ "${tmuxvdigit}" -lt "16" ]; then - echo -e "Console logging disabled: tmux => 1.6 required + if [ "${tmuxversion}" -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 [ "${tmuxvdigit}" -eq "18" ]; then + elif [ "${tmuxversion}" -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}" @@ -122,12 +127,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}\" \"${preexecutable} ${executable} ${startparameters}\"" | tee -a "${lgsmlog}" + echo -e "tmux new-session -d -s \"${sessionname}\" \"${executable} ${parms}\"" | tee -a "${lgsmlog}" echo -e "" echo -e "Error" echo -e "=================================" @@ -166,7 +171,7 @@ fn_start_tmux(){ fn_print_ok "${servername}" fn_script_log_pass "Started ${servername}" fi - rm "${lgsmlogdir:?}/.${selfname}-tmux-error.tmp" 2>/dev/null + rm "${lgsmlogdir:?}/.${selfname}-tmux-error.tmp" echo -en "\n" } diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index f0a0bf92c..439967fd0 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM command_stop.sh module +# LinuxGSM command_stop.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributors: UltimateByte # 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}" ENTER "${1}" ENTER > /dev/null 2>&1 + tmux send -t "${sessionname}" "${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 9397a445c..625d5c6c2 100755 --- a/lgsm/functions/command_test_alert.sh +++ b/lgsm/functions/command_test_alert.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM command_test_alert.sh module +# LinuxGSM command_test_alert.sh function # 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 1e227f3de..ff75b71d2 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 module +# LinuxGSM command_ts3_server_pass.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributor : UltimateByte # Website: https://linuxgsm.com # Description: Changes TS3 serveradmin password. diff --git a/lgsm/functions/command_update.sh b/lgsm/functions/command_update.sh index 828c8c38d..b117cbec5 100755 --- a/lgsm/functions/command_update.sh +++ b/lgsm/functions/command_update.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM command_update.sh module +# LinuxGSM command_update.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles updating of servers. @@ -21,8 +20,6 @@ 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 @@ -31,8 +28,6 @@ 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 4027c1e6d..7e0ec57b6 100755 --- a/lgsm/functions/command_update_linuxgsm.sh +++ b/lgsm/functions/command_update_linuxgsm.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM command_update_linuxgsm.sh module +# LinuxGSM command_update_linuxgsm.sh function # 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. @@ -58,7 +57,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" "nohash" + fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "nochmodx" "norun" "noforcedl" "nomd5" else fn_print_ok_eol_nl fn_script_log_pass "Checking ${remotereponame} linuxgsm.sh" @@ -138,7 +137,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" "nohash" + fn_fetch_file_github "lgsm/config-default/config-lgsm/${gameservername}" "_default.cfg" "${configdirdefault}/config-lgsm/${gameservername}" "nochmodx" "norun" "noforce" "nomd5" alert="config" alert.sh else diff --git a/lgsm/functions/command_validate.sh b/lgsm/functions/command_validate.sh index 4c51bacb3..690a86b43 100755 --- a/lgsm/functions/command_validate.sh +++ b/lgsm/functions/command_validate.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM command_validate.sh module +# LinuxGSM command_validate.sh function # 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 d2d05defc..3e0c53b2e 100755 --- a/lgsm/functions/command_wipe.sh +++ b/lgsm/functions/command_wipe.sh @@ -1,9 +1,9 @@ #!/bin/bash -# LinuxGSM command_backup.sh module +# LinuxGSM command_backup.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributor: UltimateByte # 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_print_fail_eol_nl + fn_script_log_fatal "${currentaction}" core_exit.sh else fn_print_ok_eol_nl @@ -22,160 +22,229 @@ fn_wipe_exit_code(){ } # Removes files to wipe server. -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 - 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 +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 - # 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 .sav file(s) to remove" - fn_script_log_pass "no .sav file(s) to remove" - fn_sleep_time - 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 - # 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)" + # 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_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_script_log_info "Removing blueprint file(s): ${serveridentitydir}/player.blueprints.*.db" + find "${serveridentitydir:?}" -type f -name "player.blueprints.*.db" -delete | tee -a "${lgsmlog}" fn_wipe_exit_code + fn_sleep_time else - echo -e "no .db file(s) to remove" + echo -e "no blueprint file to remove" fn_sleep_time - fn_script_log_pass "no .db file(s) to remove" + 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. fi } -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" +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" totalseconds=3 for seconds in {3..1}; do - fn_print_warn "Map wipe will reset the map data and keep blueprint data: ${totalseconds}" + fn_print_warn "this game server will be stopped during wipe: ${totalseconds}" totalseconds=$((totalseconds - 1)) sleep 1 if [ "${seconds}" == "0" ]; then break fi done - fn_print_warn_nl "Map wipe will reset the map data and keep blueprint data" + fn_print_warn_nl "this game server will be stopped during wipe" } -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" +fn_wipe_warning(){ + fn_print_warn "wipe is about to start" + fn_script_log_warn "wipe is about to start" totalseconds=3 for seconds in {3..1}; do - fn_print_warn "Server wipe will reset the map data and remove blueprint data: ${totalseconds}" + fn_print_warn "wipe is about to start: ${totalseconds}" totalseconds=$((totalseconds - 1)) sleep 1 if [ "${seconds}" == "0" ]; then break fi done - 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_warn "wipe is about to start" } fn_print_dots "" check.sh -fix_rust.sh # Check if there is something to wipe. -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 +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 check_status.sh if [ "${status}" != "0" ]; then - fn_print_restart_warning + fn_stop_warning exitbypass=1 command_stop.sh fn_firstcommand_reset - fn_wipe_files - fn_wipe_random_seed - fn_print_complete_nl "${wipetype}" - fn_script_log_pass "${wipetype}" + fn_wipe_server_files exitbypass=1 command_start.sh fn_firstcommand_reset else - fn_wipe_files - fn_wipe_random_seed - fn_print_complete_nl "${wipetype}" - fn_script_log_pass "${wipetype}" + fn_wipe_server_files 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 0c32d3c77..7169c9612 100755 --- a/lgsm/functions/compress_unreal2_maps.sh +++ b/lgsm/functions/compress_unreal2_maps.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM compress_unreal2_maps.sh module +# LinuxGSM compress_unreal2_maps.sh function # 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 9aa074ba9..3239837a0 100755 --- a/lgsm/functions/compress_ut99_maps.sh +++ b/lgsm/functions/compress_ut99_maps.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM compress_ut99_maps.sh module +# LinuxGSM compress_ut99_maps.sh function # 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 2c8c269bf..03ff54383 100755 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM core_dl.sh module +# LinuxGSM core_dl.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributor: UltimateByte # 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 -# hash: Optional, set an hash sum and will compare it against the file. +# md5: Optional, set an md5 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}" "${hash}" +# fn_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" # 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 [ "${steamcmdforcewindows}" == "yes" ]; then + elif [ "${shortname}" == "ac" ]||[ "${shortname}" == "jk2" ]; 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,9 +87,8 @@ 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 -i "Error!" "${steamcmdlog}" | tail -1)" ]&&[ "$(grep -ic "Error!" "${steamcmdlog}")" -ge "${counter}" ] ; then + if [ -n "$(grep "Error!" "${steamcmdlog}" | tail -1)" ]||[ -n "$(grep "ERROR!" "${steamcmdlog}" | tail -1)" ]; 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" @@ -150,46 +149,25 @@ fn_clear_tmp(){ fi } -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_dl_md5(){ + # Runs MD5 Check if available. + if [ "${md5}" != "0" ]&&[ "${md5}" != "nomd5" ]; then + echo -en "verifying ${local_filename} with MD5..." fn_sleep_time - hashsumcmd=$(${hashbin} "${local_filedir}/${local_filename}" | awk '{print $1}') - if [ "${hashsumcmd}" != "${hash}" ]; then + md5sumcmd=$(md5sum "${local_filedir}/${local_filename}"|awk '{print $1;}') + if [ "${md5sumcmd}" != "${md5}" ]; then fn_print_fail_eol_nl - 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}" + 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}" core_exit.sh else fn_print_ok_eol_nl - 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}" + 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}" fi fi } @@ -256,7 +234,7 @@ fn_fetch_file(){ chmodx="${7:-0}" run="${8:-0}" forcedl="${9:-0}" - hash="${10:-0}" + md5="${10:-0}" # Download file if missing or download forced. if [ ! -f "${local_filedir}/${local_filename}" ]||[ "${forcedl}" == "forcedl" ]; then @@ -343,7 +321,7 @@ fn_fetch_file(){ fi if [ -f "${local_filedir}/${local_filename}" ]; then - fn_dl_hash + fn_dl_md5 # Execute file if run is set. if [ "${run}" == "run" ]; then # shellcheck source=/dev/null @@ -365,7 +343,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 -# hash: Optional, set an hash sum and will compare it against the file. +# md5: Optional, set an md5 sum and will compare it against the file. # Fetches files from the Git repo. fn_fetch_file_github(){ @@ -390,9 +368,9 @@ fn_fetch_file_github(){ chmodx="${4:-0}" run="${5:-0}" forcedl="${6:-0}" - hash="${7:-0}" + md5="${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}" "${hash}" + fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" } # Fetches config files from the Git repo. @@ -414,9 +392,9 @@ fn_fetch_config(){ chmodx="nochmodx" run="norun" forcedl="noforce" - hash="nohash" + md5="nomd5" # 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}" "${hash}" + fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" } # Fetches modules from the Git repo during first download. @@ -438,9 +416,9 @@ fn_fetch_function(){ chmodx="chmodx" run="run" forcedl="noforce" - hash="nohash" + md5="nomd5" # 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}" "${hash}" + fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" } # Fetches modules from the Git repo during update-lgsm. @@ -462,50 +440,10 @@ fn_update_function(){ chmodx="chmodx" run="norun" forcedl="noforce" - hash="nohash" + md5="nomd5" # 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}" "${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') + fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}" - # 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 34379a486..e2b439abd 100755 --- a/lgsm/functions/core_exit.sh +++ b/lgsm/functions/core_exit.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM core_exit.sh module +# LinuxGSM core_exit.sh function # 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 6d9f4303d..b02084256 100755 --- a/lgsm/functions/core_functions.sh +++ b/lgsm/functions/core_functions.sh @@ -1,41 +1,40 @@ #!/bin/bash -# LinuxGSM core_functions.sh module +# LinuxGSM core_functions.sh function # 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="v21.2.5" +modulesversion="v20.6.1" # 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" "nohash" + fn_fetch_core_dl "lgsm/functions" "core_dl.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" else - fn_bootstrap_fetch_file_github "lgsm/functions" "core_dl.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" + fn_bootstrap_fetch_file_github "lgsm/functions" "core_dl.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" 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" "nohash" + fn_fetch_core_dl "lgsm/functions" "core_messages.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" else - fn_bootstrap_fetch_file_github "lgsm/functions" "core_messages.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" + fn_bootstrap_fetch_file_github "lgsm/functions" "core_messages.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" 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" "nohash" + fn_fetch_core_dl "lgsm/functions" "core_legacy.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" else - fn_bootstrap_fetch_file_github "lgsm/functions" "core_legacy.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nohash" + fn_bootstrap_fetch_file_github "lgsm/functions" "core_legacy.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" fi } @@ -54,16 +53,6 @@ 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(){ @@ -166,21 +155,11 @@ 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(){ @@ -491,11 +470,6 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } -fix_vh.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function -} - fix_wurm.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function @@ -620,11 +594,6 @@ 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 @@ -640,11 +609,6 @@ functionfile="${FUNCNAME[0]}" fn_fetch_function } -update_papermc.sh(){ -functionfile="${FUNCNAME[0]}" -fn_fetch_function -} - update_mumble.sh(){ functionfile="${FUNCNAME[0]}" fn_fetch_function @@ -670,11 +634,6 @@ 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 ea3c84f6d..e20b32b57 100755 --- a/lgsm/functions/core_getopt.sh +++ b/lgsm/functions/core_getopt.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM core_getopt.sh module +# LinuxGSM core_getopt.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: getopt arguments. @@ -21,15 +20,12 @@ 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." ) @@ -40,8 +36,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_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_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_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." ) @@ -59,9 +55,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[@]}" "${cmd_skeleton[@]}" ) +currentopt=( "${cmd_start[@]}" "${cmd_stop[@]}" "${cmd_restart[@]}" "${cmd_monitor[@]}" "${cmd_test_alert[@]}" "${cmd_details[@]}" "${cmd_postdetails[@]}" ) -# Update LinuxGSM. +# Update LGSM. currentopt+=( "${cmd_update_linuxgsm[@]}" ) # Exclude noupdate games here. @@ -75,22 +71,17 @@ if [ "${shortname}" == "jk2" ]||[ "${engine}" != "idtech3" ];then fi fi -# Validate and check-update command. +# Validate command. if [ "${appid}" ]; then - currentopt+=( "${cmd_validate[@]}" "${cmd_check_update[@]}" ) + currentopt+=( "${cmd_validate[@]}" ) 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. @@ -105,7 +96,7 @@ fi # Unreal exclusive. if [ "${shortname}" == "rust" ]; then - currentopt+=( "${cmd_fullwipe[@]}" "${cmd_mapwipe[@]}" ) + currentopt+=( "${cmd_wipe[@]}" "${cmd_full_wipe[@]}" ) fi if [ "${engine}" == "unreal2" ]; then if [ "${shortname}" == "ut2k4" ]; then diff --git a/lgsm/functions/core_github.sh b/lgsm/functions/core_github.sh deleted file mode 100644 index 5bd4bd730..000000000 --- a/lgsm/functions/core_github.sh +++ /dev/null @@ -1,114 +0,0 @@ -#!/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 811acfbba..9c95adcaf 100755 --- a/lgsm/functions/core_legacy.sh +++ b/lgsm/functions/core_legacy.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM core_legacy.sh module +# LinuxGSM core_legacy.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Code for backwards compatability with older versions of LinuxGSM. @@ -77,8 +76,3 @@ 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 b999cb347..00c4d0662 100755 --- a/lgsm/functions/core_logs.sh +++ b/lgsm/functions/core_logs.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM core_logs.sh module +# LinuxGSM core_logs.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributor: UltimateByte # 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 463f833c2..c467c2a4d 100755 --- a/lgsm/functions/core_messages.sh +++ b/lgsm/functions/core_messages.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM core_messages.sh module +# LinuxGSM core_messages.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributor: s-eam # 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: UPDATE: +## Feb 28 14:56:58 ut99-server: Monitor: INFO: fn_script_log_update(){ if [ -d "${lgsmlogdir}" ]; then if [ -n "${commandname}" ]; then @@ -359,44 +359,9 @@ 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 deleted file mode 100755 index 5fbd5db9f..000000000 --- a/lgsm/functions/core_steamcmd.sh +++ /dev/null @@ -1,330 +0,0 @@ -#!/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 a3eaf5675..769c27c96 100755 --- a/lgsm/functions/core_trap.sh +++ b/lgsm/functions/core_trap.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM core_trap.sh module +# LinuxGSM core_trap.sh function # 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 1b5e63db6..2e2931e41 100755 --- a/lgsm/functions/fix.sh +++ b/lgsm/functions/fix.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM fix.sh module +# LinuxGSM fix.sh function # 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. @@ -83,8 +82,6 @@ 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 @@ -96,7 +93,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 "${lightyellow}Applying Post-Install Fixes}${default}" + echo -e "Applying Post-Install Fixes" echo -e "=================================" fn_sleep_time postinstall=1 diff --git a/lgsm/functions/fix_ark.sh b/lgsm/functions/fix_ark.sh index da0097cab..4c4cf3f32 100755 --- a/lgsm/functions/fix_ark.sh +++ b/lgsm/functions/fix_ark.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM fix_ark.sh module +# LinuxGSM fix_ark.sh function # 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 bdd85af71..f71fcde7b 100755 --- a/lgsm/functions/fix_arma3.sh +++ b/lgsm/functions/fix_arma3.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM fix_arma3.sh module +# LinuxGSM fix_arma3.sh function # 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 f34a01c37..3edf7862b 100755 --- a/lgsm/functions/fix_av.sh +++ b/lgsm/functions/fix_av.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM fix_av.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# LinuxGSM fix_av.sh function +# Author: Christian Birk # Website: https://linuxgsm.com # Description: Resolves startup issue with Avorion @@ -10,10 +9,14 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/linux64" if [ "${postinstall}" == "1" ]; then - startparameters="--datapath ${avdatapath} --galaxy-name ${selfname} --init-folders-only" + fn_parms(){ + parms="--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 - "${executabledir}/${executable}" ${startparameters} + fn_parms + "${executabledir}/${executable}" ${parms} fi diff --git a/lgsm/functions/fix_bo.sh b/lgsm/functions/fix_bo.sh index 453691874..545504f63 100644 --- a/lgsm/functions/fix_bo.sh +++ b/lgsm/functions/fix_bo.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM fix_hw.sh module +# LinuxGSM fix_hw.sh function # 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 192f483e8..2f517b1b7 100755 --- a/lgsm/functions/fix_cmw.sh +++ b/lgsm/functions/fix_cmw.sh @@ -1,12 +1,9 @@ #!/bin/bash -# LinuxGSM fix_cmw.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# LinuxGSM fix_cmw.sh function +# Author: Christian Birk # 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 be59c42ec..6b213d388 100755 --- a/lgsm/functions/fix_csgo.sh +++ b/lgsm/functions/fix_csgo.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM fix_csgo.sh module +# LinuxGSM fix_csgo.sh function # 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 49fce22e3..b203e1cd8 100755 --- a/lgsm/functions/fix_dst.sh +++ b/lgsm/functions/fix_dst.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM fix_dst.sh module +# LinuxGSM fix_dst.sh function # 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 af06924db..4fc3dcd0d 100755 --- a/lgsm/functions/fix_hw.sh +++ b/lgsm/functions/fix_hw.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM fix_hw.sh module +# LinuxGSM fix_hw.sh function # 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 21a979c4c..f41dffbd4 100755 --- a/lgsm/functions/fix_ins.sh +++ b/lgsm/functions/fix_ins.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM fix_ins.sh module +# LinuxGSM fix_ins.sh function # 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 e749a2d27..c4a294515 100755 --- a/lgsm/functions/fix_kf.sh +++ b/lgsm/functions/fix_kf.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM fix_kf.sh module +# LinuxGSM fix_kf.sh function # 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 b680a9937..e826dea2a 100755 --- a/lgsm/functions/fix_kf2.sh +++ b/lgsm/functions/fix_kf2.sh @@ -1,13 +1,14 @@ #!/bin/bash -# LinuxGSM fix_kf2.sh module +# LinuxGSM fix_kf2.sh function # 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]}")")" -startparameters="\"${defaultmap}?Game=KFGameContent.KFGameInfo_VersusSurvival\"" +fn_parms(){ +parms="\"${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 4768a40cf..691647fb7 100755 --- a/lgsm/functions/fix_mcb.sh +++ b/lgsm/functions/fix_mcb.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM fix_mcb.sh module +# LinuxGSM fix_mcb.sh function # 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 2c92e8d12..549101a68 100755 --- a/lgsm/functions/fix_mta.sh +++ b/lgsm/functions/fix_mta.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM fix_mta.sh module +# LinuxGSM fix_mta.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributor: ChaosMTA # 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 4bb70c6f9..2c9d8c743 100755 --- a/lgsm/functions/fix_nmrih.sh +++ b/lgsm/functions/fix_nmrih.sh @@ -1,8 +1,6 @@ #!/bin/bash -# LinuxGSM fix_nmrih.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com +# LinuxGSM fix_nmrih.sh function +# Author: Denperidge # 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 c444c1ae9..630245844 100755 --- a/lgsm/functions/fix_onset.sh +++ b/lgsm/functions/fix_onset.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM fix_onset.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# LinuxGSM fix_onset.sh function +# Author: Frédéric C. # 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 895c7c2da..c9254aa64 100755 --- a/lgsm/functions/fix_ro.sh +++ b/lgsm/functions/fix_ro.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM fix_ro.sh module +# LinuxGSM fix_ro.sh function # 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 4488377a3..607af491b 100755 --- a/lgsm/functions/fix_rust.sh +++ b/lgsm/functions/fix_rust.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM fix_rust.sh module +# LinuxGSM fix_rust.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves startup issue with Rust. @@ -9,13 +8,3 @@ 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 aef41a703..b02ec343e 100755 --- a/lgsm/functions/fix_rw.sh +++ b/lgsm/functions/fix_rw.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM fix_rw.sh module +# LinuxGSM fix_rw.sh function # 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 7a62bd4d1..b69779019 100644 --- a/lgsm/functions/fix_samp.sh +++ b/lgsm/functions/fix_samp.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM fix_sfc.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# LinuxGSM fix_sfc.sh function +# Author: Christian Birk # 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 e93db7970..2709102c4 100755 --- a/lgsm/functions/fix_sdtd.sh +++ b/lgsm/functions/fix_sdtd.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM fix_sdtd.sh module +# LinuxGSM fix_sdtd.sh function # 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 51b95b9d5..874d6eca7 100755 --- a/lgsm/functions/fix_sfc.sh +++ b/lgsm/functions/fix_sfc.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM fix_sfc.sh module +# LinuxGSM fix_sfc.sh function # 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 002f42952..51224c8e0 100755 --- a/lgsm/functions/fix_sof2.sh +++ b/lgsm/functions/fix_sof2.sh @@ -1,11 +1,9 @@ #!/bin/bash -# LinuxGSM fix_rust.sh module +# LinuxGSM fix_rust.sh function # 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 b1ba1fde2..8ec84a86f 100644 --- a/lgsm/functions/fix_squad.sh +++ b/lgsm/functions/fix_squad.sh @@ -1,12 +1,9 @@ #!/bin/bash -# LinuxGSM fix_squad.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# LinuxGSM fix_squad.sh function +# Author: Christian Birk # 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 b9fb5b084..2495264da 100644 --- a/lgsm/functions/fix_st.sh +++ b/lgsm/functions/fix_st.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM fix_rust.sh module +# LinuxGSM fix_rust.sh function # 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 5fb151bad..41d31e263 100755 --- a/lgsm/functions/fix_steamcmd.sh +++ b/lgsm/functions/fix_steamcmd.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM fix_steamcmd.sh module +# LinuxGSM fix_steamcmd.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves various issues related to SteamCMD. @@ -80,8 +79,6 @@ 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 7758fdad9..712416bd8 100755 --- a/lgsm/functions/fix_terraria.sh +++ b/lgsm/functions/fix_terraria.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM fix_terraria.sh module +# LinuxGSM fix_terraria.sh function # 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 27b35a0d2..59b841226 100755 --- a/lgsm/functions/fix_tf2.sh +++ b/lgsm/functions/fix_tf2.sh @@ -1,8 +1,7 @@ #!/bin/bash -# LinuxGSM fix_tf2.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib -# Website: https://linuxgsm.com +# LinuxGSM fix_tf2.sh function +# Author: Vector Sigma +# Website: https://github.com/vectorsigma # 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 b1ed7d84b..b019012f7 100755 --- a/lgsm/functions/fix_ts3.sh +++ b/lgsm/functions/fix_ts3.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM fix_ts3.sh module +# LinuxGSM fix_ts3.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Resolves various issues with Teamspeak 3. @@ -14,20 +13,3 @@ 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 eae2e6313..d030ef318 100755 --- a/lgsm/functions/fix_unt.sh +++ b/lgsm/functions/fix_unt.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM fix_rust.sh module +# LinuxGSM fix_rust.sh function # 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 2e6686a8d..f9c81348a 100755 --- a/lgsm/functions/fix_ut.sh +++ b/lgsm/functions/fix_ut.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM fix_ut.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# LinuxGSM fix_ut.sh function +# Author: Alexander Hurd # 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 49610e4b6..cc1621815 100755 --- a/lgsm/functions/fix_ut2k4.sh +++ b/lgsm/functions/fix_ut2k4.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM fix_ut2k4.sh module +# LinuxGSM fix_ut2k4.sh function # 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 6bd26a53a..402683bf1 100755 --- a/lgsm/functions/fix_ut3.sh +++ b/lgsm/functions/fix_ut3.sh @@ -1,13 +1,14 @@ #!/bin/bash -# LinuxGSM fix_ut2.sh module +# LinuxGSM fix_ut2.sh function # 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]}")")" -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_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}" +} 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 deleted file mode 100755 index 551bd878f..000000000 --- a/lgsm/functions/fix_vh.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/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 aba24d382..bf53e35b0 100755 --- a/lgsm/functions/fix_wurm.sh +++ b/lgsm/functions/fix_wurm.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM fix_wurm.sh module +# LinuxGSM fix_wurm.sh function # 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 491c36638..1825fa327 100755 --- a/lgsm/functions/fix_zmr.sh +++ b/lgsm/functions/fix_zmr.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM fix_sfc.sh module +# LinuxGSM fix_sfc.sh function # 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 07960e290..d13e000d9 100755 --- a/lgsm/functions/info_config.sh +++ b/lgsm/functions/info_config.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM info_config.sh module +# LinuxGSM info_config.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributor: UltimateByte # Website: https://linuxgsm.com # Description: Gets specific details from config files. @@ -405,6 +405,30 @@ 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}" @@ -1064,15 +1088,15 @@ fn_info_config_unreal2(){ webadminuser="${unavailable}" webadminpass="${unavailable}" else - 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:]') + 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:]') queryport=$((port + 1)) - 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$//') + 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$//') webadminpass="${adminpassword}" # Not Set @@ -1501,92 +1525,6 @@ 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 @@ -1613,14 +1551,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 @@ -1641,7 +1579,7 @@ elif [ "${shortname}" == "ql" ]; then fn_info_config_quakelive elif [ "${shortname}" == "jk2" ]; then fn_info_config_jk2 -elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]; then +elif [ "${shortname}" == "mc" ]; then fn_info_config_minecraft elif [ "${shortname}" == "mcb" ]; then fn_info_config_minecraft_bedrock @@ -1689,8 +1627,6 @@ 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 @@ -1711,8 +1647,4 @@ 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 7f0dc2b19..11da3cc63 100755 --- a/lgsm/functions/info_distro.sh +++ b/lgsm/functions/info_distro.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM info_distro.sh module +# LinuxGSM info_distro.sh function # 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. @@ -73,20 +72,14 @@ 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 - tmuxvdigit="$(tmux -V | sed "s/tmux //" | sed -n '1 p' | tr -cd '[:digit:]')" - if [ "${tmuxvdigit}" -lt "16" ]; then + if [ "$(tmux -V | sed "s/tmux //" | sed -n '1 p' | tr -cd '[:digit:]')" -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" - if [ -n "${rconport}" ]; then - echo -e "> RCON\tINBOUND\t${rconport}\ttcp" - fi + echo -e "> RCON\tINBOUND\t${rconport}\ttcp" } | column -s $'\t' -t } @@ -1149,7 +1069,6 @@ 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 } @@ -1337,9 +1256,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}" @@ -1419,16 +1338,6 @@ 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" @@ -1476,7 +1385,7 @@ fn_info_message_mta(){ echo -e "" { echo -e "${lightblue}DESCRIPTION\tDIRECTION\tPORT\tPROTOCOL${default}" - echo -e "> Game/Query\tINBOUND\t${port}\tudp" + echo -e "> Game/Query\tOUTBOUND\t${port}\tudp" echo -e "> HTTP Server\tINBOUND\t${httpport}\ttcp" if [ "${ase}" == "Enabled" ]; then echo -e "> Query Port\tOUTBOUND\t${queryport}\tudp" @@ -1536,34 +1445,6 @@ 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 @@ -1574,10 +1455,6 @@ 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 @@ -1596,8 +1473,6 @@ 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 @@ -1618,18 +1493,8 @@ 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 @@ -1650,8 +1515,6 @@ 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 @@ -1678,16 +1541,26 @@ fn_info_message_select_engine(){ fn_info_message_unturned elif [ "${shortname}" == "ut" ]; then fn_info_message_ut - elif [ "${shortname}" == "vh" ]; then - fn_info_message_vh + 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}" == "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 @@ -1712,3 +1585,50 @@ 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 47148f4b3..74c29b9df 100755 --- a/lgsm/functions/info_parms.sh +++ b/lgsm/functions/info_parms.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM info_parms.sh module +# LinuxGSM info_parms.sh function # 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. @@ -135,16 +134,12 @@ 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"} - tickrate=${tickrate:-"0"} + maxplayers=${maxplayers:-"0"} saveinterval=${saveinterval:-"0"} - serverlevel=${serverlevel:-"NOT SET"} - worldsize=${worldsize:-"0"} + tickrate=${tickrate:-"0"} } fn_info_parms_samp(){ @@ -232,28 +227,12 @@ 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 @@ -302,8 +281,6 @@ 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 @@ -318,7 +295,4 @@ 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 211208717..9bdee07fd 100755 --- a/lgsm/functions/info_stats.sh +++ b/lgsm/functions/info_stats.sh @@ -1,12 +1,12 @@ #!/bin/bash -# LinuxGSM info_stats.sh module +# LinuxGSM info_stats.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Collect optional Stats sent to LinuxGSM project. # Uses Google analytics. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local modulegroup="INFO" +local function_selfname="$(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" "nohash" + fn_fetch_file_github "lgsm/data" "name-left.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" fi if [ ! -f "${datadir}/name-right.csv" ]; then - fn_fetch_file_github "lgsm/data" "name-right.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nohash" + fn_fetch_file_github "lgsm/data" "name-right.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" fi # generate instance uuid diff --git a/lgsm/functions/install_complete.sh b/lgsm/functions/install_complete.sh index ad258b224..62eec08a2 100755 --- a/lgsm/functions/install_complete.sh +++ b/lgsm/functions/install_complete.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM install_complete.sh module +# LinuxGSM install_complete.sh function # 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 9b5ef01cd..fbff9dbbb 100755 --- a/lgsm/functions/install_config.sh +++ b/lgsm/functions/install_config.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM install_config.sh module +# LinuxGSM install_config.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Creates default server configs. @@ -26,7 +25,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" "nohash" + fn_fetch_file "${githuburl}/${gamedirname}/${config}" "${remote_fileurl_backup}" "GitHub" "Bitbucket" "${lgsmdir}/config-default/config-game" "${config}" "nochmodx" "norun" "forcedl" "nomd5" done } @@ -317,13 +316,6 @@ 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 ) @@ -514,7 +506,7 @@ elif [ "${shortname}" == "l4d2" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations -elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]; then +elif [ "${shortname}" == "mc" ]; then gamedirname="Minecraft" array_configs+=( server.properties ) fn_fetch_default_config @@ -668,13 +660,6 @@ 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 ) @@ -801,13 +786,6 @@ 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 ) @@ -829,12 +807,6 @@ 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 50bc7ed97..7eab2a153 100755 --- a/lgsm/functions/install_dst_token.sh +++ b/lgsm/functions/install_dst_token.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM install_dst_token.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# LinuxGSM install_dst_token.sh function +# Author: Daniel Gibbs & Marvin Lehmann (marvinl97) # 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 d7c0b0b7a..1f50007f2 100755 --- a/lgsm/functions/install_eula.sh +++ b/lgsm/functions/install_eula.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM install_eula.sh module +# LinuxGSM install_eula.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Gets user to accept the EULA. @@ -9,7 +8,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" if [ "${shortname}" == "ts3" ]; then eulaurl="https://www.teamspeak.com/en/privacy-and-terms" -elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]; then +elif [ "${shortname}" == "mc" ]; 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" @@ -41,7 +40,7 @@ fi if [ "${shortname}" == "ts3" ]; then touch "${executabledir}/.ts3server_license_accepted" -elif [ "${shortname}" == "mc" ]||[ "${shortname}" == "pmc" ]; then +elif [ "${shortname}" == "mc" ]; 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 f5fdb8a04..71690a7a7 100755 --- a/lgsm/functions/install_factorio_save.sh +++ b/lgsm/functions/install_factorio_save.sh @@ -1,9 +1,8 @@ #!/bin/bash -# LinuxGSM install_factorio_save.sh module -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# LinuxGSM install_factorio_save.sh function +# Author: Kristian Polso # 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 a8f8065c2..27d384936 100755 --- a/lgsm/functions/install_gslt.sh +++ b/lgsm/functions/install_gslt.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM install_gslt.sh module +# LinuxGSM install_gslt.sh function # 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 4cf067f8f..420b827f8 100755 --- a/lgsm/functions/install_header.sh +++ b/lgsm/functions/install_header.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM install_header.sh module +# LinuxGSM install_header.sh function # 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 57a41500c..6a272f2ef 100755 --- a/lgsm/functions/install_logs.sh +++ b/lgsm/functions/install_logs.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM install_logs.sh module +# LinuxGSM install_logs.sh function # 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 new file mode 100755 index 000000000..cc516bea0 --- /dev/null +++ b/lgsm/functions/install_modules.sh @@ -0,0 +1,17 @@ +#!/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 011ad9b71..194d9f546 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 module +# LinuxGSM install_mta_resources.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributor: ChaosMTA # 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 080f864a2..070a4a816 100755 --- a/lgsm/functions/install_retry.sh +++ b/lgsm/functions/install_retry.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM install_retry.sh module +# LinuxGSM install_retry.sh function # 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 9e75fb488..77c5ab138 100755 --- a/lgsm/functions/install_server_dir.sh +++ b/lgsm/functions/install_server_dir.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM install_server_dir.sh module +# LinuxGSM install_server_dir.sh function # 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 b6b9f5240..f8b6be4f0 100755 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM install_server_files.sh module +# LinuxGSM install_server_files.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Installs server files. @@ -27,7 +26,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.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" + 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" 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 @@ -49,7 +48,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-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" + 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" 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 @@ -83,11 +82,6 @@ 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 @@ -97,8 +91,6 @@ 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 181646e85..b17b1ab7e 100755 --- a/lgsm/functions/install_squad_license.sh +++ b/lgsm/functions/install_squad_license.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM install_squad_license.sh module +# LinuxGSM install_squad_license.sh function # 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 d3b45b40b..355b7fa67 100755 --- a/lgsm/functions/install_stats.sh +++ b/lgsm/functions/install_stats.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM install_stats.sh module +# LinuxGSM install_stats.sh function # 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 b1e64a42c..40acf435b 100755 --- a/lgsm/functions/install_steamcmd.sh +++ b/lgsm/functions/install_steamcmd.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM install_steamcmd.sh module +# LinuxGSM install_steamcmd.sh function # 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 07ab7a111..a77a0ea38 100755 --- a/lgsm/functions/install_ts3db.sh +++ b/lgsm/functions/install_ts3db.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM install_ts3db.sh module +# LinuxGSM install_ts3db.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributor: PhilPhonic # 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 124052d05..144ac278e 100755 --- a/lgsm/functions/install_ut2k4_key.sh +++ b/lgsm/functions/install_ut2k4_key.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM install_ut2k4_key.sh module +# LinuxGSM install_ut2k4_key.sh function # 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 7e46f7977..010ff109e 100755 --- a/lgsm/functions/mods_core.sh +++ b/lgsm/functions/mods_core.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM command_mods_install.sh module +# LinuxGSM command_mods_install.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributor: UltimateByte # 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 3863dfe47..f60d9b30f 100755 --- a/lgsm/functions/mods_list.sh +++ b/lgsm/functions/mods_list.sh @@ -1,7 +1,7 @@ #!/bin/bash -# LinuxGSM mods_list.sh module +# LinuxGSM mods_list.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# Contributor: UltimateByte # 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.11" +metamodsourceversion="1.10" 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 123d8c86c..2443c6e99 100755 --- a/lgsm/functions/query_gamedig.sh +++ b/lgsm/functions/query_gamedig.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM query_gamedig.sh module +# query_gamedig.sh function # 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 @@ -46,7 +45,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 gdmaxplayers + unset maxplayers elif [ "${gdmaxplayers}" == "[]" ]; then gdmaxplayers=0 fi @@ -68,11 +67,5 @@ 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 6c21b1a89..376f704b7 100755 --- a/lgsm/functions/query_gsquery.py +++ b/lgsm/functions/query_gsquery.py @@ -1,8 +1,7 @@ #! /usr/bin/env python3 # -*- coding: utf-8 -*- -# LinuxGSM query_gsquery.py function -# Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib +# query_gsquery.py +# Author: Anonymous & Daniel Gibbs # 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 47ccefe1b..f13a48c43 100644 --- a/lgsm/functions/update_factorio.sh +++ b/lgsm/functions/update_factorio.sh @@ -1,14 +1,13 @@ #!/bin/bash -# LinuxGSM update_factorio.sh module +# LinuxGSM update_factorio.sh function # 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" "nohash" + fn_fetch_file "https://factorio.com/get-download/${downloadbranch}/headless/${factorioarch}" "" "" "" "${tmpdir}" "factorio_headless_${factorioarch}-${remotebuild}.tar.xz" "" "norun" "noforce" "nomd5" fn_dl_extract "${tmpdir}" "factorio_headless_${factorioarch}-${remotebuild}.tar.xz" "${tmpdir}" echo -e "copying to ${serverfiles}...\c" cp -R "${tmpdir}/factorio/"* "${serverfiles}" @@ -95,14 +94,12 @@ fn_update_factorio_compare(){ if [ "${status}" == "0" ]; then exitbypass=1 fn_update_factorio_dl - if [ "${requirerestart}" == "1" ]; then - exitbypass=1 - command_start.sh - fn_firstcommand_reset - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - fi + exitbypass=1 + command_start.sh + fn_firstcommand_reset + exitbypass=1 + command_stop.sh + fn_firstcommand_reset # If server started. else fn_print_restart_warning diff --git a/lgsm/functions/update_jediknight2.sh b/lgsm/functions/update_jediknight2.sh index 3a3c40f14..c2bdca1b6 100644 --- a/lgsm/functions/update_jediknight2.sh +++ b/lgsm/functions/update_jediknight2.sh @@ -1,14 +1,15 @@ #!/bin/bash -# LinuxGSM update_jk2.sh module +# LinuxGSM update_jk2.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles updating of jk2 servers. -functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" +local commandname="UPDATE" +local commandaction="Update" +local function_selfname="$(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" "nohash" + 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_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" @@ -29,7 +30,6 @@ 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,14 +118,11 @@ fn_update_jk2_compare(){ if [ "${status}" == "0" ]; then exitbypass=1 fn_update_jk2_dl - if [ "${requirerestart}" == "1" ]; then - exitbypass=1 - command_start.sh - fn_firstcommand_reset - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - fi + exitbypass=1 + command_start.sh + exitbypass=1 + command_stop.sh + fn_firstcommand_reset # If server started. else fn_print_restart_warning diff --git a/lgsm/functions/update_minecraft.sh b/lgsm/functions/update_minecraft.sh old mode 100644 new mode 100755 index 63a2fd51c..e33840f3e --- a/lgsm/functions/update_minecraft.sh +++ b/lgsm/functions/update_minecraft.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM update_minecraft.sh module +# LinuxGSM update_minecraft.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles updating of Minecraft servers. @@ -13,7 +12,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" "nohash" + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "minecraft_server.${remotebuild}.jar" "" "norun" "noforce" "nomd5" echo -e "copying to ${serverfiles}...\c" cp "${tmpdir}/minecraft_server.${remotebuild}.jar" "${serverfiles}/minecraft_server.jar" local exitcode=$? @@ -89,10 +88,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}" @@ -104,14 +103,11 @@ fn_update_minecraft_compare(){ if [ "${status}" == "0" ]; then exitbypass=1 fn_update_minecraft_dl - if [ "${requirerestart}" == "1" ]; then - exitbypass=1 - command_start.sh - fn_firstcommand_reset - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - fi + exitbypass=1 + command_start.sh + exitbypass=1 + command_stop.sh + fn_firstcommand_reset # 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 f4054ae00..34ada66b3 100644 --- a/lgsm/functions/update_minecraft_bedrock.sh +++ b/lgsm/functions/update_minecraft_bedrock.sh @@ -1,17 +1,13 @@ #!/bin/bash -# LinuxGSM update_minecraft_bedrock.sh module +# LinuxGSM update_minecraft_bedrock.sh function # 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 -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') + latestmcbuildurl=$(curl -Ls "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 @@ -38,7 +34,6 @@ 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}" @@ -82,7 +77,7 @@ fn_update_minecraft_localbuild(){ fn_update_minecraft_remotebuild(){ # Gets remote build info. - 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]") + 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]") if [ "${firstcommandname}" != "INSTALL" ]; then fn_print_dots "Checking remote build: ${remotelocation}" # Checks if remotebuild variable has been set. @@ -127,14 +122,11 @@ fn_update_minecraft_compare(){ if [ "${status}" == "0" ]; then exitbypass=1 fn_update_minecraft_dl - if [ "${requirerestart}" == "1" ]; then - exitbypass=1 - command_start.sh - fn_firstcommand_reset - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - fi + exitbypass=1 + command_start.sh + exitbypass=1 + command_stop.sh + fn_firstcommand_reset # If server started. else fn_print_restart_warning diff --git a/lgsm/functions/update_mta.sh b/lgsm/functions/update_mta.sh index f49e54910..00ffc5a18 100644 --- a/lgsm/functions/update_mta.sh +++ b/lgsm/functions/update_mta.sh @@ -1,14 +1,13 @@ #!/bin/bash -# LinuxGSM update_mta.sh module +# LinuxGSM update_mta.sh function # 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" "nohash" + fn_fetch_file "http://linux.mtasa.com/dl/multitheftauto_linux_x64.tar.gz" "" "" "" "${tmpdir}" "multitheftauto_linux_x64.tar.gz" "" "norun" "noforce" "nomd5" mkdir "${tmpdir}/multitheftauto_linux_x64" fn_dl_extract "${tmpdir}" "multitheftauto_linux_x64.tar.gz" "${tmpdir}/multitheftauto_linux_x64" echo -e "copying to ${serverfiles}...\c" @@ -31,7 +30,6 @@ 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" @@ -153,14 +151,11 @@ fn_update_mta_compare(){ if [ "${status}" == "0" ]; then exitbypass=1 fn_update_mta_dl - if [ "${requirerestart}" == "1" ]; then - exitbypass=1 - command_start.sh - fn_firstcommand_reset - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - fi + exitbypass=1 + command_start.sh + exitbypass=1 + command_stop.sh + fn_firstcommand_reset # If server started. else fn_print_restart_warning diff --git a/lgsm/functions/update_mumble.sh b/lgsm/functions/update_mumble.sh index 8a54e7df2..76ae837f3 100644 --- a/lgsm/functions/update_mumble.sh +++ b/lgsm/functions/update_mumble.sh @@ -1,14 +1,13 @@ #!/bin/bash -# LinuxGSM update_mumble.sh module +# LinuxGSM update_mumble.sh function # 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" "nohash" + 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_dl_extract "${tmpdir}" "murmur-static_${mumblearch}-${remotebuild}.tar.bz2" "${tmpdir}" echo -e "copying to ${serverfiles}...\c" cp -R "${tmpdir}/murmur-static_${mumblearch}-${remotebuild}/"* "${serverfiles}" @@ -88,14 +87,11 @@ fn_update_mumble_compare(){ if [ "${status}" == "0" ]; then exitbypass=1 fn_update_mumble_dl - if [ "${requirerestart}" == "1" ]; then - exitbypass=1 - command_start.sh - fn_firstcommand_reset - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - fi + exitbypass=1 + command_start.sh + exitbypass=1 + command_stop.sh + fn_firstcommand_reset # If server started. else fn_print_restart_warning diff --git a/lgsm/functions/update_papermc.sh b/lgsm/functions/update_papermc.sh deleted file mode 100644 index 2e669d93d..000000000 --- a/lgsm/functions/update_papermc.sh +++ /dev/null @@ -1,160 +0,0 @@ -#!/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 85bacb899..28496f7d7 100644 --- a/lgsm/functions/update_steamcmd.sh +++ b/lgsm/functions/update_steamcmd.sh @@ -1,14 +1,196 @@ #!/bin/bash -# LinuxGSM update_steamcmd.sh module +# LinuxGSM update_steamcmd.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles updating using SteamCMD. functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" -# init steamcmd functions -core_steamcmd.sh +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 +} # 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 782a138d1..b72979ff4 100644 --- a/lgsm/functions/update_ts3.sh +++ b/lgsm/functions/update_ts3.sh @@ -1,7 +1,6 @@ #!/bin/bash -# LinuxGSM command_ts3.sh module +# LinuxGSM command_ts3.sh function # Author: Daniel Gibbs -# Contributors: http://linuxgsm.com/contrib # Website: https://linuxgsm.com # Description: Handles updating of Teamspeak 3 servers. @@ -13,7 +12,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" "nohash" + fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "teamspeak3-server_linux_${ts3arch}-${remotebuild}.tar.bz2" "" "norun" "noforce" "nomd5" 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}" @@ -35,7 +34,6 @@ 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" @@ -103,9 +101,9 @@ fn_update_ts3_localbuild(){ fn_update_ts3_remotebuild(){ # Gets remote build info. - if [ "${ts3arch}" == "amd64" ]; then + if [ "${arch}" == "x86_64" ]; then remotebuild=$(curl -s "https://www.teamspeak.com/versions/server.json" | jq -r '.linux.x86_64.version') - elif [ "${ts3arch}" == "x86" ]; then + elif [ "${arch}" == "x86" ]; then remotebuild=$(curl -s "https://www.teamspeak.com/versions/server.json" | jq -r '.linux.x86.version') fi if [ "${firstcommandname}" != "INSTALL" ]; then @@ -151,14 +149,11 @@ fn_update_ts3_compare(){ if [ "${status}" == "0" ]; then exitbypass=1 fn_update_ts3_dl - if [ "${requirerestart}" == "1" ]; then - exitbypass=1 - command_start.sh - fn_firstcommand_reset - exitbypass=1 - command_stop.sh - fn_firstcommand_reset - fi + exitbypass=1 + command_start.sh + exitbypass=1 + command_stop.sh + fn_firstcommand_reset # If server started. else fn_print_restart_warning diff --git a/lgsm/functions/update_vintagestory.sh b/lgsm/functions/update_vintagestory.sh deleted file mode 100755 index b2231c66e..000000000 --- a/lgsm/functions/update_vintagestory.sh +++ /dev/null @@ -1,148 +0,0 @@ -#!/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 462ea09ad..18cd88326 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Project: Linux Game Server Managers - LinuxGSM +# Project: 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="v21.2.5" +version="v20.6.1" shortname="core" gameservername="core" commandname="CORE" @@ -42,7 +42,6 @@ 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 @@ -339,11 +338,11 @@ if [ "${shortname}" == "core" ]; then if [ "${userinput}" == "list" ]||[ "${userinput}" == "l" ]; then { - tail -n +1 "${serverlist}" | awk -F "," '{print $2 "\t" $3}' + tail -n +2 "${serverlist}" | awk -F "," '{print $2 "\t" $3}' } | column -s $'\t' -t | more exit elif [ "${userinput}" == "install" ]||[ "${userinput}" == "i" ]; then - tail -n +1 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' > "${serverlistmenu}" + tail -n +2 "${serverlist}" | awk -F "," '{print $1 "," $2 "," $3}' > "${serverlistmenu}" fn_install_menu result "LinuxGSM" "Select game server to install." "${serverlistmenu}" userinput="${result}" fn_server_info @@ -402,106 +401,32 @@ 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}/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 + 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 "${servercfgfullpath}" - fi - # 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")" + source "${configdirserver}/common.cfg" + else + # shellcheck source=/dev/null + source "${configdirserver}/common.cfg" fi - - # 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")" + # 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 - if [ -n "${parms}" ]; then - startparameters="${parms}" + # 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 - } - - # 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 9b47f763d..1730f7ba1 100644 --- a/tests/tests_fctrserver.sh +++ b/tests/tests_fctrserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v21.2.5" +version="v20.6.1" 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" "nohash" + fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" } # 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" "nohash" + fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" 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" "nohash" + fn_fetch_config "lgsm/config-default/config-lgsm/${gameservername}" "_default.cfg" "${configdirdefault}/config-lgsm/${gameservername}" "_default.cfg" "nochmodx" "norun" "noforcedl" "nomd5" fi if [ ! -f "${configdirserver}/_default.cfg" ]; then mkdir -p "${configdirserver}" @@ -414,44 +414,26 @@ 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" "nohash" + 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 # 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" "nohash" + 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" "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" "nohash" + fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "chmodx" "norun" "noforcedl" "nomd5" fi fi # Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off. @@ -466,9 +448,9 @@ fi fn_currentstatus_tmux(){ check_status.sh if [ "${status}" != "0" ]; then - currentstatus="STARTED" + currentstatus="ONLINE" else - currentstatus="STOPPED" + currentstatus="OFFLINE" fi } @@ -483,7 +465,7 @@ fn_setstatus(){ fn_currentstatus_tmux echo -en "New status: ${currentstatus}\\r" - if [ "${requiredstatus}" == "STARTED" ]; then + if [ "${requiredstatus}" == "ONLINE" ]; then (command_start.sh > /dev/null 2>&1) else (command_stop.sh > /dev/null 2>&1) @@ -749,7 +731,7 @@ echo -e "=================================" echo -e "Description:" echo -e "start ${gamename} server." echo -e "Command: ./${gameservername} start" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -768,7 +750,7 @@ echo -e "=================================" echo -e "Description:" echo -e "start ${gamename} server while already running." echo -e "Command: ./${gameservername} start" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -787,7 +769,7 @@ echo -e "=================================" echo -e "Description:" echo -e "will update server on start." echo -e "Command: ./${gameservername} start" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -806,7 +788,7 @@ echo -e "=================================" echo -e "Description:" echo -e "stop ${gamename} server." echo -e "Command: ./${gameservername} stop" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -825,7 +807,7 @@ echo -e "=================================" echo -e "Description:" echo -e "stop ${gamename} server while already stopped." echo -e "Command: ./${gameservername} stop" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -844,7 +826,7 @@ echo -e "=================================" echo -e "Description:" echo -e "restart ${gamename}." echo -e "Command: ./${gameservername} restart" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -863,7 +845,7 @@ echo -e "=================================" echo -e "Description:" echo -e "restart ${gamename} while already stopped." echo -e "Command: ./${gameservername} restart" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -886,7 +868,7 @@ echo -e "=================================" echo -e "Description:" echo -e "check for updates." echo -e "Command: ./${gameservername} update" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -906,7 +888,7 @@ echo -e "Description:" echo -e "update LinuxGSM." echo -e "" echo -e "Command: ./jc2server update-lgam" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -933,7 +915,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor server while already running." echo -e "Command: ./${gameservername} monitor" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -952,7 +934,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor while server is offline with lockfile." echo -e "Command: ./${gameservername} monitor" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus fn_print_info_nl "creating lockfile." date '+%s' > "${lockdir}/${selfname}.lock" @@ -975,7 +957,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor while server is offline with no lockfile." echo -e "Command: ./${gameservername} monitor" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -994,7 +976,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor while server is offline with no lockfile." echo -e "Command: ./${gameservername} test-alert" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1017,7 +999,7 @@ echo -e "=================================" echo -e "Description:" echo -e "display details." echo -e "Command: ./${gameservername} details" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1036,7 +1018,7 @@ echo -e "=================================" echo -e "Description:" echo -e "post details." echo -e "Command: ./${gameservername} postdetails" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1059,7 +1041,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run a backup." echo -e "Command: ./${gameservername} backup" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus echo -e "test de-activated until issue #1839 fixed" #(command_backup.sh) @@ -1078,7 +1060,7 @@ echo -e "=================================" echo -e "Description:" echo -e "detect glibc." echo -e "Command: ./${gameservername} detect-glibc" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1097,7 +1079,7 @@ echo -e "=================================" echo -e "Description:" echo -e "detect ldd." echo -e "Command: ./${gameservername} detect-ldd" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1116,7 +1098,7 @@ echo -e "=================================" echo -e "Description:" echo -e "detect dependencies." echo -e "Command: ./${gameservername} detect-deps" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1135,7 +1117,7 @@ echo -e "=================================" echo -e "Description:" echo -e "raw query output." echo -e "Command: ./${gameservername} query-raw" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1159,7 +1141,7 @@ echo -e "=================================" echo -e "Description:" echo -e "donate." echo -e "Command: ./${gameservername} donate" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1177,7 +1159,7 @@ echo -e "=================================" echo -e "Server Tests - Complete!" echo -e "Using: ${gamename}" echo -e "=================================" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus core_exit.sh diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh index da0fd91ce..18e5f964b 100644 --- a/tests/tests_jc2server.sh +++ b/tests/tests_jc2server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v21.2.5" +version="v20.6.1" 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" "nohash" + fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" } # 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" "nohash" + fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" 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" "nohash" + fn_fetch_config "lgsm/config-default/config-lgsm/${gameservername}" "_default.cfg" "${configdirdefault}/config-lgsm/${gameservername}" "_default.cfg" "nochmodx" "norun" "noforcedl" "nomd5" fi if [ ! -f "${configdirserver}/_default.cfg" ]; then mkdir -p "${configdirserver}" @@ -415,44 +415,26 @@ 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" "nohash" + 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 # 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" "nohash" + 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" "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" "nohash" + fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "chmodx" "norun" "noforcedl" "nomd5" fi fi # Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off. @@ -467,9 +449,9 @@ fi fn_currentstatus_tmux(){ check_status.sh if [ "${status}" != "0" ]; then - currentstatus="STARTED" + currentstatus="ONLINE" else - currentstatus="STOPPED" + currentstatus="OFFLINE" fi } @@ -484,7 +466,7 @@ fn_setstatus(){ fn_currentstatus_tmux echo -en "New status: ${currentstatus}\\r" - if [ "${requiredstatus}" == "STARTED" ]; then + if [ "${requiredstatus}" == "ONLINE" ]; then (command_start.sh > /dev/null 2>&1) else (command_stop.sh > /dev/null 2>&1) @@ -754,7 +736,7 @@ echo -e "=================================" echo -e "Description:" echo -e "start ${gamename} server." echo -e "Command: ./${gameservername} start" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -773,7 +755,7 @@ echo -e "=================================" echo -e "Description:" echo -e "start ${gamename} server while already running." echo -e "Command: ./${gameservername} start" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -792,7 +774,7 @@ echo -e "=================================" echo -e "Description:" echo -e "will update server on start." echo -e "Command: ./${gameservername} start" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -811,7 +793,7 @@ echo -e "=================================" echo -e "Description:" echo -e "stop ${gamename} server." echo -e "Command: ./${gameservername} stop" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -830,7 +812,7 @@ echo -e "=================================" echo -e "Description:" echo -e "stop ${gamename} server while already stopped." echo -e "Command: ./${gameservername} stop" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -849,7 +831,7 @@ echo -e "=================================" echo -e "Description:" echo -e "restart ${gamename}." echo -e "Command: ./${gameservername} restart" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -868,7 +850,7 @@ echo -e "=================================" echo -e "Description:" echo -e "restart ${gamename} while already stopped." echo -e "Command: ./${gameservername} restart" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -891,7 +873,7 @@ echo -e "=================================" echo -e "Description:" echo -e "check for updates." echo -e "Command: ./${gameservername} update" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -910,7 +892,7 @@ echo -e "=================================" echo -e "Description:" echo -e "change the buildid tricking SteamCMD to update." echo -e "Command: ./jc2server update" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus fn_print_info_nl "changed buildid to 0." sed -i 's/[0-9]\+/0/' "${serverfiles}/steamapps/appmanifest_${appid}.acf" @@ -931,7 +913,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="STARTED" +requiredstatus="ONLINE" fn_setstatus fn_print_info_nl "changed buildid to 0." sed -i 's/[0-9]\+/0/' "${serverfiles}/steamapps/appmanifest_${appid}.acf" @@ -952,7 +934,7 @@ echo -e "=================================" echo -e "Description:" echo -e "removing appmanifest file will cause script to repair." echo -e "Command: ./jc2server update" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus fn_print_info_nl "removed appmanifest_${appid}.acf." rm --verbose "${serverfiles:?}/steamapps/appmanifest_${appid}.acf" @@ -973,7 +955,7 @@ echo -e "=================================" echo -e "Description:" echo -e "force-update bypassing update check." echo -e "Command: ./jc2server force-update" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -992,7 +974,7 @@ echo -e "=================================" echo -e "Description:" echo -e "force-update bypassing update check server while already running." echo -e "Command: ./jc2server force-update" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1011,7 +993,7 @@ echo -e "=================================" echo -e "Description:" echo -e "validate server files." echo -e "Command: ./jc2server validate" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1031,7 +1013,7 @@ echo -e "Description:" echo -e "validate server files while server already running." echo -e "" echo -e "Command: ./jc2server validate" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1051,7 +1033,7 @@ echo -e "Description:" echo -e "update LinuxGSM." echo -e "" echo -e "Command: ./jc2server update-lgam" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1092,7 +1074,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor server while already running." echo -e "Command: ./${gameservername} monitor" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1111,7 +1093,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor while server is offline with lockfile." echo -e "Command: ./${gameservername} monitor" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus fn_print_info_nl "creating lockfile." date '+%s' > "${lockdir}/${selfname}.lock" @@ -1134,7 +1116,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor while server is offline with no lockfile." echo -e "Command: ./${gameservername} monitor" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1153,7 +1135,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor while server is offline with no lockfile." echo -e "Command: ./${gameservername} test-alert" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus cp "${servercfgfullpath}" "config.lua" sed -i 's/[0-9]\+/0/' "${servercfgfullpath}" @@ -1183,7 +1165,7 @@ echo -e "=================================" echo -e "Description:" echo -e "display details." echo -e "Command: ./${gameservername} details" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1202,7 +1184,7 @@ echo -e "=================================" echo -e "Description:" echo -e "post details." echo -e "Command: ./${gameservername} postdetails" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1225,7 +1207,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run a backup." echo -e "Command: ./${gameservername} backup" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus echo -e "test de-activated until issue #1839 fixed" #(command_backup.sh) @@ -1244,7 +1226,7 @@ echo -e "=================================" echo -e "Description:" echo -e "detect glibc." echo -e "Command: ./${gameservername} detect-glibc" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1263,7 +1245,7 @@ echo -e "=================================" echo -e "Description:" echo -e "detect ldd." echo -e "Command: ./${gameservername} detect-ldd" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1282,7 +1264,7 @@ echo -e "=================================" echo -e "Description:" echo -e "detect dependencies." echo -e "Command: ./${gameservername} detect-deps" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1301,7 +1283,7 @@ echo -e "=================================" echo -e "Description:" echo -e "raw query output." echo -e "Command: ./${gameservername} query-raw" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1324,7 +1306,7 @@ echo -e "=================================" echo -e "Description:" echo -e "donate." echo -e "Command: ./${gameservername} donate" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1342,6 +1324,6 @@ echo -e "=================================" echo -e "Server Tests - Complete!" echo -e "Using: ${gamename}" echo -e "=================================" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus core_exit.sh diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh index 501b64a43..8aa7f73c3 100644 --- a/tests/tests_mcserver.sh +++ b/tests/tests_mcserver.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v21.2.5" +version="v20.6.1" 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" "nohash" + fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" } # 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" "nohash" + fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" 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" "nohash" + fn_fetch_config "lgsm/config-default/config-lgsm/${gameservername}" "_default.cfg" "${configdirdefault}/config-lgsm/${gameservername}" "_default.cfg" "nochmodx" "norun" "noforcedl" "nomd5" fi if [ ! -f "${configdirserver}/_default.cfg" ]; then mkdir -p "${configdirserver}" @@ -415,44 +415,26 @@ 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" "nohash" + 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 # 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" "nohash" + 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" "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" "nohash" + fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "chmodx" "norun" "noforcedl" "nomd5" fi fi # Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off. @@ -467,9 +449,9 @@ fi fn_currentstatus_tmux(){ check_status.sh if [ "${status}" != "0" ]; then - currentstatus="STARTED" + currentstatus="ONLINE" else - currentstatus="STOPPED" + currentstatus="OFFLINE" fi } @@ -484,7 +466,7 @@ fn_setstatus(){ fn_currentstatus_tmux echo -en "New status: ${currentstatus}\\r" - if [ "${requiredstatus}" == "STARTED" ]; then + if [ "${requiredstatus}" == "ONLINE" ]; then (command_start.sh > /dev/null 2>&1) else (command_stop.sh > /dev/null 2>&1) @@ -748,7 +730,7 @@ echo -e "=================================" echo -e "Description:" echo -e "start ${gamename} server." echo -e "Command: ./${gameservername} start" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -767,7 +749,7 @@ echo -e "=================================" echo -e "Description:" echo -e "start ${gamename} server while already running." echo -e "Command: ./${gameservername} start" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -786,7 +768,7 @@ echo -e "=================================" echo -e "Description:" echo -e "will update server on start." echo -e "Command: ./${gameservername} start" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -804,7 +786,7 @@ echo -e "=================================" echo -e "Description:" echo -e "give time for server to fully start." echo -e "Command: sleep 30" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus sleep 30 @@ -814,7 +796,7 @@ echo -e "=================================" echo -e "Description:" echo -e "stop ${gamename} server." echo -e "Command: ./${gameservername} stop" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -833,7 +815,7 @@ echo -e "=================================" echo -e "Description:" echo -e "stop ${gamename} server while already stopped." echo -e "Command: ./${gameservername} stop" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -852,7 +834,7 @@ echo -e "=================================" echo -e "Description:" echo -e "restart ${gamename}." echo -e "Command: ./${gameservername} restart" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -871,7 +853,7 @@ echo -e "=================================" echo -e "Description:" echo -e "restart ${gamename} while already stopped." echo -e "Command: ./${gameservername} restart" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -894,7 +876,7 @@ echo -e "=================================" echo -e "Description:" echo -e "check for updates." echo -e "Command: ./${gameservername} update" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -914,7 +896,7 @@ echo -e "Description:" echo -e "update LinuxGSM." echo -e "" echo -e "Command: ./jc2server update-lgam" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -955,7 +937,7 @@ echo -e "=================================" echo -e "Description:" echo -e "give time for server to fully start." echo -e "Command: sleep 30" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus sleep 30 @@ -965,7 +947,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor server while already running." echo -e "Command: ./${gameservername} monitor" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -984,7 +966,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor while server is offline with lockfile." echo -e "Command: ./${gameservername} monitor" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus fn_print_info_nl "creating lockfile." date '+%s' > "${lockdir}/${selfname}.lock" @@ -1007,7 +989,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor while server is offline with no lockfile." echo -e "Command: ./${gameservername} monitor" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1026,7 +1008,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor while server is offline with no lockfile." echo -e "Command: ./${gameservername} test-alert" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1049,7 +1031,7 @@ echo -e "=================================" echo -e "Description:" echo -e "display details." echo -e "Command: ./${gameservername} details" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1068,7 +1050,7 @@ echo -e "=================================" echo -e "Description:" echo -e "post details." echo -e "Command: ./${gameservername} postdetails" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1091,7 +1073,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run a backup." echo -e "Command: ./${gameservername} backup" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus echo -e "test de-activated until issue #1839 fixed" #(command_backup.sh) @@ -1110,7 +1092,7 @@ echo -e "=================================" echo -e "Description:" echo -e "detect glibc." echo -e "Command: ./${gameservername} detect-glibc" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1129,7 +1111,7 @@ echo -e "=================================" echo -e "Description:" echo -e "detect ldd." echo -e "Command: ./${gameservername} detect-ldd" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1148,7 +1130,7 @@ echo -e "=================================" echo -e "Description:" echo -e "detect dependencies." echo -e "Command: ./${gameservername} detect-deps" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1181,7 +1163,7 @@ echo -e "=================================" echo -e "Description:" echo -e "raw query output." echo -e "Command: ./${gameservername} query-raw" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1204,7 +1186,7 @@ echo -e "=================================" echo -e "Description:" echo -e "donate." echo -e "Command: ./${gameservername} donate" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1222,7 +1204,7 @@ echo -e "=================================" echo -e "Server Tests - Complete!" echo -e "Using: ${gamename}" echo -e "=================================" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus core_exit.sh diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh index b9941598a..7c5212f40 100644 --- a/tests/tests_ts3server.sh +++ b/tests/tests_ts3server.sh @@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then set -x fi -version="v21.2.5" +version="v20.6.1" 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" "nohash" + fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5" } # 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" "nohash" + fn_bootstrap_fetch_file_github "lgsm/data" "serverlist.csv" "${datadir}" "nochmodx" "norun" "forcedl" "nomd5" 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" "nohash" + fn_fetch_config "lgsm/config-default/config-lgsm/${gameservername}" "_default.cfg" "${configdirdefault}/config-lgsm/${gameservername}" "_default.cfg" "nochmodx" "norun" "noforcedl" "nomd5" fi if [ ! -f "${configdirserver}/_default.cfg" ]; then mkdir -p "${configdirserver}" @@ -415,44 +415,26 @@ 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" "nohash" + 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 # 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" "nohash" + 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" "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" "nohash" + fn_fetch_file_github "" "linuxgsm.sh" "${tmpdir}" "chmodx" "norun" "noforcedl" "nomd5" fi fi # Enables ANSI colours from core_messages.sh. Can be disabled with ansi=off. @@ -467,9 +449,9 @@ fi fn_currentstatus_tmux(){ check_status.sh if [ "${status}" != "0" ]; then - currentstatus="STARTED" + currentstatus="ONLINE" else - currentstatus="STOPPED" + currentstatus="OFFLINE" fi } @@ -484,7 +466,7 @@ fn_setstatus(){ fn_currentstatus_tmux echo -en "New status: ${currentstatus}\\r" - if [ "${requiredstatus}" == "STARTED" ]; then + if [ "${requiredstatus}" == "ONLINE" ]; then (command_start.sh > /dev/null 2>&1) else (command_stop.sh > /dev/null 2>&1) @@ -748,7 +730,7 @@ echo -e "=================================" echo -e "Description:" echo -e "start ${gamename} server." echo -e "Command: ./${gameservername} start" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -767,7 +749,7 @@ echo -e "=================================" echo -e "Description:" echo -e "start ${gamename} server while already running." echo -e "Command: ./${gameservername} start" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -786,7 +768,7 @@ echo -e "=================================" echo -e "Description:" echo -e "will update server on start." echo -e "Command: ./${gameservername} start" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -805,7 +787,7 @@ echo -e "=================================" echo -e "Description:" echo -e "stop ${gamename} server." echo -e "Command: ./${gameservername} stop" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -824,7 +806,7 @@ echo -e "=================================" echo -e "Description:" echo -e "stop ${gamename} server while already stopped." echo -e "Command: ./${gameservername} stop" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -843,7 +825,7 @@ echo -e "=================================" echo -e "Description:" echo -e "restart ${gamename}." echo -e "Command: ./${gameservername} restart" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -862,7 +844,7 @@ echo -e "=================================" echo -e "Description:" echo -e "restart ${gamename} while already stopped." echo -e "Command: ./${gameservername} restart" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -885,7 +867,7 @@ echo -e "=================================" echo -e "Description:" echo -e "check for updates." echo -e "Command: ./${gameservername} update" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -905,7 +887,7 @@ echo -e "Description:" echo -e "update LinuxGSM." echo -e "" echo -e "Command: ./jc2server update-lgam" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -932,7 +914,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor server while already running." echo -e "Command: ./${gameservername} monitor" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -951,7 +933,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor while server is offline with lockfile." echo -e "Command: ./${gameservername} monitor" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus fn_print_info_nl "creating lockfile." date '+%s' > "${lockdir}/${selfname}.lock" @@ -974,7 +956,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor while server is offline with no lockfile." echo -e "Command: ./${gameservername} monitor" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -993,7 +975,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run monitor while server is offline with no lockfile." echo -e "Command: ./${gameservername} test-alert" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1016,7 +998,7 @@ echo -e "=================================" echo -e "Description:" echo -e "display details." echo -e "Command: ./${gameservername} details" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1035,7 +1017,7 @@ echo -e "=================================" echo -e "Description:" echo -e "post details." echo -e "Command: ./${gameservername} postdetails" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1058,7 +1040,7 @@ echo -e "=================================" echo -e "Description:" echo -e "run a backup." echo -e "Command: ./${gameservername} backup" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus echo -e "test de-activated until issue #1839 fixed" #(command_backup.sh) @@ -1077,7 +1059,7 @@ echo -e "=================================" echo -e "Description:" echo -e "detect glibc." echo -e "Command: ./${gameservername} detect-glibc" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1096,7 +1078,7 @@ echo -e "=================================" echo -e "Description:" echo -e "detect ldd." echo -e "Command: ./${gameservername} detect-ldd" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1115,7 +1097,7 @@ echo -e "=================================" echo -e "Description:" echo -e "detect dependencies." echo -e "Command: ./${gameservername} detect-deps" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1134,7 +1116,7 @@ echo -e "=================================" echo -e "Description:" echo -e "raw query output." echo -e "Command: ./${gameservername} query-raw" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1157,7 +1139,7 @@ echo -e "=================================" echo -e "Description:" echo -e "donate." echo -e "Command: ./${gameservername} donate" -requiredstatus="STARTED" +requiredstatus="ONLINE" fn_setstatus ( exec 5>"${TRAVIS_BUILD_DIR}/dev-debug.log" @@ -1175,7 +1157,7 @@ echo -e "=================================" echo -e "Server Tests - Complete!" echo -e "Using: ${gamename}" echo -e "=================================" -requiredstatus="STOPPED" +requiredstatus="OFFLINE" fn_setstatus core_exit.sh