diff --git a/.github/workflows/add-to-project.yml b/.github/workflows/add-to-project.yml new file mode 100644 index 000000000..1a20ef190 --- /dev/null +++ b/.github/workflows/add-to-project.yml @@ -0,0 +1,17 @@ +name: Add to project +on: + issues: + types: + - opened + - labeled + +jobs: + add-to-project: + name: Add game server requests to project + runs-on: ubuntu-latest + steps: + - uses: actions/add-to-project@v0.5.0 + with: + project-url: https://github.com/orgs/GameServerManagers/projects/11 + github-token: ${{ secrets.ADD_TO_PROJECT_PAT }} + labeled: "type: game server request" diff --git a/.github/workflows/git-sync.yml b/.github/workflows/git-sync.yml index f07d1f3b4..e013ae32d 100644 --- a/.github/workflows/git-sync.yml +++ b/.github/workflows/git-sync.yml @@ -10,8 +10,8 @@ jobs: GitHub-to-Bitbucket: runs-on: ubuntu-latest steps: - - name: webfactory/ssh-agent@v0.7.0 - uses: webfactory/ssh-agent@v0.7.0 + - name: webfactory/ssh-agent@v0.8.0 + uses: webfactory/ssh-agent@v0.8.0 with: ssh-private-key: ${{ secrets.BITBUCKET_SECRET }} diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index b5bb38498..ebf260f6f 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -15,7 +15,7 @@ jobs: issues: write # for github/issue-labeler to create or remove labels runs-on: ubuntu-latest steps: - - uses: github/issue-labeler@v2.5 + - uses: github/issue-labeler@v3.1 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" configuration-path: .github/labeler.yml diff --git a/.github/workflows/trigger-docker-build.yml b/.github/workflows/trigger-docker-build.yml index adb43343f..dec3dd462 100644 --- a/.github/workflows/trigger-docker-build.yml +++ b/.github/workflows/trigger-docker-build.yml @@ -8,7 +8,7 @@ jobs: name: Trigger Build docker-linuxgsm runs-on: ubuntu-latest steps: - - uses: convictional/trigger-workflow-and-wait@v1.3.0 + - uses: convictional/trigger-workflow-and-wait@v1.6.5 with: owner: GameServerManagers repo: docker-linuxgsm @@ -19,7 +19,7 @@ jobs: name: Trigger Build docker-linuxgsm runs-on: ubuntu-latest steps: - - uses: convictional/trigger-workflow-and-wait@v1.3.0 + - uses: convictional/trigger-workflow-and-wait@v1.6.5 with: owner: GameServerManagers repo: docker-gameserver diff --git a/.github/workflows/update-copyright-years-in-license-file.yml b/.github/workflows/update-copyright-years-in-license-file.yml index 347446d75..162a27944 100644 --- a/.github/workflows/update-copyright-years-in-license-file.yml +++ b/.github/workflows/update-copyright-years-in-license-file.yml @@ -13,7 +13,7 @@ jobs: - uses: actions/checkout@v3 with: fetch-depth: 0 - - uses: FantasticFiasco/action-update-license-year@v2 + - uses: FantasticFiasco/action-update-license-year@v3 with: token: ${{ secrets.GITHUB_TOKEN }} path: LICENSE.md diff --git a/.github/workflows/version-check.sh b/.github/workflows/version-check.sh index 4e7280509..a5f21c5cb 100644 --- a/.github/workflows/version-check.sh +++ b/.github/workflows/version-check.sh @@ -1,6 +1,6 @@ #!/bin/bash version=$(grep "version=" linuxgsm.sh | sed -e 's/version//g' | tr -d '="') -modulesversion=$(grep "modulesversion=" lgsm/functions/core_functions.sh | sed -e 's/modulesversion//g' | tr -d '="') +modulesversion=$(grep "modulesversion=" lgsm/modules/core_modules.sh | sed -e 's/modulesversion//g' | tr -d '="') if [ "${version}" != "${modulesversion}" ]; then echo "Error! LinuxGSM version mismatch" diff --git a/.prettierrc.json b/.prettierrc similarity index 100% rename from .prettierrc.json rename to .prettierrc diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 0ceb99088..c7a7dab10 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,11 +1,10 @@ { - "recommendations": [ - "ms-python.python", - "editorconfig.editorconfig", - "yzhang.markdown-all-in-one", - "esbenp.prettier-vscode", - "timonwong.shellcheck", - "foxundermoon.shell-format", - "redhat.vscode-yaml" - ] + "recommendations": [ + "ms-python.python", + "editorconfig.editorconfig", + "yzhang.markdown-all-in-one", + "esbenp.prettier-vscode", + "timonwong.shellcheck", + "redhat.vscode-yaml" + ] } diff --git a/README.md b/README.md index f0a9713cf..f710ff66d 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@
-
+
diff --git a/lgsm/config-default/config-lgsm/acserver/_default.cfg b/lgsm/config-default/config-lgsm/acserver/_default.cfg
index 3b6776ef7..8d572b695 100644
--- a/lgsm/config-default/config-lgsm/acserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/acserver/_default.cfg
@@ -184,3 +184,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg
index a2552a95d..3283f54e8 100644
--- a/lgsm/config-default/config-lgsm/ahl2server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/ahl2server/_default.cfg
@@ -152,7 +152,6 @@ stopmode="3"
querymode="2"
querytype="protocol-valve"
-
## Console type
consoleverbose="yes"
consoleinteract="yes"
@@ -191,3 +190,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/ahlserver/_default.cfg b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg
index 046aa0c11..9d4c0ed4b 100644
--- a/lgsm/config-default/config-lgsm/ahlserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/ahlserver/_default.cfg
@@ -186,3 +186,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/arkserver/_default.cfg b/lgsm/config-default/config-lgsm/arkserver/_default.cfg
index 8e24debfc..cc3de9082 100644
--- a/lgsm/config-default/config-lgsm/arkserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/arkserver/_default.cfg
@@ -188,3 +188,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/arma3server/_default.cfg b/lgsm/config-default/config-lgsm/arma3server/_default.cfg
index 7c4619c17..c92e843fd 100644
--- a/lgsm/config-default/config-lgsm/arma3server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/arma3server/_default.cfg
@@ -204,3 +204,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/armarserver/_default.cfg b/lgsm/config-default/config-lgsm/armarserver/_default.cfg
index 9e2f88d7c..3cee2f43f 100644
--- a/lgsm/config-default/config-lgsm/armarserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/armarserver/_default.cfg
@@ -185,3 +185,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/atsserver/_default.cfg b/lgsm/config-default/config-lgsm/atsserver/_default.cfg
index c6e338d34..a77e230ce 100644
--- a/lgsm/config-default/config-lgsm/atsserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/atsserver/_default.cfg
@@ -177,3 +177,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/avserver/_default.cfg b/lgsm/config-default/config-lgsm/avserver/_default.cfg
index bbaf07daa..a77e347a8 100644
--- a/lgsm/config-default/config-lgsm/avserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/avserver/_default.cfg
@@ -182,3 +182,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/bb2server/_default.cfg b/lgsm/config-default/config-lgsm/bb2server/_default.cfg
index 1e566b88b..6557890a1 100644
--- a/lgsm/config-default/config-lgsm/bb2server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/bb2server/_default.cfg
@@ -191,3 +191,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/bbserver/_default.cfg b/lgsm/config-default/config-lgsm/bbserver/_default.cfg
index 118f65547..ad283e5aa 100644
--- a/lgsm/config-default/config-lgsm/bbserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/bbserver/_default.cfg
@@ -186,3 +186,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/bdserver/_default.cfg b/lgsm/config-default/config-lgsm/bdserver/_default.cfg
index eef61562c..07d5465d0 100644
--- a/lgsm/config-default/config-lgsm/bdserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/bdserver/_default.cfg
@@ -185,3 +185,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg
index c6da048f9..4d2651a9a 100644
--- a/lgsm/config-default/config-lgsm/bf1942server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/bf1942server/_default.cfg
@@ -168,3 +168,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/bfvserver/_default.cfg b/lgsm/config-default/config-lgsm/bfvserver/_default.cfg
index 9acc98e5b..27d7cd504 100644
--- a/lgsm/config-default/config-lgsm/bfvserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/bfvserver/_default.cfg
@@ -168,3 +168,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg
index bd8145df3..5d13c758c 100644
--- a/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/bmdmserver/_default.cfg
@@ -191,3 +191,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/boserver/_default.cfg b/lgsm/config-default/config-lgsm/boserver/_default.cfg
index f2c2a3b03..4f44086c2 100644
--- a/lgsm/config-default/config-lgsm/boserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/boserver/_default.cfg
@@ -184,3 +184,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/bsserver/_default.cfg b/lgsm/config-default/config-lgsm/bsserver/_default.cfg
index 41ab3fba7..45f931aa4 100644
--- a/lgsm/config-default/config-lgsm/bsserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/bsserver/_default.cfg
@@ -195,3 +195,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/btlserver/_default.cfg b/lgsm/config-default/config-lgsm/btlserver/_default.cfg
index 81173ccb9..b1b738fe2 100644
--- a/lgsm/config-default/config-lgsm/btlserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/btlserver/_default.cfg
@@ -183,3 +183,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/btserver/_default.cfg b/lgsm/config-default/config-lgsm/btserver/_default.cfg
index 11e175c18..1fda28f37 100644
--- a/lgsm/config-default/config-lgsm/btserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/btserver/_default.cfg
@@ -178,3 +178,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/ccserver/_default.cfg b/lgsm/config-default/config-lgsm/ccserver/_default.cfg
index 10ba0f8af..5a80c2ca5 100644
--- a/lgsm/config-default/config-lgsm/ccserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/ccserver/_default.cfg
@@ -186,3 +186,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/cdserver/_default.cfg b/lgsm/config-default/config-lgsm/cdserver/_default.cfg
index 50eb14bf1..bf490c78a 100644
--- a/lgsm/config-default/config-lgsm/cdserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/cdserver/_default.cfg
@@ -178,3 +178,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/ckserver/_default.cfg b/lgsm/config-default/config-lgsm/ckserver/_default.cfg
index ef1c0618c..3659bae6c 100644
--- a/lgsm/config-default/config-lgsm/ckserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/ckserver/_default.cfg
@@ -184,3 +184,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log"
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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/cmwserver/_default.cfg b/lgsm/config-default/config-lgsm/cmwserver/_default.cfg
index 0f05118e9..964185444 100644
--- a/lgsm/config-default/config-lgsm/cmwserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/cmwserver/_default.cfg
@@ -186,3 +186,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.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"
gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/cod2server/_default.cfg b/lgsm/config-default/config-lgsm/cod2server/_default.cfg
index fca571d93..64990c12e 100644
--- a/lgsm/config-default/config-lgsm/cod2server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/cod2server/_default.cfg
@@ -171,3 +171,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/cod4server/_default.cfg b/lgsm/config-default/config-lgsm/cod4server/_default.cfg
index 8389feb3c..f73a2a1e3 100644
--- a/lgsm/config-default/config-lgsm/cod4server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/cod4server/_default.cfg
@@ -171,3 +171,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/codserver/_default.cfg b/lgsm/config-default/config-lgsm/codserver/_default.cfg
index 34883c0a1..4650e35ad 100644
--- a/lgsm/config-default/config-lgsm/codserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/codserver/_default.cfg
@@ -171,3 +171,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg
index 3b922967d..47304668f 100644
--- a/lgsm/config-default/config-lgsm/coduoserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/coduoserver/_default.cfg
@@ -171,3 +171,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg
index 58dec3f7a..bd0ed995a 100644
--- a/lgsm/config-default/config-lgsm/codwawserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/codwawserver/_default.cfg
@@ -171,3 +171,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/colserver/_default.cfg b/lgsm/config-default/config-lgsm/colserver/_default.cfg
index 450b76765..a1cffc5c9 100644
--- a/lgsm/config-default/config-lgsm/colserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/colserver/_default.cfg
@@ -181,3 +181,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log"
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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/csczserver/_default.cfg b/lgsm/config-default/config-lgsm/csczserver/_default.cfg
index 61767765b..7104cf096 100644
--- a/lgsm/config-default/config-lgsm/csczserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/csczserver/_default.cfg
@@ -186,3 +186,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg
index 30ba7b8c5..dd83b4996 100644
--- a/lgsm/config-default/config-lgsm/csgoserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/csgoserver/_default.cfg
@@ -222,3 +222,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/csserver/_default.cfg b/lgsm/config-default/config-lgsm/csserver/_default.cfg
index 83a6101da..a1f47e974 100644
--- a/lgsm/config-default/config-lgsm/csserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/csserver/_default.cfg
@@ -186,3 +186,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/cssserver/_default.cfg b/lgsm/config-default/config-lgsm/cssserver/_default.cfg
index e06da982c..b84ed1d3c 100644
--- a/lgsm/config-default/config-lgsm/cssserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/cssserver/_default.cfg
@@ -191,3 +191,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/dabserver/_default.cfg b/lgsm/config-default/config-lgsm/dabserver/_default.cfg
index 377ab85ff..450c2e7e0 100644
--- a/lgsm/config-default/config-lgsm/dabserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/dabserver/_default.cfg
@@ -186,3 +186,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/dayzserver/_default.cfg b/lgsm/config-default/config-lgsm/dayzserver/_default.cfg
index 45042cf07..d6d63d2b1 100644
--- a/lgsm/config-default/config-lgsm/dayzserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/dayzserver/_default.cfg
@@ -200,3 +200,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg
index b8d7d382c..8e734fe96 100644
--- a/lgsm/config-default/config-lgsm/dmcserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/dmcserver/_default.cfg
@@ -186,3 +186,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/dodrserver/_default.cfg b/lgsm/config-default/config-lgsm/dodrserver/_default.cfg
index 41d55374b..b176fc637 100644
--- a/lgsm/config-default/config-lgsm/dodrserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/dodrserver/_default.cfg
@@ -184,3 +184,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/dodserver/_default.cfg b/lgsm/config-default/config-lgsm/dodserver/_default.cfg
index 12076ed80..45e6b8449 100644
--- a/lgsm/config-default/config-lgsm/dodserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/dodserver/_default.cfg
@@ -186,3 +186,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg
index b938891db..83be0acb8 100644
--- a/lgsm/config-default/config-lgsm/dodsserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/dodsserver/_default.cfg
@@ -186,3 +186,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/doiserver/_default.cfg b/lgsm/config-default/config-lgsm/doiserver/_default.cfg
index f1eac4968..2a1ce62bc 100644
--- a/lgsm/config-default/config-lgsm/doiserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/doiserver/_default.cfg
@@ -187,3 +187,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/dstserver/_default.cfg b/lgsm/config-default/config-lgsm/dstserver/_default.cfg
index fa6c79315..b5b2f50c9 100644
--- a/lgsm/config-default/config-lgsm/dstserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/dstserver/_default.cfg
@@ -193,3 +193,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/dysserver/_default.cfg b/lgsm/config-default/config-lgsm/dysserver/_default.cfg
index 8ac508ca9..f567dab6e 100644
--- a/lgsm/config-default/config-lgsm/dysserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/dysserver/_default.cfg
@@ -191,3 +191,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg
index db4669132..174ef357c 100644
--- a/lgsm/config-default/config-lgsm/ecoserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/ecoserver/_default.cfg
@@ -179,3 +179,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.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"
gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/emserver/_default.cfg b/lgsm/config-default/config-lgsm/emserver/_default.cfg
index 16db942a4..8181f7f1e 100644
--- a/lgsm/config-default/config-lgsm/emserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/emserver/_default.cfg
@@ -191,3 +191,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/etlserver/_default.cfg b/lgsm/config-default/config-lgsm/etlserver/_default.cfg
index 488fe649a..e36ab3581 100644
--- a/lgsm/config-default/config-lgsm/etlserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/etlserver/_default.cfg
@@ -165,3 +165,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/ets2server/_default.cfg b/lgsm/config-default/config-lgsm/ets2server/_default.cfg
index 2d0176133..4edca5194 100644
--- a/lgsm/config-default/config-lgsm/ets2server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/ets2server/_default.cfg
@@ -177,3 +177,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg
index 9f010510e..c58ee2789 100644
--- a/lgsm/config-default/config-lgsm/fctrserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/fctrserver/_default.cfg
@@ -176,3 +176,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/fofserver/_default.cfg b/lgsm/config-default/config-lgsm/fofserver/_default.cfg
index 3c2adf8af..623900384 100644
--- a/lgsm/config-default/config-lgsm/fofserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/fofserver/_default.cfg
@@ -186,3 +186,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg
index 1f569df9c..aad52e802 100644
--- a/lgsm/config-default/config-lgsm/gmodserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/gmodserver/_default.cfg
@@ -199,3 +199,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg
index 3b2b69a58..4763fc423 100644
--- a/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/hl2dmserver/_default.cfg
@@ -186,3 +186,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg
index f595afc2a..f8d3887ae 100644
--- a/lgsm/config-default/config-lgsm/hldmserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/hldmserver/_default.cfg
@@ -185,3 +185,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg
index 59aada076..2e4f061e4 100644
--- a/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/hldmsserver/_default.cfg
@@ -186,3 +186,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/hwserver/_default.cfg b/lgsm/config-default/config-lgsm/hwserver/_default.cfg
index 1d54b8eb2..6f156f9d9 100644
--- a/lgsm/config-default/config-lgsm/hwserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/hwserver/_default.cfg
@@ -14,7 +14,7 @@ ip="0.0.0.0"
port="12871"
queryport="12881"
maxplayers="20"
-defaultmap="" # Optional
+defaultmap="" # Optional
creativemode="0" # Free Build: creativemode="1"
gamelog="gamelog.txt"
@@ -195,3 +195,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log"
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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/insserver/_default.cfg b/lgsm/config-default/config-lgsm/insserver/_default.cfg
index c7adf3e65..d6d65d863 100644
--- a/lgsm/config-default/config-lgsm/insserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/insserver/_default.cfg
@@ -192,3 +192,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/inssserver/_default.cfg b/lgsm/config-default/config-lgsm/inssserver/_default.cfg
index 66678d284..5317f6be9 100644
--- a/lgsm/config-default/config-lgsm/inssserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/inssserver/_default.cfg
@@ -190,3 +190,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/iosserver/_default.cfg b/lgsm/config-default/config-lgsm/iosserver/_default.cfg
index c81bc4002..d587e3719 100644
--- a/lgsm/config-default/config-lgsm/iosserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/iosserver/_default.cfg
@@ -186,3 +186,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/jc2server/_default.cfg b/lgsm/config-default/config-lgsm/jc2server/_default.cfg
index 01043a35e..6c36a7f69 100644
--- a/lgsm/config-default/config-lgsm/jc2server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/jc2server/_default.cfg
@@ -178,3 +178,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/jc3server/_default.cfg b/lgsm/config-default/config-lgsm/jc3server/_default.cfg
index a1aacafb5..fd049f80d 100644
--- a/lgsm/config-default/config-lgsm/jc3server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/jc3server/_default.cfg
@@ -177,3 +177,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/jk2server/_default.cfg b/lgsm/config-default/config-lgsm/jk2server/_default.cfg
index 700ba8fbb..0675729e4 100644
--- a/lgsm/config-default/config-lgsm/jk2server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/jk2server/_default.cfg
@@ -187,3 +187,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/kf2server/_default.cfg b/lgsm/config-default/config-lgsm/kf2server/_default.cfg
index a60bbd1a2..a8c3c72bf 100644
--- a/lgsm/config-default/config-lgsm/kf2server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/kf2server/_default.cfg
@@ -184,3 +184,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/kfserver/_default.cfg b/lgsm/config-default/config-lgsm/kfserver/_default.cfg
index 74ffea9af..71b1a178b 100644
--- a/lgsm/config-default/config-lgsm/kfserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/kfserver/_default.cfg
@@ -194,3 +194,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.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"
gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg
index 4fb938983..3ef547c22 100644
--- a/lgsm/config-default/config-lgsm/l4d2server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/l4d2server/_default.cfg
@@ -185,3 +185,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg
index 838a65efb..c0cbd2452 100644
--- a/lgsm/config-default/config-lgsm/l4dserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/l4dserver/_default.cfg
@@ -185,3 +185,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/loserver/_default.cfg b/lgsm/config-default/config-lgsm/loserver/_default.cfg
index 15ebddde5..d4056faf9 100644
--- a/lgsm/config-default/config-lgsm/loserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/loserver/_default.cfg
@@ -189,3 +189,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/mcbserver/_default.cfg b/lgsm/config-default/config-lgsm/mcbserver/_default.cfg
index bc64ee883..f8fddf0c0 100644
--- a/lgsm/config-default/config-lgsm/mcbserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/mcbserver/_default.cfg
@@ -171,3 +171,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/mcserver/_default.cfg b/lgsm/config-default/config-lgsm/mcserver/_default.cfg
index fd7b8a71e..c12265f9f 100644
--- a/lgsm/config-default/config-lgsm/mcserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/mcserver/_default.cfg
@@ -178,3 +178,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/mhserver/_default.cfg b/lgsm/config-default/config-lgsm/mhserver/_default.cfg
index 81ab22a95..1011e8768 100644
--- a/lgsm/config-default/config-lgsm/mhserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/mhserver/_default.cfg
@@ -186,3 +186,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg
index a9f5fc840..0077221f4 100644
--- a/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/mohaaserver/_default.cfg
@@ -170,3 +170,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/momserver/_default.cfg b/lgsm/config-default/config-lgsm/momserver/_default.cfg
index a19d077fe..6ebc106b9 100644
--- a/lgsm/config-default/config-lgsm/momserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/momserver/_default.cfg
@@ -184,3 +184,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg
index ac7d4e939..c001c7bf1 100644
--- a/lgsm/config-default/config-lgsm/mtaserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/mtaserver/_default.cfg
@@ -170,3 +170,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/ndserver/_default.cfg b/lgsm/config-default/config-lgsm/ndserver/_default.cfg
index 9653eb52b..935659c83 100644
--- a/lgsm/config-default/config-lgsm/ndserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/ndserver/_default.cfg
@@ -186,3 +186,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/necserver/_default.cfg b/lgsm/config-default/config-lgsm/necserver/_default.cfg
index af49cb3e2..5d3b4d887 100644
--- a/lgsm/config-default/config-lgsm/necserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/necserver/_default.cfg
@@ -180,3 +180,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg
index 5f412cd4d..241e535f4 100644
--- a/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/nmrihserver/_default.cfg
@@ -191,3 +191,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg
index 465671cb7..0bacc5956 100644
--- a/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/ns2cserver/_default.cfg
@@ -191,3 +191,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/ns2server/_default.cfg b/lgsm/config-default/config-lgsm/ns2server/_default.cfg
index 481d61241..dbbd47d33 100644
--- a/lgsm/config-default/config-lgsm/ns2server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/ns2server/_default.cfg
@@ -191,3 +191,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/nsserver/_default.cfg b/lgsm/config-default/config-lgsm/nsserver/_default.cfg
index 4292b1f2a..5a63b2edf 100644
--- a/lgsm/config-default/config-lgsm/nsserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/nsserver/_default.cfg
@@ -186,3 +186,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg
index 172953609..2c270bfc5 100644
--- a/lgsm/config-default/config-lgsm/onsetserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/onsetserver/_default.cfg
@@ -178,3 +178,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/opforserver/_default.cfg b/lgsm/config-default/config-lgsm/opforserver/_default.cfg
index d10367f63..691c69b3a 100644
--- a/lgsm/config-default/config-lgsm/opforserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/opforserver/_default.cfg
@@ -186,3 +186,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/pc2server/_default.cfg b/lgsm/config-default/config-lgsm/pc2server/_default.cfg
index e43f150fd..72f87b4f0 100644
--- a/lgsm/config-default/config-lgsm/pc2server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/pc2server/_default.cfg
@@ -182,3 +182,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/pcserver/_default.cfg b/lgsm/config-default/config-lgsm/pcserver/_default.cfg
index cb82ffca5..af31b615b 100644
--- a/lgsm/config-default/config-lgsm/pcserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/pcserver/_default.cfg
@@ -178,3 +178,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/pmcserver/_default.cfg b/lgsm/config-default/config-lgsm/pmcserver/_default.cfg
index 704d63ff3..e8f69161e 100644
--- a/lgsm/config-default/config-lgsm/pmcserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/pmcserver/_default.cfg
@@ -176,3 +176,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg
index 6b34c3b14..426574aa6 100644
--- a/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/pstbsserver/_default.cfg
@@ -188,3 +188,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg
index 1689af811..6cb271de0 100644
--- a/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/pvkiiserver/_default.cfg
@@ -186,3 +186,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg
index 45a2b8fbd..8d27cf08c 100644
--- a/lgsm/config-default/config-lgsm/pvrserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/pvrserver/_default.cfg
@@ -185,3 +185,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/pzserver/_default.cfg b/lgsm/config-default/config-lgsm/pzserver/_default.cfg
index 2d284187f..399c43f0f 100644
--- a/lgsm/config-default/config-lgsm/pzserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/pzserver/_default.cfg
@@ -182,3 +182,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/q2server/_default.cfg b/lgsm/config-default/config-lgsm/q2server/_default.cfg
index ea1061a70..526e27854 100644
--- a/lgsm/config-default/config-lgsm/q2server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/q2server/_default.cfg
@@ -170,3 +170,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/q3server/_default.cfg b/lgsm/config-default/config-lgsm/q3server/_default.cfg
index 5621dec15..d8fda33d7 100644
--- a/lgsm/config-default/config-lgsm/q3server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/q3server/_default.cfg
@@ -170,3 +170,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/qlserver/_default.cfg b/lgsm/config-default/config-lgsm/qlserver/_default.cfg
index c2c0d0f24..5b1444ed9 100644
--- a/lgsm/config-default/config-lgsm/qlserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/qlserver/_default.cfg
@@ -179,3 +179,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/qwserver/_default.cfg b/lgsm/config-default/config-lgsm/qwserver/_default.cfg
index 9435b2199..1e9482c8c 100644
--- a/lgsm/config-default/config-lgsm/qwserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/qwserver/_default.cfg
@@ -169,3 +169,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg
index d36a4c1f2..231ab423a 100644
--- a/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/ricochetserver/_default.cfg
@@ -186,3 +186,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/roserver/_default.cfg b/lgsm/config-default/config-lgsm/roserver/_default.cfg
index 58e3f4fe9..9ff217a8b 100644
--- a/lgsm/config-default/config-lgsm/roserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/roserver/_default.cfg
@@ -190,3 +190,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.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"
gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg b/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg
index 847c8a1dd..3c134592a 100644
--- a/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/rtcwserver/_default.cfg
@@ -170,3 +170,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/rustserver/_default.cfg b/lgsm/config-default/config-lgsm/rustserver/_default.cfg
index d43a15152..acda7f6e4 100644
--- a/lgsm/config-default/config-lgsm/rustserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/rustserver/_default.cfg
@@ -17,15 +17,15 @@ queryport=28017
rconpassword="CHANGE_ME"
rconweb="1" # Value is: 1 for the Facepunch web panel, Rustadmin desktop and Rustadmin Online; 0 for RCON tools like Rusty.
servername="Rust"
-gamemode="vanilla" # Values: vanilla, softcore ( Doc: https://wiki.facepunch.com/rust/server-gamemodes )
+gamemode="vanilla" # Values: vanilla, softcore ( Doc: https://wiki.facepunch.com/rust/server-gamemodes )
serverlevel="Procedural Map" # Values: Procedural Map, Barren, HapisIsland, SavasIsland
-customlevelurl="" # Custom level url. +server.levelurl \"${customlevelurl}\"
-seed="" # range: 1-2147483647, used to reproduce a procedural map.
-salt="" # range: unknown, used to recover a known setting from an existing map.
+customlevelurl="" # Custom level url. +server.levelurl \"${customlevelurl}\"
+seed="" # range: 1-2147483647, used to reproduce a procedural map.
+salt="" # range: unknown, used to recover a known setting from an existing map.
maxplayers="50"
-worldsize="3000" # default: 3000, range: 1000-6000, map size in meters.
+worldsize="3000" # default: 3000, range: 1000-6000, map size in meters.
saveinterval="300" # Auto-save in seconds.
-tickrate="30" # default: 30, range: 15-100.
+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.queryport ${queryport} +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"
@@ -199,3 +199,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.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"
gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/rwserver/_default.cfg b/lgsm/config-default/config-lgsm/rwserver/_default.cfg
index f1c09e189..a31449a05 100644
--- a/lgsm/config-default/config-lgsm/rwserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/rwserver/_default.cfg
@@ -182,3 +182,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/sampserver/_default.cfg b/lgsm/config-default/config-lgsm/sampserver/_default.cfg
index 6883fe589..eecc9cce2 100644
--- a/lgsm/config-default/config-lgsm/sampserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/sampserver/_default.cfg
@@ -169,3 +169,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg
index 6805d6395..899842b08 100644
--- a/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/sbotsserver/_default.cfg
@@ -14,7 +14,7 @@ queryport="27015"
defaultmap="StationKappa"
servername="LinuxGSM Server"
serverpassword="NOT SET" # Can't be adjusted currently
-maxplayers="8" # 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}\""
@@ -186,3 +186,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/sbserver/_default.cfg b/lgsm/config-default/config-lgsm/sbserver/_default.cfg
index 13815fbcb..521500591 100644
--- a/lgsm/config-default/config-lgsm/sbserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/sbserver/_default.cfg
@@ -185,3 +185,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/scpslserver/_default.cfg b/lgsm/config-default/config-lgsm/scpslserver/_default.cfg
index ac948d864..3409fe994 100644
--- a/lgsm/config-default/config-lgsm/scpslserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/scpslserver/_default.cfg
@@ -183,3 +183,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg b/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg
index 285bd0a49..73d0605c6 100644
--- a/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/scpslsmserver/_default.cfg
@@ -183,3 +183,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg
index 090309696..270e8f84e 100644
--- a/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/sdtdserver/_default.cfg
@@ -183,3 +183,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/sfcserver/_default.cfg b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg
index 5b1071a3b..579790be7 100644
--- a/lgsm/config-default/config-lgsm/sfcserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/sfcserver/_default.cfg
@@ -186,3 +186,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/sfserver/_default.cfg b/lgsm/config-default/config-lgsm/sfserver/_default.cfg
index 45ca1151a..dfe3857c0 100644
--- a/lgsm/config-default/config-lgsm/sfserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/sfserver/_default.cfg
@@ -184,3 +184,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/sof2server/_default.cfg b/lgsm/config-default/config-lgsm/sof2server/_default.cfg
index 094754914..a0f878e45 100644
--- a/lgsm/config-default/config-lgsm/sof2server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/sof2server/_default.cfg
@@ -170,3 +170,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/solserver/_default.cfg b/lgsm/config-default/config-lgsm/solserver/_default.cfg
index 820492509..6db45dc53 100644
--- a/lgsm/config-default/config-lgsm/solserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/solserver/_default.cfg
@@ -182,3 +182,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/squadserver/_default.cfg b/lgsm/config-default/config-lgsm/squadserver/_default.cfg
index 0a343cfdf..79240e2bf 100644
--- a/lgsm/config-default/config-lgsm/squadserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/squadserver/_default.cfg
@@ -184,3 +184,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/stnserver/_default.cfg b/lgsm/config-default/config-lgsm/stnserver/_default.cfg
index 0b9510d4c..d26cef127 100644
--- a/lgsm/config-default/config-lgsm/stnserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/stnserver/_default.cfg
@@ -184,3 +184,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log"
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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/stserver/_default.cfg b/lgsm/config-default/config-lgsm/stserver/_default.cfg
index 8988c5ce0..b304fa390 100644
--- a/lgsm/config-default/config-lgsm/stserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/stserver/_default.cfg
@@ -189,3 +189,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/svenserver/_default.cfg b/lgsm/config-default/config-lgsm/svenserver/_default.cfg
index f8feb47f4..ec164b90b 100644
--- a/lgsm/config-default/config-lgsm/svenserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/svenserver/_default.cfg
@@ -185,3 +185,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg
index c0aaea6c6..a286b0571 100644
--- a/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/terrariaserver/_default.cfg
@@ -185,3 +185,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/tf2server/_default.cfg b/lgsm/config-default/config-lgsm/tf2server/_default.cfg
index 16ab36696..824b6e7e3 100644
--- a/lgsm/config-default/config-lgsm/tf2server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/tf2server/_default.cfg
@@ -191,3 +191,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg
index 827b32736..968350fd8 100644
--- a/lgsm/config-default/config-lgsm/tfcserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/tfcserver/_default.cfg
@@ -186,3 +186,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/tiserver/_default.cfg b/lgsm/config-default/config-lgsm/tiserver/_default.cfg
index 1de6910b5..f31864df3 100644
--- a/lgsm/config-default/config-lgsm/tiserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/tiserver/_default.cfg
@@ -185,3 +185,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/ts3server/_default.cfg b/lgsm/config-default/config-lgsm/ts3server/_default.cfg
index f676309d0..963920a6c 100644
--- a/lgsm/config-default/config-lgsm/ts3server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/ts3server/_default.cfg
@@ -169,3 +169,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/tsserver/_default.cfg b/lgsm/config-default/config-lgsm/tsserver/_default.cfg
index c1c99b24a..1b4ac5bfc 100644
--- a/lgsm/config-default/config-lgsm/tsserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/tsserver/_default.cfg
@@ -186,3 +186,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/tuserver/_default.cfg b/lgsm/config-default/config-lgsm/tuserver/_default.cfg
index 5fdfd6447..816310062 100644
--- a/lgsm/config-default/config-lgsm/tuserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/tuserver/_default.cfg
@@ -188,3 +188,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/twserver/_default.cfg b/lgsm/config-default/config-lgsm/twserver/_default.cfg
index 791c93da5..8c4b32683 100644
--- a/lgsm/config-default/config-lgsm/twserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/twserver/_default.cfg
@@ -186,3 +186,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/untserver/_default.cfg b/lgsm/config-default/config-lgsm/untserver/_default.cfg
index 41d1981e7..c3c5b7e14 100644
--- a/lgsm/config-default/config-lgsm/untserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/untserver/_default.cfg
@@ -189,3 +189,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg
index b3ca481cd..0df674dc6 100644
--- a/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/ut2k4server/_default.cfg
@@ -172,3 +172,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.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"
gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/ut3server/_default.cfg b/lgsm/config-default/config-lgsm/ut3server/_default.cfg
index 49cd6b7d5..87b99bdb8 100644
--- a/lgsm/config-default/config-lgsm/ut3server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/ut3server/_default.cfg
@@ -187,3 +187,7 @@ postdetailslog="${lgsmlogdir}/${selfname}-postdetails.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"
gamelogdate="${gamelogdir}/${selfname}-game-$(date '+%Y-%m-%d-%H:%M:%S').log"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/ut99server/_default.cfg b/lgsm/config-default/config-lgsm/ut99server/_default.cfg
index 205e8a1d7..dede89687 100644
--- a/lgsm/config-default/config-lgsm/ut99server/_default.cfg
+++ b/lgsm/config-default/config-lgsm/ut99server/_default.cfg
@@ -145,7 +145,7 @@ glibc="2.1"
# Edit with care
## Game Server Directories
-systemdir="${serverfiles}/System"
+systemdir="${serverfiles}/System64"
executabledir="${systemdir}"
executable="./ucc-bin"
servercfgdir="${systemdir}"
@@ -170,3 +170,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/utserver/_default.cfg b/lgsm/config-default/config-lgsm/utserver/_default.cfg
index 6b6603221..392598840 100644
--- a/lgsm/config-default/config-lgsm/utserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/utserver/_default.cfg
@@ -173,3 +173,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/vhserver/_default.cfg b/lgsm/config-default/config-lgsm/vhserver/_default.cfg
index e351ce0e2..8fe7cd4dc 100644
--- a/lgsm/config-default/config-lgsm/vhserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/vhserver/_default.cfg
@@ -192,3 +192,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/vintsserver/_default.cfg b/lgsm/config-default/config-lgsm/vintsserver/_default.cfg
index 7009f02cb..a207ecdb7 100644
--- a/lgsm/config-default/config-lgsm/vintsserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/vintsserver/_default.cfg
@@ -173,3 +173,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg b/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg
index 6755e0e51..20b587f32 100644
--- a/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/vpmcserver/_default.cfg
@@ -177,3 +177,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/vsserver/_default.cfg b/lgsm/config-default/config-lgsm/vsserver/_default.cfg
index a441abd01..94510c334 100644
--- a/lgsm/config-default/config-lgsm/vsserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/vsserver/_default.cfg
@@ -186,3 +186,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/wetserver/_default.cfg b/lgsm/config-default/config-lgsm/wetserver/_default.cfg
index 012b2df1c..994abb5c0 100644
--- a/lgsm/config-default/config-lgsm/wetserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/wetserver/_default.cfg
@@ -165,3 +165,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/wfserver/_default.cfg b/lgsm/config-default/config-lgsm/wfserver/_default.cfg
index eeedf5f18..fc53e641c 100644
--- a/lgsm/config-default/config-lgsm/wfserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/wfserver/_default.cfg
@@ -184,3 +184,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/wmcserver/_default.cfg b/lgsm/config-default/config-lgsm/wmcserver/_default.cfg
index 229d7bef5..cdf56e71e 100644
--- a/lgsm/config-default/config-lgsm/wmcserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/wmcserver/_default.cfg
@@ -176,3 +176,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg
index a70fa371f..3743e899f 100644
--- a/lgsm/config-default/config-lgsm/wurmserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/wurmserver/_default.cfg
@@ -181,3 +181,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/zmrserver/_default.cfg b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg
index 4b87f9172..c2621b48a 100644
--- a/lgsm/config-default/config-lgsm/zmrserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/zmrserver/_default.cfg
@@ -186,3 +186,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/config-default/config-lgsm/zpsserver/_default.cfg b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg
index a5fc616cf..777403dfd 100644
--- a/lgsm/config-default/config-lgsm/zpsserver/_default.cfg
+++ b/lgsm/config-default/config-lgsm/zpsserver/_default.cfg
@@ -191,3 +191,7 @@ 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"
+
+## Log Parameters
+logtimestamp="off"
+logtimestampformat="%Y-%m-%d %H:%M:%S"
diff --git a/lgsm/functions/core_modules.sh b/lgsm/functions/core_modules.sh
new file mode 100644
index 000000000..8eb843b5a
--- /dev/null
+++ b/lgsm/functions/core_modules.sh
@@ -0,0 +1,816 @@
+#!/bin/bash
+# LinuxGSM core_modules.sh module
+# Author: Daniel Gibbs
+# Contributors: http://linuxgsm.com/contrib
+# Website: https://linuxgsm.com
+# Description: Defines all modules to allow download and execution of modules using fn_fetch_module.
+# This module is called first before any other module. Without this file other modules will not load.
+
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+
+modulesversion="v23.2.0"
+
+# Core
+
+core_dl.sh() {
+ modulefile="${FUNCNAME[0]}"
+ if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then
+ fn_fetch_core_dl "lgsm/modules" "core_dl.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash"
+ else
+ fn_bootstrap_fetch_file_github "lgsm/modules" "core_dl.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash"
+ fi
+}
+
+core_messages.sh() {
+ modulefile="${FUNCNAME[0]}"
+ if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then
+ fn_fetch_core_dl "lgsm/modules" "core_messages.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash"
+ else
+ fn_bootstrap_fetch_file_github "lgsm/modules" "core_messages.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash"
+ fi
+}
+
+core_legacy.sh() {
+ modulefile="${FUNCNAME[0]}"
+ if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then
+ fn_fetch_core_dl "lgsm/modules" "core_legacy.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash"
+ else
+ fn_bootstrap_fetch_file_github "lgsm/modules" "core_legacy.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash"
+ fi
+}
+
+core_exit.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+core_getopt.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+core_trap.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+core_steamcmd.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+core_github.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+# Commands
+
+command_backup.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_console.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_debug.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_details.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_sponsor.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_postdetails.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_test_alert.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_monitor.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_start.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_stop.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_validate.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_install.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_install_resources_mta.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_squad_license.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_mods_install.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_mods_update.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_mods_remove.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_fastdl.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_ts3_server_pass.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_restart.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_skeleton.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_wipe.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_send.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+# Checks
+
+check.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+check_config.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+check_deps.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+check_executable.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+check_glibc.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+check_ip.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+check_last_update.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+check_logs.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+check_permissions.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+check_root.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+check_status.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+check_steamcmd.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+check_system_dir.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+check_system_requirements.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+check_tmuxception.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+check_version.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+# Compress
+
+compress_unreal2_maps.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+compress_ut99_maps.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+# Mods
+
+mods_list.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+mods_core.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+# Dev
+
+command_dev_clear_modules.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_dev_debug.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_dev_detect_deps.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_dev_detect_glibc.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_dev_detect_ldd.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_dev_query_raw.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+# Fix
+
+fix.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_ark.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_av.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_arma3.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_armar.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_bt.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_bo.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_cmw.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_csgo.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_dst.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_hw.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_ins.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_kf.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_kf2.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_lo.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_mcb.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_mta.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_nmrih.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_onset.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_ro.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_rust.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_rw.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_sfc.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_st.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_steamcmd.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_terraria.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_tf2.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_ut3.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_rust.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_samp.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_sdtd.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_sof2.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_squad.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_ts3.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_ut2k4.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_ut.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_unt.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_vh.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_wurm.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_zmr.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+# Info
+
+info_distro.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+info_game.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+info_messages.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+info_stats.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+# Alert
+
+alert.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+alert_discord.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+alert_email.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+alert_ifttt.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+alert_mailgun.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+alert_pushbullet.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+alert_pushover.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+alert_gotify.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+alert_telegram.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+alert_rocketchat.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+alert_slack.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+# Logs
+
+core_logs.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+# Query
+
+query_gamedig.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+# Update
+
+command_update_modules.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_update_linuxgsm.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_update.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_check_update.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+update_ts3.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+update_minecraft.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+update_minecraft_bedrock.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+update_papermc.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+update_mta.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+update_factorio.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+update_jediknight2.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+update_steamcmd.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+update_vintagestory.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+update_ut99.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fn_update_modules.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+#
+## Installer modules
+#
+
+fn_autoinstall() {
+ autoinstall=1
+ command_install.sh
+}
+
+install_complete.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_config.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_factorio_save.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_dst_token.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_eula.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_gsquery.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_gslt.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_header.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_logs.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_retry.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_server_dir.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+install_server_files.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_stats.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_steamcmd.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_ts3.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_ts3db.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_ut2k4.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_dl_ut2k4.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_ut2k4_key.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+# Calls code required for legacy servers
+core_legacy.sh
+
+# Creates tmp dir if missing
+if [ ! -d "${tmpdir}" ]; then
+ mkdir -p "${tmpdir}"
+fi
+
+# Creates lock dir if missing
+if [ ! -d "${lockdir}" ]; then
+ mkdir -p "${lockdir}"
+fi
+
+# Calls on-screen messages (bootstrap)
+core_messages.sh
+
+#Calls file downloader (bootstrap)
+core_dl.sh
+
+# Calls the global Ctrl-C trap
+core_trap.sh
diff --git a/lgsm/modules/README.md b/lgsm/modules/README.md
old mode 100755
new mode 100644
diff --git a/lgsm/modules/alert.sh b/lgsm/modules/alert.sh
old mode 100755
new mode 100644
index 8460209c4..c7ed897f9
--- a/lgsm/modules/alert.sh
+++ b/lgsm/modules/alert.sh
@@ -3,9 +3,9 @@
# Author: Daniel Gibbs
# Contributors: http://linuxgsm.com/contrib
# Website: https://linuxgsm.com
-# Description: Overall function for managing alerts.
+# Description: Overall module for managing alerts.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Generates alert log of the details at the time of the alert.
# Used with email alerts.
@@ -60,7 +60,7 @@ fn_alert_update() {
alertemoji="🎮"
alertsound="1"
alerturl="not enabled"
- alertbody="${gamename} received update"
+ alertbody="${gamename} received update: ${remotebuildversion}"
}
fn_alert_check_update() {
@@ -69,7 +69,7 @@ fn_alert_check_update() {
alertemoji="🎮"
alertsound="1"
alerturl="not enabled"
- alertbody="${gamename} update available"
+ alertbody="${gamename} update available: ${remotebuildversion}"
}
fn_alert_permissions() {
diff --git a/lgsm/modules/alert_discord.sh b/lgsm/modules/alert_discord.sh
old mode 100755
new mode 100644
index 770817516..a384de3db
--- a/lgsm/modules/alert_discord.sh
+++ b/lgsm/modules/alert_discord.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Sends Discord alert.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
json=$(
cat << EOF
diff --git a/lgsm/modules/alert_email.sh b/lgsm/modules/alert_email.sh
old mode 100755
new mode 100644
index ad90e880f..e2cf5f123
--- a/lgsm/modules/alert_email.sh
+++ b/lgsm/modules/alert_email.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Sends email alert.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_print_dots "Sending Email alert: ${email}"
fn_sleep_time
diff --git a/lgsm/modules/alert_gotify.sh b/lgsm/modules/alert_gotify.sh
index faeba4593..ef833ba75 100644
--- a/lgsm/modules/alert_gotify.sh
+++ b/lgsm/modules/alert_gotify.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Sends Gotify alert.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
json=$(
cat << EOF
diff --git a/lgsm/modules/alert_ifttt.sh b/lgsm/modules/alert_ifttt.sh
old mode 100755
new mode 100644
index f8bbc24ad..ae0de8ed6
--- a/lgsm/modules/alert_ifttt.sh
+++ b/lgsm/modules/alert_ifttt.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Sends IFTTT alert.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
json=$(
cat << EOF
diff --git a/lgsm/modules/alert_mailgun.sh b/lgsm/modules/alert_mailgun.sh
old mode 100755
new mode 100644
index 25576209c..a25c82648
--- a/lgsm/modules/alert_mailgun.sh
+++ b/lgsm/modules/alert_mailgun.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Sends Mailgun Email alert.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ "${mailgunapiregion}" == "eu" ]; then
mailgunapiurl="https://api.eu.mailgun.net"
diff --git a/lgsm/modules/alert_pushbullet.sh b/lgsm/modules/alert_pushbullet.sh
old mode 100755
new mode 100644
index 3e82d0db0..eec141611
--- a/lgsm/modules/alert_pushbullet.sh
+++ b/lgsm/modules/alert_pushbullet.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Sends Pushbullet Messenger alert.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
json=$(
cat << EOF
diff --git a/lgsm/modules/alert_pushover.sh b/lgsm/modules/alert_pushover.sh
old mode 100755
new mode 100644
index d7c086478..608e73c30
--- a/lgsm/modules/alert_pushover.sh
+++ b/lgsm/modules/alert_pushover.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Sends Pushover alert.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_print_dots "Sending Pushover alert"
diff --git a/lgsm/modules/alert_rocketchat.sh b/lgsm/modules/alert_rocketchat.sh
old mode 100755
new mode 100644
index 34d018e38..875a6ff5d
--- a/lgsm/modules/alert_rocketchat.sh
+++ b/lgsm/modules/alert_rocketchat.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Sends Rocketchat alert.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
json=$(
cat << EOF
diff --git a/lgsm/modules/alert_slack.sh b/lgsm/modules/alert_slack.sh
old mode 100755
new mode 100644
index 2e87c1571..3bb148828
--- a/lgsm/modules/alert_slack.sh
+++ b/lgsm/modules/alert_slack.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Sends Slack alert.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
json=$(
cat << EOF
diff --git a/lgsm/modules/alert_telegram.sh b/lgsm/modules/alert_telegram.sh
old mode 100755
new mode 100644
index 27e34beb4..77b89560c
--- a/lgsm/modules/alert_telegram.sh
+++ b/lgsm/modules/alert_telegram.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Sends Telegram Messenger alert.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
json=$(
cat << EOF
diff --git a/lgsm/modules/check.sh b/lgsm/modules/check.sh
old mode 100755
new mode 100644
index 239a24140..f0f49fc51
--- a/lgsm/modules/check.sh
+++ b/lgsm/modules/check.sh
@@ -3,10 +3,10 @@
# Author: Daniel Gibbs
# Contributors: http://linuxgsm.com/contrib
# Website: https://linuxgsm.com
-# Description: Overall function for managing checks.
+# Description: Overall module for managing checks.
# Runs checks that will either halt on or fix an issue.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Every command that requires checks just references check.sh.
# check.sh selects which checks to run by using arrays.
diff --git a/lgsm/modules/check_config.sh b/lgsm/modules/check_config.sh
old mode 100755
new mode 100644
index 2c65243eb..4f96a8db4
--- a/lgsm/modules/check_config.sh
+++ b/lgsm/modules/check_config.sh
@@ -5,7 +5,7 @@
# 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]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ -n "${servercfgfullpath}" ] && [ ! -f "${servercfgfullpath}" ]; then
fn_print_dots ""
diff --git a/lgsm/modules/check_deps.sh b/lgsm/modules/check_deps.sh
old mode 100755
new mode 100644
index bb8507769..1db5c96c3
--- a/lgsm/modules/check_deps.sh
+++ b/lgsm/modules/check_deps.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Checks and installs missing dependencies.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_install_mono_repo() {
if [ "${autodepinstall}" == "0" ]; then
diff --git a/lgsm/modules/check_executable.sh b/lgsm/modules/check_executable.sh
old mode 100755
new mode 100644
index d1b5c3efd..40721fbf4
--- a/lgsm/modules/check_executable.sh
+++ b/lgsm/modules/check_executable.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Checks if server executable exists.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Check if executable exists
execname=$(basename "${executable}")
diff --git a/lgsm/modules/check_glibc.sh b/lgsm/modules/check_glibc.sh
old mode 100755
new mode 100644
index b1a959f5b..25357a461
--- a/lgsm/modules/check_glibc.sh
+++ b/lgsm/modules/check_glibc.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Checks if the server has the correct Glibc version.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
info_distro.sh
diff --git a/lgsm/modules/check_ip.sh b/lgsm/modules/check_ip.sh
old mode 100755
new mode 100644
index 7b9923dc2..8dc0567b9
--- a/lgsm/modules/check_ip.sh
+++ b/lgsm/modules/check_ip.sh
@@ -6,53 +6,57 @@
# 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".
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
info_game.sh
ip_commands_array=("/bin/ip" "/usr/sbin/ip" "ip")
for ip_command in "${ip_commands_array[@]}"; do
- if [ "$(command -v ${ip_command} 2> /dev/null)" ]; then
+ if [ "$(command -v "${ip_command}" 2> /dev/null)" ]; then
ipcommand="${ip_command}"
break
fi
done
-# Used to get the server interface link speed.
ethtool_commands_array=("/bin/ethtool" "/usr/sbin/ethtool" "ethtool")
for ethtool_command in "${ethtool_commands_array[@]}"; do
- if [ "$(command -v ${ethtool_command} 2> /dev/null)" ]; then
+ if [ "$(command -v "${ethtool_command}" 2> /dev/null)" ]; then
ethtoolcommand="${ethtool_command}"
break
fi
done
-getip=$(${ipcommand} -o -4 addr | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | sort -u | grep -v 127.0.0)
-getipwc=$(${ipcommand} -o -4 addr | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | sort -u | grep -vc 127.0.0)
+mapfile -t current_ips < <(${ipcommand} -o -4 addr | awk '{print $4}' | grep -oe '\([0-9]\{1,3\}\.\?\)\{4\}' | sort -u | grep -v 127.0.0)
+
+function fn_is_valid_ip() {
+ local ip="${1}"
+ # excluding 0.* ips also
+ grep -qEe '^[1-9]+[0-9]*\.[0-9]+\.[0-9]+\.[0-9]+$' <<< "${ip}"
+}
# Check if server has multiple IP addresses
# If the IP variable has been set by user.
-if [ -n "${ip}" ] && [ "${ip}" != "0.0.0.0" ]; then
+if fn_is_valid_ip "${ip}"; then
queryips=("${ip}")
webadminip=("${ip}")
telnetip=("${ip}")
# If game config does have an IP set.
-elif [ -n "${configip}" ] && [ "${configip}" != "0.0.0.0" ]; then
+elif fn_is_valid_ip "${configip}"; then
queryips=("${configip}")
ip="${configip}"
webadminip=("${configip}")
telnetip=("${configip}")
# If there is only 1 server IP address.
# Some IP details can automaticly use the one IP
-elif [ "${getipwc}" == "1" ]; then
- queryips=($(echo "${getip}"))
+elif [ "${#current_ips[@]}" == "1" ]; then
+ queryips=("127.0.0.1" "${current_ips[@]}")
ip="0.0.0.0"
- webadminip=("${getip}")
- telnetip=("${getip}")
+ webadminip=("${current_ips[@]}")
+ telnetip=("${current_ips[@]}")
# If no ip is set by the user and server has more than one IP.
else
- queryips=($(echo "${getip}"))
+ queryips=("127.0.0.1" "${current_ips[@]}")
ip="0.0.0.0"
webadminip=("${ip}")
telnetip=("${ip}")
diff --git a/lgsm/modules/check_last_update.sh b/lgsm/modules/check_last_update.sh
old mode 100755
new mode 100644
index ee86c0ba1..d4f2d8f89
--- a/lgsm/modules/check_last_update.sh
+++ b/lgsm/modules/check_last_update.sh
@@ -6,7 +6,7 @@
# Description: Checks lock file to see when last update happened.
# Will reboot server if instance not rebooted since update.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ -f "${lockdir}/${selfname}-laststart.lock" ]; then
laststart=$(cat "${lockdir}/${selfname}-laststart.lock")
diff --git a/lgsm/modules/check_logs.sh b/lgsm/modules/check_logs.sh
old mode 100755
new mode 100644
index fa3df92d1..2087ac915
--- a/lgsm/modules/check_logs.sh
+++ b/lgsm/modules/check_logs.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Checks if log files exist.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_check_logs() {
fn_print_dots "Checking for log files"
diff --git a/lgsm/modules/check_permissions.sh b/lgsm/modules/check_permissions.sh
old mode 100755
new mode 100644
index 0094456ec..bb3e6764f
--- a/lgsm/modules/check_permissions.sh
+++ b/lgsm/modules/check_permissions.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Checks ownership & permissions of scripts, files and directories.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_check_ownership() {
if [ -f "${rootdir}/${selfname}" ]; then
@@ -13,8 +13,8 @@ fn_check_ownership() {
selfownissue=1
fi
fi
- if [ -d "${functionsdir}" ]; then
- if [ "$(find "${functionsdir}" -not -user "$(whoami)" | wc -l)" -ne "0" ]; then
+ if [ -d "${modulesdir}" ]; then
+ if [ "$(find "${modulesdir}" -not -user "$(whoami)" | wc -l)" -ne "0" ]; then
funcownissue=1
fi
fi
@@ -34,7 +34,7 @@ fn_check_ownership() {
find "${rootdir}/${selfname}" -not -user "$(whoami)" -printf "%u\t%g\t%p\n"
fi
if [ "${funcownissue}" == "1" ]; then
- find "${functionsdir}" -not -user "$(whoami)" -printf "%u\t%g\t%p\n"
+ find "${modulesdir}" -not -user "$(whoami)" -printf "%u\t%g\t%p\n"
fi
if [ "${filesownissue}" == "1" ]; then
find "${serverfiles}" -not -user "$(whoami)" -printf "%u\t%g\t%p\n"
@@ -53,15 +53,15 @@ fn_check_ownership() {
}
fn_check_permissions() {
- if [ -d "${functionsdir}" ]; then
- if [ "$(find "${functionsdir}" -type f -not -executable | wc -l)" -ne "0" ]; then
+ if [ -d "${modulesdir}" ]; then
+ if [ "$(find "${modulesdir}" -type f -not -executable | wc -l)" -ne "0" ]; then
fn_print_fail_nl "Permissions issues found"
fn_script_log_fatal "Permissions issues found"
fn_print_information_nl "The following files are not executable:"
fn_script_log_info "The following files are not executable:"
{
echo -e "File\n"
- find "${functionsdir}" -type f -not -executable -printf "%p\n"
+ find "${modulesdir}" -type f -not -executable -printf "%p\n"
} | column -s $'\t' -t | tee -a "${lgsmlog}"
if [ "${monitorflag}" == 1 ]; then
alert="permissions"
@@ -141,7 +141,7 @@ fn_check_permissions() {
fi
}
-## The following fn_sys_perm_* functions checks for permission errors in /sys directory.
+## The following fn_sys_perm_* modules checks for permission errors in /sys directory.
# Checks for permission errors in /sys directory.
fn_sys_perm_errors_detect() {
diff --git a/lgsm/modules/check_root.sh b/lgsm/modules/check_root.sh
old mode 100755
new mode 100644
index dab033148..26475601a
--- a/lgsm/modules/check_root.sh
+++ b/lgsm/modules/check_root.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Checks if the user tried to run the script as root.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ "$(whoami)" == "root" ] && [ ! -f /.dockerenv ]; then
if [ "${commandname}" != "INSTALL" ]; then
diff --git a/lgsm/modules/check_status.sh b/lgsm/modules/check_status.sh
old mode 100755
new mode 100644
index 28ec38eb2..2ebfb3055
--- a/lgsm/modules/check_status.sh
+++ b/lgsm/modules/check_status.sh
@@ -5,6 +5,6 @@
# Website: https://linuxgsm.com
# Description: Checks the process status of the server. Either online or offline.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
status=$(tmux list-sessions -F "#{session_name}" 2> /dev/null | grep -Ecx "^${sessionname}")
diff --git a/lgsm/modules/check_steamcmd.sh b/lgsm/modules/check_steamcmd.sh
old mode 100755
new mode 100644
index d41e8669f..5d14bb21f
--- a/lgsm/modules/check_steamcmd.sh
+++ b/lgsm/modules/check_steamcmd.sh
@@ -5,9 +5,9 @@
# Website: https://linuxgsm.com
# Description: Checks if SteamCMD is installed correctly.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
-# init steamcmd functions
+# init steamcmd functions.
core_steamcmd.sh
fn_check_steamcmd_clear
diff --git a/lgsm/modules/check_system_dir.sh b/lgsm/modules/check_system_dir.sh
old mode 100755
new mode 100644
index 0a732d6d1..9f0f5f092
--- a/lgsm/modules/check_system_dir.sh
+++ b/lgsm/modules/check_system_dir.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Checks if systemdir/serverfiles is accessible.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ "${commandname}" != "VALIDATE" ]; then
checkdir="${serverfiles}"
diff --git a/lgsm/modules/check_system_requirements.sh b/lgsm/modules/check_system_requirements.sh
old mode 100755
new mode 100644
index bfe597135..114292f46
--- a/lgsm/modules/check_system_requirements.sh
+++ b/lgsm/modules/check_system_requirements.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Checks RAM requirements.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
info_distro.sh
diff --git a/lgsm/modules/check_tmuxception.sh b/lgsm/modules/check_tmuxception.sh
old mode 100755
new mode 100644
index 64705a3a8..aded5cb2d
--- a/lgsm/modules/check_tmuxception.sh
+++ b/lgsm/modules/check_tmuxception.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Checks if run from tmux or screen.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_check_is_in_tmux() {
if [ "${TMUX}" ]; then
diff --git a/lgsm/modules/check_version.sh b/lgsm/modules/check_version.sh
old mode 100755
new mode 100644
index 657e32b54..3ca015843
--- a/lgsm/modules/check_version.sh
+++ b/lgsm/modules/check_version.sh
@@ -6,7 +6,7 @@
# 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]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ -n "${modulesversion}" ] && [ -n "${version}" ] && [ "${version}" != "${modulesversion}" ]; then
exitbypass=1
diff --git a/lgsm/modules/command_backup.sh b/lgsm/modules/command_backup.sh
index 0dfabcd03..1973eb95f 100644
--- a/lgsm/modules/command_backup.sh
+++ b/lgsm/modules/command_backup.sh
@@ -7,7 +7,7 @@
commandname="BACKUP"
commandaction="Backing up"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
check.sh
@@ -99,16 +99,17 @@ fn_backup_migrate_olddir() {
fn_script_log_info "${rootdir}/backups > ${backupdir}"
mv "${rootdir}/backups/"* "${backupdir}" 2> /dev/null
exitcode=$?
- if [ "${exitcode}" -eq 0 ]; then
+ if [ "${exitcode}" == 0 ]; then
rmdir "${rootdir}/backups" 2> /dev/null
exitcode=$?
fi
- if [ "${exitcode}" -eq 0 ]; then
- fn_print_ok_nl "Backup directory is being migrated"
- fn_script_log_pass "Backup directory is being migrated"
- else
+ if [ "${exitcode}" != 0 ]; then
fn_print_error_nl "Backup directory is being migrated"
fn_script_log_error "Backup directory is being migrated"
+ else
+
+ fn_print_ok_nl "Backup directory is being migrated"
+ fn_script_log_pass "Backup directory is being migrated"
fi
fi
fi
diff --git a/lgsm/modules/command_check_update.sh b/lgsm/modules/command_check_update.sh
old mode 100755
new mode 100644
index 59b29d6e9..f079f3616
--- a/lgsm/modules/command_check_update.sh
+++ b/lgsm/modules/command_check_update.sh
@@ -7,23 +7,33 @@
commandname="CHECK-UPDATE"
commandaction="check for Update"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
fn_print_dots ""
check.sh
core_logs.sh
-if [ "${appid}" ]; then
- core_steamcmd.sh
-
- check_steamcmd.sh
-
- fn_update_steamcmd_localbuild
- fn_update_steamcmd_remotebuild
- fn_update_steamcmd_compare
-elif [ "${shortname}" == "ts3" ]; then
+if [ "${shortname}" == "ts3" ]; then
update_ts3.sh
+elif [ "${shortname}" == "mc" ]; then
+ update_minecraft.sh
+elif [ "${shortname}" == "mcb" ]; then
+ update_minecraft_bedrock.sh
+elif [ "${shortname}" == "pmc" ] || [ "${shortname}" == "vpmc" ] || [ "${shortname}" == "wmc" ]; then
+ update_papermc.sh
+elif [ "${shortname}" == "fctr" ]; then
+ update_factorio.sh
+elif [ "${shortname}" == "mta" ]; then
+ update_mta.sh
+elif [ "${shortname}" == "jk2" ]; then
+ update_jediknight2.sh
+elif [ "${shortname}" == "vints" ]; then
+ update_vintagestory.sh
+elif [ "${shortname}" == "ut99" ]; then
+ update_ut99.sh
+else
+ update_steamcmd.sh
fi
core_exit.sh
diff --git a/lgsm/modules/command_console.sh b/lgsm/modules/command_console.sh
old mode 100755
new mode 100644
index 5b84789e6..e95f2d0e5
--- a/lgsm/modules/command_console.sh
+++ b/lgsm/modules/command_console.sh
@@ -7,7 +7,7 @@
commandname="CONSOLE"
commandaction="Access console"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
check.sh
diff --git a/lgsm/modules/command_debug.sh b/lgsm/modules/command_debug.sh
old mode 100755
new mode 100644
index c6422be65..52efd04db
--- a/lgsm/modules/command_debug.sh
+++ b/lgsm/modules/command_debug.sh
@@ -7,7 +7,7 @@
commandname="DEBUG"
commandaction="Debuging"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
# Trap to remove lockfile on quit.
diff --git a/lgsm/modules/command_details.sh b/lgsm/modules/command_details.sh
old mode 100755
new mode 100644
index 0d35a1e98..2c8e3a658
--- a/lgsm/modules/command_details.sh
+++ b/lgsm/modules/command_details.sh
@@ -7,7 +7,7 @@
commandname="DETAILS"
commandaction="Viewing details"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
# Run checks and gathers details to display.
@@ -38,7 +38,4 @@ fn_info_message_ports
fn_info_message_select_engine
fn_info_message_statusbottom
-if [ -z "${exitcode}" ]; then
- exitcode=0
-fi
core_exit.sh
diff --git a/lgsm/modules/command_dev_clear_functions.sh b/lgsm/modules/command_dev_clear_modules.sh
old mode 100755
new mode 100644
similarity index 60%
rename from lgsm/modules/command_dev_clear_functions.sh
rename to lgsm/modules/command_dev_clear_modules.sh
index 87c77515d..52d07ee1a
--- a/lgsm/modules/command_dev_clear_functions.sh
+++ b/lgsm/modules/command_dev_clear_modules.sh
@@ -1,21 +1,21 @@
#!/bin/bash
-# LinuxGSM command_dev_clear_functions.sh module
+# LinuxGSM command_dev_clear_modules.sh module
# Author: Daniel Gibbs
# Contributors: http://linuxgsm.com/contrib
# Website: https://linuxgsm.com
-# Description: Deletes the contents of the functions dir.
+# Description: Deletes the contents of the modules dir.
commandname="DEV-CLEAR-MODULES"
commandaction="Clearing modules"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
echo -e "================================="
-echo -e "Clear Functions"
+echo -e "Clear Modules"
echo -e "================================="
echo -e ""
-if fn_prompt_yn "Do you want to delete all functions?" Y; then
- rm -rfv "${functionsdir:?}/"*
+if fn_prompt_yn "Do you want to delete all modules?" Y; then
+ rm -rfv "${modulesdir:?}/"*
rm -rfv "${configdirdefault:?}/"*
fn_script_log_info "Cleared modules directory"
fn_script_log_info "Cleared default config directory"
diff --git a/lgsm/modules/command_dev_debug.sh b/lgsm/modules/command_dev_debug.sh
old mode 100755
new mode 100644
index 19f16d58e..081bda611
--- a/lgsm/modules/command_dev_debug.sh
+++ b/lgsm/modules/command_dev_debug.sh
@@ -7,7 +7,7 @@
commandname="DEV-DEBUG"
commandaction="Developer debug"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_reset
if [ -f "${rootdir}/.dev-debug" ]; then
diff --git a/lgsm/modules/command_dev_detect_deps.sh b/lgsm/modules/command_dev_detect_deps.sh
old mode 100755
new mode 100644
index d16b74418..763ab5554
--- a/lgsm/modules/command_dev_detect_deps.sh
+++ b/lgsm/modules/command_dev_detect_deps.sh
@@ -7,7 +7,7 @@
commandname="DEV-DETECT-DEPS"
commandaction="Developer detect deps"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
echo -e "================================="
diff --git a/lgsm/modules/command_dev_detect_glibc.sh b/lgsm/modules/command_dev_detect_glibc.sh
old mode 100755
new mode 100644
index 73280e55d..8ff87d711
--- a/lgsm/modules/command_dev_detect_glibc.sh
+++ b/lgsm/modules/command_dev_detect_glibc.sh
@@ -8,7 +8,7 @@
commandname="DEV-DETECT-GLIBC"
commandaction="Developer detect glibc"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
echo -e "================================="
diff --git a/lgsm/modules/command_dev_detect_ldd.sh b/lgsm/modules/command_dev_detect_ldd.sh
old mode 100755
new mode 100644
index 43630d4e9..877c8d95b
--- a/lgsm/modules/command_dev_detect_ldd.sh
+++ b/lgsm/modules/command_dev_detect_ldd.sh
@@ -8,7 +8,7 @@
commandname="DEV-DETECT-LDD"
commandaction="Developer detect ldd"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
echo -e "================================="
diff --git a/lgsm/modules/command_dev_query_raw.sh b/lgsm/modules/command_dev_query_raw.sh
old mode 100755
new mode 100644
index 26884b259..0d30e75bf
--- a/lgsm/modules/command_dev_query_raw.sh
+++ b/lgsm/modules/command_dev_query_raw.sh
@@ -7,7 +7,7 @@
commandname="DEV-QUERY-RAW"
commandaction="Developer query raw"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
check.sh
@@ -229,10 +229,10 @@ echo -e ""
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"
+ if [ ! -f "${modulesdir}/query_gsquery.py" ]; then
+ fn_fetch_file_github "lgsm/modules" "query_gsquery.py" "${modulesdir}" "chmodx" "norun" "noforce" "nohash"
fi
- "${functionsdir}"/query_gsquery.py -a "${queryip}" -p "${queryport}" -e "${querytype}"
+ "${modulesdir}"/query_gsquery.py -a "${queryip}" -p "${queryport}" -e "${querytype}"
done
echo -e ""
echo -e "${lightgreen}TCP Raw Output${default}"
diff --git a/lgsm/modules/command_fastdl.sh b/lgsm/modules/command_fastdl.sh
old mode 100755
new mode 100644
index 78abd650a..4aff9994d
--- a/lgsm/modules/command_fastdl.sh
+++ b/lgsm/modules/command_fastdl.sh
@@ -7,7 +7,7 @@
commandname="FASTDL"
commandaction="Fastdl"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
check.sh
diff --git a/lgsm/modules/command_install.sh b/lgsm/modules/command_install.sh
old mode 100755
new mode 100644
index 19dc59c7e..32f846fac
--- a/lgsm/modules/command_install.sh
+++ b/lgsm/modules/command_install.sh
@@ -3,11 +3,11 @@
# Author: Daniel Gibbs
# Contributors: http://linuxgsm.com/contrib
# Website: https://linuxgsm.com
-# Description: Overall function for the installer.
+# Description: Overall module for the installer.
commandname="INSTALL"
commandaction="Installing"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
check.sh
diff --git a/lgsm/modules/command_install_resources_mta.sh b/lgsm/modules/command_install_resources_mta.sh
old mode 100755
new mode 100644
index 15f5be22f..c3d745a30
--- a/lgsm/modules/command_install_resources_mta.sh
+++ b/lgsm/modules/command_install_resources_mta.sh
@@ -7,12 +7,12 @@
commandname="DEFAULT-RESOURCES"
commandaction="Default Resources"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
fn_install_resources() {
echo -e ""
- echo -e "Installing Default Resources"
+ echo -e "${lightyellow}Installing Default Resources${default}"
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_dl_extract "${tmpdir}" "mtasa-resources-latest.zip" "${resourcesdir}"
@@ -30,5 +30,3 @@ else
fn_print_warning_nl "Default resources are not installed when using ./${selfname} auto-install."
fn_print_information_nl "To install default resources use ./${selfname} install"
fi
-
-core_exit.sh
diff --git a/lgsm/modules/command_mods_install.sh b/lgsm/modules/command_mods_install.sh
old mode 100755
new mode 100644
index 0edbe5bc0..d602be2cd
--- a/lgsm/modules/command_mods_install.sh
+++ b/lgsm/modules/command_mods_install.sh
@@ -7,7 +7,7 @@
commandname="MODS-INSTALL"
commandaction="Installing mods"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
check.sh
diff --git a/lgsm/modules/command_mods_remove.sh b/lgsm/modules/command_mods_remove.sh
old mode 100755
new mode 100644
index 7127dcb3c..08095c8e8
--- a/lgsm/modules/command_mods_remove.sh
+++ b/lgsm/modules/command_mods_remove.sh
@@ -7,7 +7,7 @@
commandname="MODS-REMOVE"
commandaction="Removing mods"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
check.sh
diff --git a/lgsm/modules/command_mods_update.sh b/lgsm/modules/command_mods_update.sh
old mode 100755
new mode 100644
index c2f7b42b5..b917f191f
--- a/lgsm/modules/command_mods_update.sh
+++ b/lgsm/modules/command_mods_update.sh
@@ -7,7 +7,7 @@
commandname="MODS-UPDATE"
commandaction="Updating mods"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
check.sh
@@ -27,8 +27,8 @@ fn_remove_cfg_files() {
filetopreserve=$(echo -e "${modkeepfiles}" | awk -F ';' -v x=${preservefilesindex} '{ print $x }')
echo -e " * serverfiles/${filetopreserve}"
# If it matches an existing file that have been extracted delete the file.
- if [ -f "${extractdir}/${filetopreserve}" ] || [ -d "${extractdir}/${filetopreserve}" ]; then
- rm -r "${extractdir:?}/${filetopreserve}"
+ if [ -f "${extractdest}/${filetopreserve}" ] || [ -d "${extractdest}/${filetopreserve}" ]; then
+ rm -r "${extractdest:?}/${filetopreserve}"
# Write the file path in a tmp file, to rebuild a full file list as it is rebuilt upon update.
if [ ! -f "${modsdir}/.removedfiles.tmp" ]; then
touch "${modsdir}/.removedfiles.tmp"
diff --git a/lgsm/modules/command_monitor.sh b/lgsm/modules/command_monitor.sh
old mode 100755
new mode 100644
index 0d6402942..f2db9ca2d
--- a/lgsm/modules/command_monitor.sh
+++ b/lgsm/modules/command_monitor.sh
@@ -8,7 +8,7 @@
commandname="MONITOR"
commandaction="Monitoring"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
fn_monitor_check_lockfile() {
@@ -72,7 +72,7 @@ fn_monitor_check_queryport() {
fn_print_dots "Checking port: "
fn_print_checking_eol
fn_script_log_info "Checking port: CHECKING"
- if [ -n "${rconenabled}" ] && [ "${rconenabled}" != "true" ] && [ ${shortname} == "av" ]; then
+ if [ -n "${rconenabled}" ] && [ "${rconenabled}" != "true" ] && [ "${shortname}" == "av" ]; then
fn_print_warn "Checking port: Unable to query, rcon is not enabled"
fn_script_log_warn "Checking port: Unable to query, rcon is not enabled"
else
@@ -84,10 +84,10 @@ 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"
+ if [ ! -f "${modulesdir}/query_gsquery.py" ]; then
+ fn_fetch_file_github "lgsm/modules" "query_gsquery.py" "${modulesdir}" "chmodx" "norun" "noforce" "nohash"
fi
- "${functionsdir}"/query_gsquery.py -a "${queryip}" -p "${queryport}" -e "${querytype}" > /dev/null 2>&1
+ "${modulesdir}"/query_gsquery.py -a "${queryip}" -p "${queryport}" -e "${querytype}" > /dev/null 2>&1
querystatus="$?"
}
diff --git a/lgsm/modules/command_postdetails.sh b/lgsm/modules/command_postdetails.sh
old mode 100755
new mode 100644
index dad44d9af..736c9ec27
--- a/lgsm/modules/command_postdetails.sh
+++ b/lgsm/modules/command_postdetails.sh
@@ -7,12 +7,12 @@
commandname="POST-DETAILS"
commandaction="Posting details"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
posttarget="https://termbin.com"
-# source all of the functions defined in the details command.
+# source all of the modules defined in the details command.
info_messages.sh
fn_bad_postdetailslog() {
diff --git a/lgsm/modules/command_restart.sh b/lgsm/modules/command_restart.sh
old mode 100755
new mode 100644
index 3bf60c32c..b7bb1f3e3
--- a/lgsm/modules/command_restart.sh
+++ b/lgsm/modules/command_restart.sh
@@ -7,7 +7,7 @@
commandname="MODS-INSTALL"
commandaction="Restarting"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
info_game.sh
diff --git a/lgsm/modules/command_send.sh b/lgsm/modules/command_send.sh
index c143276f6..8ba8f8412 100644
--- a/lgsm/modules/command_send.sh
+++ b/lgsm/modules/command_send.sh
@@ -7,7 +7,7 @@
commandname="SEND"
commandaction="Send"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
check.sh
diff --git a/lgsm/modules/command_skeleton.sh b/lgsm/modules/command_skeleton.sh
index 53c4ddec5..01a7f4e7e 100644
--- a/lgsm/modules/command_skeleton.sh
+++ b/lgsm/modules/command_skeleton.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Creates an copy of a game servers directorys.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_print_dots "Creating skeleton directory"
check.sh
diff --git a/lgsm/modules/command_start.sh b/lgsm/modules/command_start.sh
old mode 100755
new mode 100644
index 4b01984f4..e5021cde2
--- a/lgsm/modules/command_start.sh
+++ b/lgsm/modules/command_start.sh
@@ -7,7 +7,8 @@
commandname="START"
commandaction="Starting"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+addtimestamp="gawk '{ print strftime(\\\"[$logtimestampformat]\\\"), \\\$0 }'"
fn_firstcommand_set
fn_start_teamspeak3() {
@@ -92,8 +93,13 @@ fn_start_tmux() {
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}'"
+ if [ "$logtimestamp" == "on" ]; then
+ tmux pipe-pane -o -t "${sessionname}" "exec bash -c \"cat | $addtimestamp\" >> '${consolelog}'"
+ else
+ tmux pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'"
+ fi
fi
+
elif [ -n "${tmuxv}" ]; then
# tmux pipe-pane not supported in tmux versions < 1.6.
if [ "${tmuxvdigit}" -lt "16" ]; then
@@ -108,7 +114,11 @@ fn_start_tmux() {
Currently installed: $(tmux -V)" > "${consolelog}"
# Console logging enable or not set.
elif [ "${consolelogging}" == "on" ] || [ -z "${consolelogging}" ]; then
- tmux pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'"
+ if [ "$logtimestamp" == "on" ]; then
+ tmux pipe-pane -o -t "${sessionname}" "exec bash -c \"cat | $addtimestamp\" >> '${consolelog}'"
+ else
+ tmux pipe-pane -o -t "${sessionname}" "exec cat >> '${consolelog}'"
+ fi
fi
else
echo -e "Unable to detect tmux version" >> "${consolelog}"
@@ -137,7 +147,7 @@ fn_start_tmux() {
echo -e ""
echo -e "Error"
echo -e "================================="
- cat "${lgsmlogdir}/.${selfname}-tmux-error.tmp" | tee -a "${lgsmlog}"
+ tee -a "${lgsmlog}" < "${lgsmlogdir}/.${selfname}-tmux-error.tmp"
# Detected error https://linuxgsm.com/support
if grep -c "Operation not permitted" "${lgsmlogdir}/.${selfname}-tmux-error.tmp"; then
diff --git a/lgsm/modules/command_stop.sh b/lgsm/modules/command_stop.sh
index d18ef7c23..564f5ed4c 100644
--- a/lgsm/modules/command_stop.sh
+++ b/lgsm/modules/command_stop.sh
@@ -7,7 +7,7 @@
commandname="STOP"
commandaction="Stopping"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
# Attempts graceful shutdown by sending 'CTRL+c'.
diff --git a/lgsm/modules/command_test_alert.sh b/lgsm/modules/command_test_alert.sh
old mode 100755
new mode 100644
index 7fe61e48a..15f481391
--- a/lgsm/modules/command_test_alert.sh
+++ b/lgsm/modules/command_test_alert.sh
@@ -7,7 +7,7 @@
commandname="TEST-ALERT"
commandaction="Sending Alert"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
fn_print_dots "${servername}"
diff --git a/lgsm/modules/command_ts3_server_pass.sh b/lgsm/modules/command_ts3_server_pass.sh
old mode 100755
new mode 100644
index be0816d15..4814ab142
--- a/lgsm/modules/command_ts3_server_pass.sh
+++ b/lgsm/modules/command_ts3_server_pass.sh
@@ -7,7 +7,7 @@
commandname="CHANGE-PASSWORD"
commandaction="Changing password"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
fn_serveradmin_password_prompt() {
diff --git a/lgsm/modules/command_update.sh b/lgsm/modules/command_update.sh
old mode 100755
new mode 100644
index ccf26322e..5993609c0
--- a/lgsm/modules/command_update.sh
+++ b/lgsm/modules/command_update.sh
@@ -7,7 +7,7 @@
commandname="UPDATE"
commandaction="Updating"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
fn_print_dots ""
@@ -31,6 +31,8 @@ elif [ "${shortname}" == "jk2" ]; then
update_jediknight2.sh
elif [ "${shortname}" == "vints" ]; then
update_vintagestory.sh
+elif [ "${shortname}" == "ut99" ]; then
+ update_ut99.sh
else
update_steamcmd.sh
fi
diff --git a/lgsm/modules/command_update_linuxgsm.sh b/lgsm/modules/command_update_linuxgsm.sh
old mode 100755
new mode 100644
index 39a441f59..3c4e6d080
--- a/lgsm/modules/command_update_linuxgsm.sh
+++ b/lgsm/modules/command_update_linuxgsm.sh
@@ -3,11 +3,11 @@
# 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.
+# Description: Deletes the modules dir to allow re-downloading of modules from GitHub.
commandname="UPDATE-LGSM"
commandaction="Updating LinuxGSM"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
check.sh
@@ -180,55 +180,57 @@ if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then
fi
fi
# Check and update modules.
-if [ -n "${functionsdir}" ]; then
- if [ -d "${functionsdir}" ]; then
- cd "${functionsdir}" || exit
- for functionfile in *; do
- # check if module exists in the repo and remove if missing.
- # commonly used if module names change.
- echo -en "checking ${remotereponame} module ${functionfile}...\c"
- github_file_url_dir="lgsm/functions"
- if [ "${remotereponame}" == "GitHub" ]; then
- curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}" 1> /dev/null
- else
- curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${functionfile}" 1> /dev/null
- fi
- if [ $? != 0 ]; then
- fn_print_error_eol_nl
- fn_script_log_error "Checking ${remotereponame} module ${functionfile}"
- echo -en "removing module ${functionfile}...\c"
- if ! rm -f "${functionfile:?}"; then
- fn_print_fail_eol_nl
- fn_script_log_fatal "Removing module ${functionfile}"
- core_exit.sh
- else
- fn_print_ok_eol_nl
- fn_script_log_pass "Removing module ${functionfile}"
- fi
- else
- # compare file
+if [ -n "${modulesdir}" ]; then
+ if [ -d "${modulesdir}" ]; then
+ (
+ cd "${modulesdir}" || exit
+ for modulefile in *; do
+ # check if module exists in the repo and remove if missing.
+ # commonly used if module names change.
+ echo -en "checking ${remotereponame} module ${modulefile}...\c"
+ github_file_url_dir="lgsm/modules"
if [ "${remotereponame}" == "GitHub" ]; then
- function_file_diff=$(diff "${functionsdir}/${functionfile}" <(curl --connect-timeout 10 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${functionfile}"))
+ curl --connect-timeout 10 -IsfL "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${modulefile}" 1> /dev/null
else
- function_file_diff=$(diff "${functionsdir}/${functionfile}" <(curl --connect-timeout 10 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${functionfile}"))
+ curl --connect-timeout 10 -IsfL "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${modulefile}" 1> /dev/null
fi
-
- # results
- if [ "${function_file_diff}" != "" ]; then
- fn_print_update_eol_nl
- fn_script_log_update "Checking ${remotereponame} module ${functionfile}"
- rm -rf "${functionsdir:?}/${functionfile}"
- fn_update_function
+ if [ $? != 0 ]; then
+ fn_print_error_eol_nl
+ fn_script_log_error "Checking ${remotereponame} module ${modulefile}"
+ echo -en "removing module ${modulefile}...\c"
+ if ! rm -f "${modulefile:?}"; then
+ fn_print_fail_eol_nl
+ fn_script_log_fatal "Removing module ${modulefile}"
+ core_exit.sh
+ else
+ fn_print_ok_eol_nl
+ fn_script_log_pass "Removing module ${modulefile}"
+ fi
else
- fn_print_ok_eol_nl
- fn_script_log_pass "Checking ${remotereponame} module ${functionfile}"
+ # compare file
+ if [ "${remotereponame}" == "GitHub" ]; then
+ module_file_diff=$(diff "${modulesdir}/${modulefile}" <(curl --connect-timeout 10 -s "https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${modulefile}"))
+ else
+ module_file_diff=$(diff "${modulesdir}/${modulefile}" <(curl --connect-timeout 10 -s "https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${modulefile}"))
+ fi
+
+ # results
+ if [ "${module_file_diff}" != "" ]; then
+ fn_print_update_eol_nl
+ fn_script_log_update "Checking ${remotereponame} module ${modulefile}"
+ rm -rf "${modulesdir:?}/${modulefile}"
+ fn_update_module
+ else
+ fn_print_ok_eol_nl
+ fn_script_log_pass "Checking ${remotereponame} module ${modulefile}"
+ fi
fi
- fi
- done
+ done
+ )
fi
fi
-fn_print_ok_nl "Updating functions"
-fn_script_log_pass "Updating functions"
+fn_print_ok_nl "Updating modules"
+fn_script_log_pass "Updating modules"
core_exit.sh
diff --git a/lgsm/modules/command_validate.sh b/lgsm/modules/command_validate.sh
old mode 100755
new mode 100644
index 15257a3e2..23ee92a26
--- a/lgsm/modules/command_validate.sh
+++ b/lgsm/modules/command_validate.sh
@@ -7,7 +7,7 @@
commandname="VALIDATE"
commandaction="Validating"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
fn_validate() {
diff --git a/lgsm/modules/command_wipe.sh b/lgsm/modules/command_wipe.sh
old mode 100755
new mode 100644
index 29577984e..193d2cd2d
--- a/lgsm/modules/command_wipe.sh
+++ b/lgsm/modules/command_wipe.sh
@@ -7,7 +7,7 @@
commandname="WIPE"
commandaction="Wiping"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
# Provides an exit code upon error.
@@ -111,7 +111,7 @@ fn_wipe_random_seed() {
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_script_log_pass "Generating new random seed (${cyan}${seed}${default})"
fn_sleep_time
fn_print_ok_eol_nl
fi
diff --git a/lgsm/modules/compress_unreal2_maps.sh b/lgsm/modules/compress_unreal2_maps.sh
old mode 100755
new mode 100644
index 0c32d3c77..f67ac7010
--- a/lgsm/modules/compress_unreal2_maps.sh
+++ b/lgsm/modules/compress_unreal2_maps.sh
@@ -7,7 +7,7 @@
commandname="MAP-COMPRESSOR"
commandaction="Compressing maps"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
check.sh
diff --git a/lgsm/modules/compress_ut99_maps.sh b/lgsm/modules/compress_ut99_maps.sh
old mode 100755
new mode 100644
index 9aa074ba9..51bbd386a
--- a/lgsm/modules/compress_ut99_maps.sh
+++ b/lgsm/modules/compress_ut99_maps.sh
@@ -7,7 +7,7 @@
commandname="MAP-COMPRESSOR"
commandaction="Compressing maps"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
check.sh
diff --git a/lgsm/modules/core_dl.sh b/lgsm/modules/core_dl.sh
old mode 100755
new mode 100644
index 2e6db690e..405e9dc6b
--- a/lgsm/modules/core_dl.sh
+++ b/lgsm/modules/core_dl.sh
@@ -14,10 +14,10 @@
# hash: Optional, set an hash sum and will compare it against the file.
#
# Downloads can be defined in code like so:
-# fn_fetch_file "${remote_fileurl}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}"
-# fn_fetch_file "http://example.com/file.tar.bz2" "/some/dir" "file.tar.bz2" "chmodx" "run" "forcedl" "10cd7353aa9d758a075c600a6dd193fd"
+# 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 "http://example.com/file.tar.bz2" "http://example.com/file2.tar.bz2" "file.tar.bz2" "file2.tar.bz2" "/some/dir" "file.tar.bz2" "chmodx" "run" "forcedl" "10cd7353aa9d758a075c600a6dd193fd"
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_dl_steamcmd() {
fn_print_start_nl "${remotelocation}"
@@ -124,7 +124,7 @@ fn_dl_steamcmd() {
echo -en "Please provide content log to LinuxGSM developers https://linuxgsm.com/steamcmd-error"
fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Unknown error occured"
fi
- elif [ "${exitcode}" != "0" ]; then
+ elif [ "${exitcode}" != 0 ]; then
fn_print_error2_nl "${commandaction} ${selfname}: ${remotelocation}: Exit code: ${exitcode}"
fn_script_log_error "${commandaction} ${selfname}: ${remotelocation}: Exit code: ${exitcode}"
else
@@ -146,12 +146,12 @@ fn_clear_tmp() {
if [ -d "${tmpdir}" ]; then
rm -rf "${tmpdir:?}/"*
local exitcode=$?
- if [ "${exitcode}" == 0 ]; then
- fn_print_ok_eol_nl
- fn_script_log_pass "clearing LinuxGSM tmp directory"
- else
+ if [ "${exitcode}" != 0 ]; then
fn_print_error_eol_nl
fn_script_log_error "clearing LinuxGSM tmp directory"
+ else
+ fn_print_ok_eol_nl
+ fn_script_log_pass "clearing LinuxGSM tmp directory"
fi
fi
}
@@ -202,31 +202,56 @@ fn_dl_hash() {
# Extracts bzip2, gzip or zip files.
# Extracts can be defined in code like so:
-# fn_dl_extract "${local_filedir}" "${local_filename}" "${extractdir}"
+# fn_dl_extract "${local_filedir}" "${local_filename}" "${extractdest}" "${extractsrc}"
# fn_dl_extract "/home/gameserver/lgsm/tmp" "file.tar.bz2" "/home/gamserver/serverfiles"
fn_dl_extract() {
local_filedir="${1}"
local_filename="${2}"
- extractdir="${3}"
+ extractdest="${3}"
+ extractsrc="${4}"
# Extracts archives.
echo -en "extracting ${local_filename}..."
- mime=$(file -b --mime-type "${local_filedir}/${local_filename}")
- if [ ! -d "${extractdir}" ]; then
- mkdir "${extractdir}"
+
+ if [ ! -d "${extractdest}" ]; then
+ mkdir "${extractdest}"
+ fi
+ if [ ! -f "${local_filedir}/${local_filename}" ]; then
+ fn_print_fail_eol_nl
+ echo -en "file ${local_filedir}/${local_filename} not found"
+ fn_script_log_fatal "Extracting ${local_filename}"
+ fn_script_log_fatal "File ${local_filedir}/${local_filename} not found"
+ core_exit.sh
fi
+ mime=$(file -b --mime-type "${local_filedir}/${local_filename}")
if [ "${mime}" == "application/gzip" ] || [ "${mime}" == "application/x-gzip" ]; then
- extractcmd=$(tar -zxf "${local_filedir}/${local_filename}" -C "${extractdir}")
+ if [ -n "${extractsrc}" ]; then
+ extractcmd=$(tar -zxf "${local_filedir}/${local_filename}" -C "${extractdest}" --strip-components=1 "${extractsrc}")
+ else
+ extractcmd=$(tar -zxf "${local_filedir}/${local_filename}" -C "${extractdest}")
+ fi
elif [ "${mime}" == "application/x-bzip2" ]; then
- extractcmd=$(tar -jxf "${local_filedir}/${local_filename}" -C "${extractdir}")
+ if [ -n "${extractsrc}" ]; then
+ extractcmd=$(tar -jxf "${local_filedir}/${local_filename}" -C "${extractdest}" --strip-components=1 "${extractsrc}")
+ else
+ extractcmd=$(tar -jxf "${local_filedir}/${local_filename}" -C "${extractdest}")
+ fi
elif [ "${mime}" == "application/x-xz" ]; then
- extractcmd=$(tar -xf "${local_filedir}/${local_filename}" -C "${extractdir}")
+ if [ -n "${extractsrc}" ]; then
+ extractcmd=$(tar -Jxf "${local_filedir}/${local_filename}" -C "${extractdest}" --strip-components=1 "${extractsrc}")
+ else
+ extractcmd=$(tar -Jxf "${local_filedir}/${local_filename}" -C "${extractdest}")
+ fi
elif [ "${mime}" == "application/zip" ]; then
- extractcmd=$(unzip -qo -d "${extractdir}" "${local_filedir}/${local_filename}")
+ if [ -n "${extractsrc}" ]; then
+ extractcmd=$(unzip -qoj -d "${extractdest}" "${local_filedir}/${local_filename}" "${extractsrc}"/*)
+ else
+ extractcmd=$(unzip -qo -d "${extractdest}" "${local_filedir}/${local_filename}")
+ fi
fi
local exitcode=$?
if [ "${exitcode}" != 0 ]; then
fn_print_fail_eol_nl
- fn_script_log_fatal "Extracting download"
+ fn_script_log_fatal "Extracting ${local_filename}"
if [ -f "${lgsmlog}" ]; then
echo -e "${extractcmd}" >> "${lgsmlog}"
fi
@@ -234,7 +259,7 @@ fn_dl_extract() {
core_exit.sh
else
fn_print_ok_eol_nl
- fn_script_log_pass "Extracting download"
+ fn_script_log_pass "Extracting ${local_filename}"
fi
}
@@ -358,23 +383,27 @@ fn_fetch_file() {
fi
# Trap will remove part downloaded files if canceled.
trap fn_fetch_trap INT
- # Larger files show a progress bar.
- if [ "${local_filename##*.}" == "bz2" ] || [ "${local_filename##*.}" == "gz" ] || [ "${local_filename##*.}" == "zip" ] || [ "${local_filename##*.}" == "jar" ] || [ "${local_filename##*.}" == "xz" ]; then
+ curlcmd=(curl --connect-timeout 10 --fail -L -o "${local_filedir}/${local_filename}" --retry 2)
+
+ # if is large file show progress, else be silent
+ local exitcode=""
+ large_files=("bz2" "gz" "zip" "jar" "xz")
+ if grep -qE "(^|\s)${local_filename##*.}(\s|$)" <<< "${large_files[@]}"; then
echo -en "downloading ${local_filename}..."
fn_sleep_time
echo -en "\033[1K"
- curlcmd=$(curl --connect-timeout 10 --progress-bar --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}")
- echo -en "downloading ${local_filename}..."
+ "${curlcmd[@]}" --progress-bar "${fileurl}" 2>&1
+ exitcode="$?"
else
echo -en "fetching ${fileurl_name} ${local_filename}...\c"
- curlcmd=$(curl --connect-timeout 10 -s --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}" 2>&1)
+ "${curlcmd[@]}" --silent --show-error "${fileurl}" 2>&1
+ exitcode="$?"
fi
- local exitcode=$?
# Download will fail if downloads a html file.
if [ -f "${local_filedir}/${local_filename}" ]; then
- if [ -n "$(head "${local_filedir}/${local_filename}" | grep "DOCTYPE")" ]; then
- rm -f "${local_filedir:?}/${local_filename:?}"
+ if head -n 1 "${local_filedir}/${local_filename}" | grep -q "DOCTYPE"; then
+ rm "${local_filedir:?}/${local_filename:?}"
local exitcode=2
fi
fi
@@ -384,22 +413,21 @@ fn_fetch_file() {
if [ ${counter} -ge 2 ]; then
fn_print_fail_eol_nl
if [ -f "${lgsmlog}" ]; then
- fn_script_log_fatal "Downloading ${local_filename}"
+ fn_script_log_fatal "Downloading ${local_filename}..."
fn_script_log_fatal "${fileurl}"
fi
core_exit.sh
else
fn_print_error_eol_nl
if [ -f "${lgsmlog}" ]; then
- fn_script_log_error "Downloading ${local_filename}"
+ fn_script_log_error "Downloading ${local_filename}..."
fn_script_log_error "${fileurl}"
fi
fi
else
- fn_print_ok_eol
- echo -en "\033[2K\\r"
+ fn_print_ok_eol_nl
if [ -f "${lgsmlog}" ]; then
- fn_script_log_pass "Downloading ${local_filename}"
+ fn_script_log_pass "Downloading ${local_filename}..."
fi
# Make file executable if chmodx is set.
@@ -425,11 +453,13 @@ fn_fetch_file() {
fi
}
-# GitHub file download functions.
+# GitHub file download modules.
# Used to simplify downloading specific files from GitHub.
-# github_fileurl_dir: the directory of the file in the GitHub: lgsm/functions
-# github_fileurl_name: the filename of the file to download from GitHub: core_messages.sh
+# github_file_url_dir: the directory of the file in the GitHub: lgsm/modules
+# github_file_url_name: the filename of the file to download from GitHub: core_messages.sh
+# github_file_url_dir: the directory of the file in the GitHub: lgsm/modules
+# github_file_url_name: the filename of the file to download from GitHub: core_messages.sh
# githuburl: the full GitHub url
# remote_fileurl: The URL of the file: http://example.com/dl/File.tar.bz2
@@ -442,58 +472,58 @@ fn_fetch_file() {
# Fetches files from the Git repo.
fn_fetch_file_github() {
- github_fileurl_dir="${1}"
- github_fileurl_name="${2}"
+ github_file_url_dir="${1}"
+ github_file_url_name="${2}"
# For legacy versions - code can be removed at a future date
if [ "${legacymode}" == "1" ]; then
- remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
- remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
+ remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
+ remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
# If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork.
- elif [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then
- remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}"
- remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}"
+ elif [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then
+ remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}"
+ remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}"
else
- remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
- remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
+ remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
+ remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
fi
remote_fileurl_name="GitHub"
remote_fileurl_backup_name="Bitbucket"
local_filedir="${3}"
- local_filename="${github_fileurl_name}"
+ local_filename="${github_file_url_name}"
chmodx="${4:-0}"
run="${5:-0}"
forcedl="${6:-0}"
hash="${7:-0}"
- # Passes vars to the file download function.
+ # Passes vars to the file download module.
fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}"
}
fn_check_file_github() {
- github_fileurl_dir="${1}"
- github_fileurl_name="${2}"
- if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then
- remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}"
- remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}"
+ github_file_url_dir="${1}"
+ github_file_url_name="${2}"
+ if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then
+ remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}"
+ remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}"
else
- remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
- remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
+ remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
+ remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
fi
remote_fileurl_name="GitHub"
remote_fileurl_backup_name="Bitbucket"
- fn_check_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${github_fileurl_name}"
+ fn_check_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${github_file_url_name}"
}
# Fetches config files from the Git repo.
fn_fetch_config() {
- github_fileurl_dir="${1}"
- github_fileurl_name="${2}"
+ github_file_url_dir="${1}"
+ github_file_url_name="${2}"
# If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork.
- if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then
- remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}"
- remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}"
+ if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then
+ remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}"
+ remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}"
else
- remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
- remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
+ remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
+ remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
fi
remote_fileurl_name="GitHub"
remote_fileurl_backup_name="Bitbucket"
@@ -503,55 +533,55 @@ fn_fetch_config() {
run="norun"
forcedl="noforce"
hash="nohash"
- # Passes vars to the file download function.
+ # Passes vars to the file download module.
fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}"
}
# Fetches modules from the Git repo during first download.
-fn_fetch_function() {
- github_fileurl_dir="lgsm/functions"
- github_fileurl_name="${functionfile}"
+fn_fetch_module() {
+ github_file_url_dir="lgsm/modules"
+ github_file_url_name="${modulefile}"
# If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork.
- if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then
- remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}"
- remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}"
+ if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then
+ remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}"
+ remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}"
else
- remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
- remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
+ remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
+ remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
fi
remote_fileurl_name="GitHub"
remote_fileurl_backup_name="Bitbucket"
- local_filedir="${functionsdir}"
- local_filename="${github_fileurl_name}"
+ local_filedir="${modulesdir}"
+ local_filename="${github_file_url_name}"
chmodx="chmodx"
run="run"
forcedl="noforce"
hash="nohash"
- # Passes vars to the file download function.
+ # Passes vars to the file download module.
fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}"
}
# Fetches modules from the Git repo during update-lgsm.
-fn_update_function() {
- github_fileurl_dir="lgsm/functions"
- github_fileurl_name="${functionfile}"
+fn_update_module() {
+ github_file_url_dir="lgsm/modules"
+ github_file_url_name="${modulefile}"
# If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork.
- if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then
- remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_fileurl_dir}/${github_fileurl_name}"
- remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_fileurl_dir}/${github_fileurl_name}"
+ if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then
+ remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}"
+ remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}"
else
- remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
- remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_fileurl_dir}/${github_fileurl_name}"
+ remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
+ remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${githubbranch}/${github_file_url_dir}/${github_file_url_name}"
fi
remote_fileurl_name="GitHub"
remote_fileurl_backup_name="Bitbucket"
- local_filedir="${functionsdir}"
- local_filename="${github_fileurl_name}"
+ local_filedir="${modulesdir}"
+ local_filename="${github_file_url_name}"
chmodx="chmodx"
run="norun"
forcedl="noforce"
hash="nohash"
- # Passes vars to the file download function.
+ # Passes vars to the file download module.
fn_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${hash}"
}
@@ -590,7 +620,7 @@ fn_dl_latest_release_github() {
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.
+ # Fetch file from the remote location from the existing module to the ${tmpdir} for now.
fn_fetch_file "${githubreleasedownloadlink}" "" "${githubreleasefilename}" "" "${githubreleasedownloadpath}" "${githubreleasefilename}"
fi
fi
diff --git a/lgsm/modules/core_exit.sh b/lgsm/modules/core_exit.sh
old mode 100755
new mode 100644
index 2d2f5b8fa..a8686c2a8
--- a/lgsm/modules/core_exit.sh
+++ b/lgsm/modules/core_exit.sh
@@ -5,14 +5,14 @@
# Website: https://linuxgsm.com
# Description: Handles exiting of LinuxGSM by running and reporting an exit code.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_exit_dev_debug() {
if [ -f "${rootdir}/.dev-debug" ]; then
echo -e ""
- echo -e "${functionselfname} exiting with code: ${exitcode}"
+ echo -e "${moduleselfname} exiting with code: ${exitcode}"
if [ -f "${rootdir}/dev-debug.log" ]; then
- grep "functionfile=" "${rootdir}/dev-debug.log" | sed 's/functionfile=//g' > "${rootdir}/dev-debug-function-order.log"
+ grep "modulefile=" "${rootdir}/dev-debug.log" | sed 's/modulefile=//g' > "${rootdir}/dev-debug-module-order.log"
fi
fi
}
@@ -25,17 +25,17 @@ fi
if [ "${exitbypass}" ]; then
unset exitbypass
-elif [ "${exitcode}" ] && [ "${exitcode}" != "0" ]; then
+elif [ "${exitcode}" != "0" ]; then
# List LinuxGSM version in logs
fn_script_log_info "LinuxGSM version: ${version}"
if [ "${exitcode}" == "1" ]; then
- fn_script_log_fatal "${functionselfname} exiting with code: ${exitcode}"
+ fn_script_log_fatal "${moduleselfname} exiting with code: ${exitcode}"
elif [ "${exitcode}" == "2" ]; then
- fn_script_log_error "${functionselfname} exiting with code: ${exitcode}"
+ fn_script_log_error "${moduleselfname} exiting with code: ${exitcode}"
elif [ "${exitcode}" == "3" ]; then
- fn_script_log_warn "${functionselfname} exiting with code: ${exitcode}"
+ fn_script_log_warn "${moduleselfname} exiting with code: ${exitcode}"
else
- fn_script_log_warn "${functionselfname} exiting with code: ${exitcode}"
+ fn_script_log_warn "${moduleselfname} exiting with code: ${exitcode}"
fi
fn_exit_dev_debug
# remove trap.
@@ -44,7 +44,7 @@ elif [ "${exitcode}" ] && [ "${exitcode}" != "0" ]; then
elif [ "${exitcode}" ] && [ "${exitcode}" == "0" ]; then
# List LinuxGSM version in logs
fn_script_log_info "LinuxGSM version: ${version}"
- fn_script_log_pass "${functionselfname} exiting with code: ${exitcode}"
+ fn_script_log_pass "${moduleselfname} exiting with code: ${exitcode}"
fn_exit_dev_debug
# remove trap.
trap - INT
@@ -53,7 +53,7 @@ else
# List LinuxGSM version in logs
fn_script_log_info "LinuxGSM version: ${version}"
fn_print_error "No exit code set"
- fn_script_log_pass "${functionselfname} exiting with code: NOT SET"
+ fn_script_log_pass "${moduleselfname} exiting with code: NOT SET"
fn_exit_dev_debug
# remove trap.
trap - INT
diff --git a/lgsm/modules/core_functions.sh b/lgsm/modules/core_functions.sh
old mode 100755
new mode 100644
index bca5debf9..07a2ebd09
--- a/lgsm/modules/core_functions.sh
+++ b/lgsm/modules/core_functions.sh
@@ -6,9 +6,9 @@
# 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]}")")"
+module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
-modulesversion="v23.1.0"
+modulesversion="v23.2.0"
# Core
@@ -86,7 +86,7 @@ command_details.sh() {
fn_fetch_function
}
-command_donate.sh() {
+command_sponsor.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_function
}
@@ -680,6 +680,11 @@ update_vintagestory.sh() {
fn_fetch_function
}
+update_ut99.sh() {
+ functionfile="${FUNCNAME[0]}"
+ fn_fetch_function
+}
+
fn_update_functions.sh() {
functionfile="${FUNCNAME[0]}"
fn_fetch_function
diff --git a/lgsm/modules/core_getopt.sh b/lgsm/modules/core_getopt.sh
old mode 100755
new mode 100644
index fdd66ab3f..222ad0cf8
--- a/lgsm/modules/core_getopt.sh
+++ b/lgsm/modules/core_getopt.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: getopt arguments.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
### Define all commands here.
## User commands | Trigger commands | Description
@@ -18,11 +18,11 @@ cmd_restart=("r;restart" "command_restart.sh" "Restart the server.")
cmd_details=("dt;details" "command_details.sh" "Display server information.")
cmd_postdetails=("pd;postdetails" "command_postdetails.sh" "Post details to termbin.com (removing passwords).")
cmd_backup=("b;backup" "command_backup.sh" "Create backup archives of the server.")
-cmd_update_linuxgsm=("ul;update-lgsm;uf;update-functions" "command_update_linuxgsm.sh" "Check and apply any LinuxGSM updates.")
+cmd_update_linuxgsm=("ul;update-lgsm;uf;update-modules" "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_sponso=("s;sponsor" "command_sponsor.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.")
@@ -54,7 +54,7 @@ cmd_dev_detect_deps=("dd;detect-deps" "command_dev_detect_deps.sh" "Detect requi
cmd_dev_detect_glibc=("dg;detect-glibc" "command_dev_detect_glibc.sh" "Detect required glibc.")
cmd_dev_detect_ldd=("dl;detect-ldd" "command_dev_detect_ldd.sh" "Detect required dynamic dependencies.")
cmd_dev_query_raw=("qr;query-raw" "command_dev_query_raw.sh" "The raw output of gamedig and gsquery.")
-cmd_dev_clear_functions=("cf;clear-functions" "command_dev_clear_functions.sh" "Delete the contents of the functions dir.")
+cmd_dev_clear_modules=("cf;clear-modules" "command_dev_clear_modules.sh" "Delete the contents of the modules dir.")
### Set specific opt here.
@@ -65,8 +65,8 @@ currentopt+=("${cmd_update_linuxgsm[@]}")
# Exclude noupdate games here.
if [ "${shortname}" == "jk2" ] || [ "${engine}" != "idtech3" ]; then
- if [ "${shortname}" != "bf1942" ] && [ "${shortname}" != "bfv" ] && [ "${engine}" != "idtech2" ] && [ "${engine}" != "iw2.0" ] && [ "${engine}" != "iw3.0" ] && [ "${engine}" != "quake" ] && [ "${shortname}" != "samp" ] && [ "${shortname}" != "ut2k4" ] && [ "${shortname}" != "ut99" ]; then
- currentopt+=("${cmd_update[@]}")
+ if [ "${shortname}" != "bf1942" ] && [ "${shortname}" != "bfv" ] && [ "${engine}" != "idtech2" ] && [ "${engine}" != "iw2.0" ] && [ "${engine}" != "iw3.0" ] && [ "${engine}" != "quake" ] && [ "${shortname}" != "samp" ] && [ "${shortname}" != "ut2k4" ]; then
+ currentopt+=("${cmd_update[@]}" "${cmd_check_update[@]}")
# force update for SteamCMD or Multi Theft Auto only.
if [ "${appid}" ] || [ "${shortname}" == "mta" ]; then
currentopt+=("${cmd_force_update[@]}")
@@ -75,8 +75,8 @@ if [ "${shortname}" == "jk2" ] || [ "${engine}" != "idtech3" ]; then
fi
# Validate and check-update command.
-if [ "${appid}" ] || [ "${shortname}" == "ts3" ]; then
- currentopt+=("${cmd_validate[@]}" "${cmd_check_update[@]}")
+if [ "${appid}" ]; then
+ currentopt+=("${cmd_validate[@]}")
fi
# Backup.
@@ -102,10 +102,12 @@ if [ "${shortname}" == "ts3" ]; then
currentopt+=("${cmd_change_password[@]}")
fi
-# Unreal exclusive.
+# Rust exclusive.
if [ "${shortname}" == "rust" ]; then
currentopt+=("${cmd_fullwipe[@]}" "${cmd_mapwipe[@]}")
fi
+
+# Unreal exclusive.
if [ "${engine}" == "unreal2" ]; then
if [ "${shortname}" == "ut2k4" ]; then
currentopt+=("${cmd_install_cdkey[@]}" "${cmd_map_compressor_u2[@]}")
@@ -143,11 +145,11 @@ currentopt+=("${cmd_install[@]}" "${cmd_auto_install[@]}")
## Developer commands.
currentopt+=("${cmd_dev_debug[@]}")
if [ -f ".dev-debug" ]; then
- currentopt+=("${cmd_dev_detect_deps[@]}" "${cmd_dev_detect_glibc[@]}" "${cmd_dev_detect_ldd[@]}" "${cmd_dev_query_raw[@]}" "${cmd_dev_clear_functions[@]}")
+ currentopt+=("${cmd_dev_detect_deps[@]}" "${cmd_dev_detect_glibc[@]}" "${cmd_dev_detect_ldd[@]}" "${cmd_dev_query_raw[@]}" "${cmd_dev_clear_modules[@]}")
fi
-## Donate.
-currentopt+=("${cmd_donate[@]}")
+## Sponsor.
+currentopt+=("${cmd_sponsor[@]}")
### Build list of available commands.
optcommands=()
diff --git a/lgsm/modules/core_github.sh b/lgsm/modules/core_github.sh
index 0462e65bf..228fe1078 100644
--- a/lgsm/modules/core_github.sh
+++ b/lgsm/modules/core_github.sh
@@ -1,11 +1,11 @@
#!/bin/bash
-# LinuxGSM core_github.sh function
+# LinuxGSM core_github.sh module
# Author: Daniel Gibbs
# Contributors: http://linuxgsm.com/contrib
# Website: https://linuxgsm.com
-# Description: core function file for updates via github
+# Description: core module file for updates via github
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
github_api="https://api.github.com"
diff --git a/lgsm/modules/core_legacy.sh b/lgsm/modules/core_legacy.sh
old mode 100755
new mode 100644
index f9aa51455..2ed942abd
--- a/lgsm/modules/core_legacy.sh
+++ b/lgsm/modules/core_legacy.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Code for backwards compatability with older versions of LinuxGSM.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# This is to help the transition to v20.3.0 and above
legacy_versions_array=(v20.2.1 v20.2.0 v20.1.5 v20.1.4 v20.1.3 v20.1.2 v20.1.1 v20.1.0 v19.12.5 v19.12.4 v19.12.3 v19.12.2 v19.12.1 v19.12.0)
@@ -78,6 +78,15 @@ if [ -z "${wsstartmap}" ]; then
fi
fi
+# Added as part of migrating functions dir to modules dir.
+# Will remove functions dir if files in modules dir older than 14 days
+functionsdir="${lgsmdir}/modules"
+if [ -d "${lgsmdir}/functions" ]; then
+ if [ "$(find "${lgsmdir}/modules"/ -type f -mtime +"14" | wc -l)" -ne "0" ]; then
+ rm -rf "${lgsmdir:?}/functions"
+ fi
+fi
+
fn_parms() {
fn_reload_startparameters
parms="${startparameters}"
diff --git a/lgsm/modules/core_logs.sh b/lgsm/modules/core_logs.sh
old mode 100755
new mode 100644
index 1f0e27540..8057f30f7
--- a/lgsm/modules/core_logs.sh
+++ b/lgsm/modules/core_logs.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Acts as a log rotator, removing old logs.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Check if logfile variable and file exist, create logfile if it doesn't exist.
if [ "${consolelog}" ]; then
diff --git a/lgsm/modules/core_messages.sh b/lgsm/modules/core_messages.sh
old mode 100755
new mode 100644
index 5362dd3d3..6d3ca9a25
--- a/lgsm/modules/core_messages.sh
+++ b/lgsm/modules/core_messages.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Defines on-screen messages such as [ OK ] and how script logs look.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# nl: new line: message is following by a new line.
# eol: end of line: message is placed at the end of the current line.
diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh
new file mode 100644
index 000000000..8eb843b5a
--- /dev/null
+++ b/lgsm/modules/core_modules.sh
@@ -0,0 +1,816 @@
+#!/bin/bash
+# LinuxGSM core_modules.sh module
+# Author: Daniel Gibbs
+# Contributors: http://linuxgsm.com/contrib
+# Website: https://linuxgsm.com
+# Description: Defines all modules to allow download and execution of modules using fn_fetch_module.
+# This module is called first before any other module. Without this file other modules will not load.
+
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+
+modulesversion="v23.2.0"
+
+# Core
+
+core_dl.sh() {
+ modulefile="${FUNCNAME[0]}"
+ if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then
+ fn_fetch_core_dl "lgsm/modules" "core_dl.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash"
+ else
+ fn_bootstrap_fetch_file_github "lgsm/modules" "core_dl.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash"
+ fi
+}
+
+core_messages.sh() {
+ modulefile="${FUNCNAME[0]}"
+ if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then
+ fn_fetch_core_dl "lgsm/modules" "core_messages.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash"
+ else
+ fn_bootstrap_fetch_file_github "lgsm/modules" "core_messages.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash"
+ fi
+}
+
+core_legacy.sh() {
+ modulefile="${FUNCNAME[0]}"
+ if [ "$(type fn_fetch_core_dl 2> /dev/null)" ]; then
+ fn_fetch_core_dl "lgsm/modules" "core_legacy.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash"
+ else
+ fn_bootstrap_fetch_file_github "lgsm/modules" "core_legacy.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash"
+ fi
+}
+
+core_exit.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+core_getopt.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+core_trap.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+core_steamcmd.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+core_github.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+# Commands
+
+command_backup.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_console.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_debug.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_details.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_sponsor.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_postdetails.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_test_alert.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_monitor.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_start.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_stop.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_validate.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_install.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_install_resources_mta.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_squad_license.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_mods_install.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_mods_update.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_mods_remove.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_fastdl.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_ts3_server_pass.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_restart.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_skeleton.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_wipe.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_send.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+# Checks
+
+check.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+check_config.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+check_deps.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+check_executable.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+check_glibc.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+check_ip.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+check_last_update.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+check_logs.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+check_permissions.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+check_root.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+check_status.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+check_steamcmd.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+check_system_dir.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+check_system_requirements.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+check_tmuxception.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+check_version.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+# Compress
+
+compress_unreal2_maps.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+compress_ut99_maps.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+# Mods
+
+mods_list.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+mods_core.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+# Dev
+
+command_dev_clear_modules.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_dev_debug.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_dev_detect_deps.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_dev_detect_glibc.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_dev_detect_ldd.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_dev_query_raw.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+# Fix
+
+fix.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_ark.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_av.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_arma3.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_armar.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_bt.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_bo.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_cmw.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_csgo.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_dst.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_hw.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_ins.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_kf.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_kf2.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_lo.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_mcb.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_mta.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_nmrih.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_onset.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_ro.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_rust.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_rw.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_sfc.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_st.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_steamcmd.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_terraria.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_tf2.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_ut3.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_rust.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_samp.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_sdtd.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_sof2.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_squad.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_ts3.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_ut2k4.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_ut.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_unt.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_vh.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_wurm.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fix_zmr.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+# Info
+
+info_distro.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+info_game.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+info_messages.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+info_stats.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+# Alert
+
+alert.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+alert_discord.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+alert_email.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+alert_ifttt.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+alert_mailgun.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+alert_pushbullet.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+alert_pushover.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+alert_gotify.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+alert_telegram.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+alert_rocketchat.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+alert_slack.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+# Logs
+
+core_logs.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+# Query
+
+query_gamedig.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+# Update
+
+command_update_modules.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_update_linuxgsm.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_update.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+command_check_update.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+update_ts3.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+update_minecraft.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+update_minecraft_bedrock.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+update_papermc.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+update_mta.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+update_factorio.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+update_jediknight2.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+update_steamcmd.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+update_vintagestory.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+update_ut99.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+fn_update_modules.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+#
+## Installer modules
+#
+
+fn_autoinstall() {
+ autoinstall=1
+ command_install.sh
+}
+
+install_complete.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_config.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_factorio_save.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_dst_token.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_eula.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_gsquery.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_gslt.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_header.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_logs.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_retry.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_server_dir.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+install_server_files.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_stats.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_steamcmd.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_ts3.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_ts3db.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_ut2k4.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_dl_ut2k4.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+install_ut2k4_key.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_fetch_module
+}
+
+# Calls code required for legacy servers
+core_legacy.sh
+
+# Creates tmp dir if missing
+if [ ! -d "${tmpdir}" ]; then
+ mkdir -p "${tmpdir}"
+fi
+
+# Creates lock dir if missing
+if [ ! -d "${lockdir}" ]; then
+ mkdir -p "${lockdir}"
+fi
+
+# Calls on-screen messages (bootstrap)
+core_messages.sh
+
+#Calls file downloader (bootstrap)
+core_dl.sh
+
+# Calls the global Ctrl-C trap
+core_trap.sh
diff --git a/lgsm/modules/core_steamcmd.sh b/lgsm/modules/core_steamcmd.sh
old mode 100755
new mode 100644
index 9d54cfde1..78c30f60a
--- a/lgsm/modules/core_steamcmd.sh
+++ b/lgsm/modules/core_steamcmd.sh
@@ -3,9 +3,9 @@
# Author: Daniel Gibbs
# Contributors: http://linuxgsm.com/contrib
# Website: https://linuxgsm.com
-# Description: Core functions for SteamCMD
+# Description: Core modules for SteamCMD
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_install_steamcmd() {
if [ "${shortname}" == "ark" ] && [ "${installsteamcmd}" == "1" ]; then
@@ -14,7 +14,7 @@ fn_install_steamcmd() {
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_fetch_file "http://media.steampowered.com/client/steamcmd_linux.tar.gz" "" "" "" "${tmpdir}" "steamcmd_linux.tar.gz" "nochmodx" "norun" "noforce" "nohash"
fn_dl_extract "${tmpdir}" "steamcmd_linux.tar.gz" "${steamcmddir}"
chmod +x "${steamcmddir}/steamcmd.sh"
}
@@ -157,9 +157,9 @@ fn_update_steamcmd_localbuild() {
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"
+ if [ -z "${localbuild}" ]; then
+ fn_print_fail "Checking local build: ${remotelocation}: missing local build info"
+ fn_script_log_fatal "Missing local build info"
core_exit.sh
else
fn_print_ok "Checking local build: ${remotelocation}"
@@ -168,7 +168,7 @@ fn_update_steamcmd_localbuild() {
}
fn_update_steamcmd_remotebuild() {
- # Gets remote build info.
+ # Get remote build info.
if [ -d "${steamcmddir}" ]; then
cd "${steamcmddir}" || exit
fi
@@ -179,12 +179,12 @@ fn_update_steamcmd_remotebuild() {
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:]')
+ remotebuildversion=$(${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
+ # Checks if remotebuildversion variable has been set.
+ if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then
fn_print_fail "Checking remote build: ${remotelocation}"
fn_script_log_fatal "Checking remote build"
core_exit.sh
@@ -194,7 +194,7 @@ fn_update_steamcmd_remotebuild() {
fi
else
# Checks if remotebuild variable has been set.
- if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then
+ if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then
fn_print_failure "Unable to get remote build"
fn_script_log_fatal "Unable to get remote build"
core_exit.sh
@@ -204,12 +204,12 @@ fn_update_steamcmd_remotebuild() {
fn_update_steamcmd_compare() {
fn_print_dots "Checking for update: ${remotelocation}"
- if [ "${localbuild}" != "${remotebuild}" ]; then
+ if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${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}"
+ echo -e "* Remote build: ${green}${remotebuildversion}${default}"
if [ -n "${branch}" ]; then
echo -e "* Branch: ${branch}"
fi
@@ -220,14 +220,14 @@ fn_update_steamcmd_compare() {
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 "Remote build: ${remotebuildversion}"
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}"
+ fn_script_log_info "${localbuild} > ${remotebuildversion}"
if [ "${commandname}" == "UPDATE" ]; then
unset updateonstart
@@ -246,8 +246,8 @@ fn_update_steamcmd_compare() {
exitbypass=1
command_start.sh
fn_firstcommand_reset
- unset exitbypass
fi
+ unset exitbypass
date +%s > "${lockdir}/lastupdate.lock"
alert="update"
elif [ "${commandname}" == "CHECK-UPDATE" ]; then
@@ -259,7 +259,7 @@ fn_update_steamcmd_compare() {
echo -en "\n"
echo -e "No update available"
echo -e "* Local build: ${green}${localbuild}${default}"
- echo -e "* Remote build: ${green}${remotebuild}${default}"
+ echo -e "* Remote build: ${green}${remotebuildversion}${default}"
if [ -n "${branch}" ]; then
echo -e "* Branch: ${branch}"
fi
@@ -270,7 +270,7 @@ fn_update_steamcmd_compare() {
echo -en "\n"
fn_script_log_info "No update available"
fn_script_log_info "Local build: ${localbuild}"
- fn_script_log_info "Remote build: ${remotebuild}"
+ fn_script_log_info "Remote build: ${remotebuildversion}"
if [ -n "${branch}" ]; then
fn_script_log_info "Branch: ${branch}"
fi
diff --git a/lgsm/modules/core_trap.sh b/lgsm/modules/core_trap.sh
old mode 100755
new mode 100644
index ae2b79470..ea6fce869
--- a/lgsm/modules/core_trap.sh
+++ b/lgsm/modules/core_trap.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Handles CTRL-C trap to give an exit code.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_exit_trap() {
if [ -z "${exitcode}" ]; then
diff --git a/lgsm/modules/fix.sh b/lgsm/modules/fix.sh
old mode 100755
new mode 100644
index b0e9396cc..322091f5a
--- a/lgsm/modules/fix.sh
+++ b/lgsm/modules/fix.sh
@@ -3,10 +3,10 @@
# 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.
+# Description: Overall module for managing fixes.
+# Runs modules that will fix an issue.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Messages that are displayed for some fixes.
fn_fix_msg_start() {
@@ -17,7 +17,7 @@ fn_fix_msg_start() {
fn_fix_msg_start_nl() {
fn_print_dots "Applying ${fixname} fix: ${gamename}"
- fn_print_info "Applying ${fixname} fix: ${gamename}"
+ fn_print_info_nl "Applying ${fixname} fix: ${gamename}"
fn_script_log_info "Applying ${fixname} fix: ${gamename}"
}
@@ -31,101 +31,58 @@ fn_fix_msg_end() {
fi
}
+fn_exists_fix() {
+ local short="${1:?}"
+
+ if [ "$(type -t "fix_${short}.sh")" == 'function' ]; then
+ return 0
+ else
+ return 1
+ fi
+}
+
+fn_apply_fix() {
+ local phase_message="${1:?}"
+ local short="${2:?}"
+
+ if fn_exists_fix "${short}"; then
+ "fix_${short}.sh"
+ else
+ fn_print_error_nl "${shortname} is marked to apply pre start fix but there is no fix registered"
+ fi
+}
+
+apply_pre_start_fix=(arma3 armar ark av bt bo csgo cmw dst hw ins nmrih onset rust rw sdtd sfc sof2 squad st tf2 terraria ts3 mcb mta unt vh wurm zmr)
+apply_post_install_fix=(av kf kf2 lo ro samp ut2k4 ut ut3)
+
+# validate registered fixes for safe development
+for fix in "${apply_pre_start_fix[@]}" "${apply_post_install_fix[@]}"; do
+ if ! fn_exists_fix "${fix}"; then
+ fn_print_fail_nl "fix_${fix}.sh is registered but doesn't exist. Typo or did you miss to modify core_functions.sh?"
+ exitcode=1
+ core_exit.sh
+ fi
+done
+
# Fixes that are run on start.
if [ "${commandname}" != "INSTALL" ] && [ -z "${fixbypass}" ]; then
if [ "${appid}" ]; then
fix_steamcmd.sh
fi
- if [ "${shortname}" == "arma3" ]; then
- fix_arma3.sh
- elif [ "${shortname}" == "armar" ]; then
- fix_armar.sh
- elif [ "${shortname}" == "ark" ]; then
- fix_ark.sh
- elif [ "${shortname}" == "av" ]; then
- fix_av.sh
- elif [ "${shortname}" == "bt" ]; then
- fix_bt.sh
- elif [ "${shortname}" == "bo" ]; then
- fix_bo.sh
- elif [ "${shortname}" == "csgo" ]; then
- fix_csgo.sh
- elif [ "${shortname}" == "cmw" ]; then
- fix_cmw.sh
- elif [ "${shortname}" == "dst" ]; then
- fix_dst.sh
- elif [ "${shortname}" == "hw" ]; then
- fix_hw.sh
- elif [ "${shortname}" == "ins" ]; then
- fix_ins.sh
- elif [ "${shortname}" == "nmrih" ]; then
- fix_nmrih.sh
- elif [ "${shortname}" == "onset" ]; then
- fix_onset.sh
- elif [ "${shortname}" == "rust" ]; then
- fix_rust.sh
- elif [ "${shortname}" == "rw" ]; then
- fix_rw.sh
- elif [ "${shortname}" == "sdtd" ]; then
- fix_sdtd.sh
- elif [ "${shortname}" == "sfc" ]; then
- fix_sfc.sh
- elif [ "${shortname}" == "sof2" ]; then
- fix_sof2.sh
- elif [ "${shortname}" == "squad" ]; then
- fix_squad.sh
- elif [ "${shortname}" == "st" ]; then
- fix_st.sh
- elif [ "${shortname}" == "tf2" ]; then
- fix_tf2.sh
- elif [ "${shortname}" == "terraria" ]; then
- fix_terraria.sh
- elif [ "${shortname}" == "ts3" ]; then
- fix_ts3.sh
- elif [ "${shortname}" == "mcb" ]; then
- fix_mcb.sh
- elif [ "${shortname}" == "mta" ]; 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
- fix_zmr.sh
+ if grep -qEe "(^|\s)${shortname}(\s|$)" <<< "${apply_pre_start_fix[@]}"; then
+ fn_apply_fix "pre start" "${shortname}"
fi
fi
# Fixes that are run on install only.
if [ "${commandname}" == "INSTALL" ]; then
- if [ "${shortname}" == "av" ] || [ "${shortname}" == "cmw" ] || [ "${shortname}" == "kf" ] || [ "${shortname}" == "kf2" ] || [ "${shortname}" == "lo" ] || [ "${shortname}" == "onset" ] || [ "${shortname}" == "ro" ] || [ "${shortname}" == "samp" ] || [ "${shortname}" == "ut2k4" ] || [ "${shortname}" == "ut" ] || [ "${shortname}" == "ut3" ]; then
+ if grep -qEe "(^|\s)${shortname}(\s|$)" <<< "${apply_post_install_fix[@]}"; then
echo -e ""
echo -e "${lightyellow}Applying Post-Install Fixes${default}"
echo -e "================================="
fn_sleep_time
postinstall=1
- if [ "${shortname}" == "av" ]; then
- fix_av.sh
- elif [ "${shortname}" == "kf" ]; then
- fix_kf.sh
- elif [ "${shortname}" == "kf2" ]; then
- fix_kf2.sh
- elif [ "${shortname}" == "lo" ]; then
- fix_lo.sh
- elif [ "${shortname}" == "ro" ]; then
- fix_ro.sh
- elif [ "${shortname}" == "samp" ]; then
- fix_samp.sh
- elif [ "${shortname}" == "ut2k4" ]; then
- fix_ut2k4.sh
- elif [ "${shortname}" == "ut" ]; then
- fix_ut.sh
- elif [ "${shortname}" == "ut3" ]; then
- fix_ut3.sh
- else
- fn_print_information_nl "No fixes required."
- fi
+ fn_apply_fix "post install" "${shortname}"
fi
fi
diff --git a/lgsm/modules/fix_ark.sh b/lgsm/modules/fix_ark.sh
old mode 100755
new mode 100644
index f8e0447e3..7ca0e60f8
--- a/lgsm/modules/fix_ark.sh
+++ b/lgsm/modules/fix_ark.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with ARK: Survival Evolved.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# removes mulitple appworkshop_346110.acf if found.
steamappsfilewc="$(find "${HOME}" -name appworkshop_346110.acf | wc -l)"
diff --git a/lgsm/modules/fix_arma3.sh b/lgsm/modules/fix_arma3.sh
old mode 100755
new mode 100644
index bbf14c9d2..d41738377
--- a/lgsm/modules/fix_arma3.sh
+++ b/lgsm/modules/fix_arma3.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves an issue with ARMA3.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Fixes: 20150 Segmentation fault (core dumped) error.
if [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Arma 3" ] || [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Arma 3 - Other Profiles" ]; then
diff --git a/lgsm/modules/fix_armar.sh b/lgsm/modules/fix_armar.sh
index 9db42f51a..2a56daf41 100755
--- a/lgsm/modules/fix_armar.sh
+++ b/lgsm/modules/fix_armar.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves an issue with Arma Reforger.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Fixes: Profile directory doesn't exist.
# Issue Link: https://feedback.bistudio.com/T164845
diff --git a/lgsm/modules/fix_av.sh b/lgsm/modules/fix_av.sh
old mode 100755
new mode 100644
index a61a8be65..c8fcdcfc5
--- a/lgsm/modules/fix_av.sh
+++ b/lgsm/modules/fix_av.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves startup issue with Avorion
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/linux64"
diff --git a/lgsm/modules/fix_bo.sh b/lgsm/modules/fix_bo.sh
index 453691874..3e09a880f 100644
--- a/lgsm/modules/fix_bo.sh
+++ b/lgsm/modules/fix_bo.sh
@@ -5,6 +5,6 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Ballistic Overkill.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/BODS_Data/Plugins/x86_64"
diff --git a/lgsm/modules/fix_bt.sh b/lgsm/modules/fix_bt.sh
index 07fd61ce5..bb26155d8 100755
--- a/lgsm/modules/fix_bt.sh
+++ b/lgsm/modules/fix_bt.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves an issue with Barotrauma.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Fixes: Missing user data directory error.
if [ ! -d "${XDG_DATA_HOME:="${HOME}/.local/share"}/Daedalic Entertainment GmbH/Barotrauma" ]; then
diff --git a/lgsm/modules/fix_cmw.sh b/lgsm/modules/fix_cmw.sh
old mode 100755
new mode 100644
index 192f483e8..6b8f1caa8
--- a/lgsm/modules/fix_cmw.sh
+++ b/lgsm/modules/fix_cmw.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves the issue of the not starting server on linux
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ ! -f "${executabledir}/steam_appid.txt" ]; then
fixname="steam_appid.txt"
diff --git a/lgsm/modules/fix_csgo.sh b/lgsm/modules/fix_csgo.sh
old mode 100755
new mode 100644
index a393f2fd9..eb8cc9560
--- a/lgsm/modules/fix_csgo.sh
+++ b/lgsm/modules/fix_csgo.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with CS:GO.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Fixes: server not always creating steam_appid.txt file.
if [ ! -f "${serverfiles}/steam_appid.txt" ]; then
diff --git a/lgsm/modules/fix_dst.sh b/lgsm/modules/fix_dst.sh
old mode 100755
new mode 100644
index e30507dc9..e1f07dcb6
--- a/lgsm/modules/fix_dst.sh
+++ b/lgsm/modules/fix_dst.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Don't Starve Together.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Fixes: ./dontstarve_dedicated_server_nullrenderer: ./lib32/libcurl-gnutls.so.4: no version information available (required by ./dontstarve_dedicated_server_nullrenderer).
# Issue only occures on CentOS as libcurl-gnutls.so.4 is called libcurl.so.4 on CentOS.
diff --git a/lgsm/modules/fix_hw.sh b/lgsm/modules/fix_hw.sh
old mode 100755
new mode 100644
index af06924db..6a92a5c04
--- a/lgsm/modules/fix_hw.sh
+++ b/lgsm/modules/fix_hw.sh
@@ -5,6 +5,6 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Hurtworld.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/Hurtworld_Data/Plugins/x86_64"
diff --git a/lgsm/modules/fix_ins.sh b/lgsm/modules/fix_ins.sh
old mode 100755
new mode 100644
index 21a979c4c..21bea123a
--- a/lgsm/modules/fix_ins.sh
+++ b/lgsm/modules/fix_ins.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Insurgency.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Fixes: ./srcds_linux: error while loading shared libraries: libtier0.so: cannot open shared object file: No such file or directory.
diff --git a/lgsm/modules/fix_kf.sh b/lgsm/modules/fix_kf.sh
old mode 100755
new mode 100644
index e749a2d27..3cfb8fd84
--- a/lgsm/modules/fix_kf.sh
+++ b/lgsm/modules/fix_kf.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Killing Floor.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
echo -e "Applying WebAdmin ROOst.css fix."
echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13"
diff --git a/lgsm/modules/fix_kf2.sh b/lgsm/modules/fix_kf2.sh
old mode 100755
new mode 100644
index b680a9937..7be311b4f
--- a/lgsm/modules/fix_kf2.sh
+++ b/lgsm/modules/fix_kf2.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Killing Floor 2.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
startparameters="\"${defaultmap}?Game=KFGameContent.KFGameInfo_VersusSurvival\""
diff --git a/lgsm/modules/fix_lo.sh b/lgsm/modules/fix_lo.sh
index eec2ebd36..a04248867 100644
--- a/lgsm/modules/fix_lo.sh
+++ b/lgsm/modules/fix_lo.sh
@@ -1,10 +1,10 @@
#!/bin/bash
-# LinuxGSM fix_lo.sh function
+# LinuxGSM fix_lo.sh module
# Author: Daniel Gibbs
# Website: https://linuxgsm.com
# Description: Resolves installation issue with Last Oasis
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
appidfile=${executabledir}/steam_appid.txt
if [ ! -f "${appidfile}" ]; then
diff --git a/lgsm/modules/fix_mcb.sh b/lgsm/modules/fix_mcb.sh
old mode 100755
new mode 100644
index 4768a40cf..828225e72
--- a/lgsm/modules/fix_mcb.sh
+++ b/lgsm/modules/fix_mcb.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves possible startup issue with Minecraft Bedrock.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# official docs state that the server should be started with: LD_LIBRARY_PATH=. ./bedrock_server
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}"
diff --git a/lgsm/modules/fix_mta.sh b/lgsm/modules/fix_mta.sh
old mode 100755
new mode 100644
index 2c92e8d12..21292d7f3
--- a/lgsm/modules/fix_mta.sh
+++ b/lgsm/modules/fix_mta.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Installs the libmysqlclient for database functions on the server.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ ! -f "${lgsmdir}/lib/libmysqlclient.so.16" ]; then
fixname="libmysqlclient16"
diff --git a/lgsm/modules/fix_nmrih.sh b/lgsm/modules/fix_nmrih.sh
old mode 100755
new mode 100644
index 4bb70c6f9..83a5ad412
--- a/lgsm/modules/fix_nmrih.sh
+++ b/lgsm/modules/fix_nmrih.sh
@@ -6,7 +6,7 @@
# Description: Create symlinks for renamed No More Room In Hell serverfiles.
# Solution from Steam Community post: https://steamcommunity.com/app/224260/discussions/2/1732089092441769414/
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
ln -s "${serverfiles}/bin/vphysics_srv.so" "${serverfiles}/bin/vphysics.so"
ln -s "${serverfiles}/bin/studiorender_srv.so" "${serverfiles}/bin/studiorender.so"
diff --git a/lgsm/modules/fix_onset.sh b/lgsm/modules/fix_onset.sh
old mode 100755
new mode 100644
index e4183999d..7d644ef7b
--- a/lgsm/modules/fix_onset.sh
+++ b/lgsm/modules/fix_onset.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Onset.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}"
diff --git a/lgsm/modules/fix_ro.sh b/lgsm/modules/fix_ro.sh
old mode 100755
new mode 100644
index 895c7c2da..5dd1d3fb8
--- a/lgsm/modules/fix_ro.sh
+++ b/lgsm/modules/fix_ro.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Red Orchestra.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
echo -e "Applying WebAdmin ROOst.css fix."
echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13"
diff --git a/lgsm/modules/fix_rust.sh b/lgsm/modules/fix_rust.sh
old mode 100755
new mode 100644
index 4488377a3..0699a8f00
--- a/lgsm/modules/fix_rust.sh
+++ b/lgsm/modules/fix_rust.sh
@@ -5,17 +5,28 @@
# Website: https://linuxgsm.com
# Description: Resolves startup issue with Rust.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(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 [ -z "${seed}" ] || [ "${seed}" == "0" ]; then
if [ ! -f "${datadir}/${selfname}-seed.txt" ]; then
shuf -i 1-2147483647 -n 1 > "${datadir}/${selfname}-seed.txt"
+ seed="$(cat "${datadir}/${selfname}-seed.txt")"
+ fn_print_info_nl "Generating new random seed (${cyan}${seed}${default})"
+ fn_script_log_pass "Generating new random seed (${cyan}${seed}${default})"
fi
seed="$(cat "${datadir}/${selfname}-seed.txt")"
randomseed=1
fi
+
+# If Carbon mod is installed, run enviroment.sh
+if [ -f "${serverfiles}/carbon/tools/environment.sh" ]; then
+ fn_print_info_nl "Running Carbon environment.sh"
+ fn_script_log_info "Running Carbon environment.sh"
+ # shellcheck source=/dev/null
+ source "${serverfiles}/carbon/tools/environment.sh"
+fi
diff --git a/lgsm/modules/fix_rw.sh b/lgsm/modules/fix_rw.sh
old mode 100755
new mode 100644
index aef41a703..2cc631122
--- a/lgsm/modules/fix_rw.sh
+++ b/lgsm/modules/fix_rw.sh
@@ -5,6 +5,6 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Rising World.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/linux64"
diff --git a/lgsm/modules/fix_samp.sh b/lgsm/modules/fix_samp.sh
index a88bf154f..146fc37af 100644
--- a/lgsm/modules/fix_samp.sh
+++ b/lgsm/modules/fix_samp.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves issue that the default rcon password is not changed
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ -f "${servercfgfullpath}" ]; then
# check if default password is set "changeme"
diff --git a/lgsm/modules/fix_sdtd.sh b/lgsm/modules/fix_sdtd.sh
old mode 100755
new mode 100644
index e93db7970..e46f7db8c
--- a/lgsm/modules/fix_sdtd.sh
+++ b/lgsm/modules/fix_sdtd.sh
@@ -5,6 +5,6 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with 7 Days to Die.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}/7DaysToDieServer_Data/Plugins/x86_64"
diff --git a/lgsm/modules/fix_sfc.sh b/lgsm/modules/fix_sfc.sh
old mode 100755
new mode 100644
index 51b95b9d5..891b71803
--- a/lgsm/modules/fix_sfc.sh
+++ b/lgsm/modules/fix_sfc.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Source Forts Classic.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ ! -f "${serverfiles}/bin/datacache.so" ]; then
ln -s "${serverfiles}/bin/datacache_srv.so" "${serverfiles}/bin/datacache.so"
diff --git a/lgsm/modules/fix_sof2.sh b/lgsm/modules/fix_sof2.sh
old mode 100755
new mode 100644
index 002f42952..43d943cb1
--- a/lgsm/modules/fix_sof2.sh
+++ b/lgsm/modules/fix_sof2.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Soldier of Fortune 2.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(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/modules/fix_squad.sh b/lgsm/modules/fix_squad.sh
index 7d5929b5d..e7162d310 100644
--- a/lgsm/modules/fix_squad.sh
+++ b/lgsm/modules/fix_squad.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Squad.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(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}"
diff --git a/lgsm/modules/fix_st.sh b/lgsm/modules/fix_st.sh
index b9fb5b084..44066bb37 100644
--- a/lgsm/modules/fix_st.sh
+++ b/lgsm/modules/fix_st.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves startup issue with Stationeers.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Fixes: [Raknet] Server Shutting Down (Shutting Down).
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/rocketstation_DedicatedServer_Data/Plugins/x86_64"
diff --git a/lgsm/modules/fix_steamcmd.sh b/lgsm/modules/fix_steamcmd.sh
old mode 100755
new mode 100644
index 9644208dc..44980ab32
--- a/lgsm/modules/fix_steamcmd.sh
+++ b/lgsm/modules/fix_steamcmd.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues related to SteamCMD.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# function to simplify the steamclient.so fix
# example
diff --git a/lgsm/modules/fix_terraria.sh b/lgsm/modules/fix_terraria.sh
old mode 100755
new mode 100644
index 7758fdad9..7e5aa67e2
--- a/lgsm/modules/fix_terraria.sh
+++ b/lgsm/modules/fix_terraria.sh
@@ -5,6 +5,6 @@
# Website: https://linuxgsm.com
# Description: Resolves an issue with Terraria.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
export TERM=xterm
diff --git a/lgsm/modules/fix_tf2.sh b/lgsm/modules/fix_tf2.sh
old mode 100755
new mode 100644
index 77e41a969..085542eed
--- a/lgsm/modules/fix_tf2.sh
+++ b/lgsm/modules/fix_tf2.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Team Fortress 2.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Fixes: Team Fortress 2 Segmentation fault for Red-Hat Distros #2062.
if [ -f "/etc/redhat-release" ] && [ ! -f "${serverfiles}/bin/libcurl-gnutls.so.4" ]; then
diff --git a/lgsm/modules/fix_ts3.sh b/lgsm/modules/fix_ts3.sh
old mode 100755
new mode 100644
index 7c7387cb6..9eb728f48
--- a/lgsm/modules/fix_ts3.sh
+++ b/lgsm/modules/fix_ts3.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Teamspeak 3.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Fixes: makes libmariadb2 available #1924.
if [ ! -f "${serverfiles}/libmariadb.so.2" ]; then
diff --git a/lgsm/modules/fix_unt.sh b/lgsm/modules/fix_unt.sh
old mode 100755
new mode 100644
index eae2e6313..77253bd85
--- a/lgsm/modules/fix_unt.sh
+++ b/lgsm/modules/fix_unt.sh
@@ -5,6 +5,6 @@
# Website: https://linuxgsm.com
# Description: Resolves startup issue with Unturned.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${serverfiles}:${serverfiles}/Unturned_Headless_Data/Plugins/x86_64"
diff --git a/lgsm/modules/fix_ut.sh b/lgsm/modules/fix_ut.sh
old mode 100755
new mode 100644
index 2e6686a8d..aa958e86d
--- a/lgsm/modules/fix_ut.sh
+++ b/lgsm/modules/fix_ut.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Unreal Tournament.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
#Set Binary Executable
echo -e "chmod +x ${executabledir}/${executable}"
diff --git a/lgsm/modules/fix_ut2k4.sh b/lgsm/modules/fix_ut2k4.sh
old mode 100755
new mode 100644
index 49610e4b6..0a3b89b33
--- a/lgsm/modules/fix_ut2k4.sh
+++ b/lgsm/modules/fix_ut2k4.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Unreal Tournament 2004.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
echo -e "applying WebAdmin ut2003.css fix."
echo -e "http://forums.tripwireinteractive.com/showpost.php?p=585435&postcount=13"
diff --git a/lgsm/modules/fix_ut3.sh b/lgsm/modules/fix_ut3.sh
old mode 100755
new mode 100644
index 6bd26a53a..4958537f2
--- a/lgsm/modules/fix_ut3.sh
+++ b/lgsm/modules/fix_ut3.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Unreal Tournament 3.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(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}"
diff --git a/lgsm/modules/fix_vh.sh b/lgsm/modules/fix_vh.sh
old mode 100755
new mode 100644
index a90c5d0b0..984907747
--- a/lgsm/modules/fix_vh.sh
+++ b/lgsm/modules/fix_vh.sh
@@ -1,10 +1,10 @@
#!/bin/bash
-# LinuxGSM fix_rust.sh function
+# LinuxGSM fix_rust.sh module
# Author: Alasdair Haig
# Website: https://linuxgsm.com
# Description: Resolves startup issue with Valheim
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
export LD_LIBRARY_PATH=./linux64:$LD_LIBRARY_PATH
diff --git a/lgsm/modules/fix_wurm.sh b/lgsm/modules/fix_wurm.sh
old mode 100755
new mode 100644
index aba24d382..1536df2e7
--- a/lgsm/modules/fix_wurm.sh
+++ b/lgsm/modules/fix_wurm.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Wurm Unlimited.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# First run requires start with no parms.
# After first run new dirs are created.
diff --git a/lgsm/modules/fix_zmr.sh b/lgsm/modules/fix_zmr.sh
old mode 100755
new mode 100644
index 491c36638..56f055fc3
--- a/lgsm/modules/fix_zmr.sh
+++ b/lgsm/modules/fix_zmr.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Resolves various issues with Zombie Master: Reborn.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ ! -f "${serverfiles}/bin/datacache.so" ]; then
ln -s "${serverfiles}/bin/datacache_srv.so" "${serverfiles}/bin/datacache.so"
diff --git a/lgsm/modules/info_distro.sh b/lgsm/modules/info_distro.sh
old mode 100755
new mode 100644
index f29e621d5..411a50458
--- a/lgsm/modules/info_distro.sh
+++ b/lgsm/modules/info_distro.sh
@@ -6,7 +6,7 @@
# 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.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
### Game Server pid
if [ "${status}" == "1" ]; then
diff --git a/lgsm/modules/info_messages.sh b/lgsm/modules/info_messages.sh
old mode 100755
new mode 100644
index 881499a68..4dbbdcd96
--- a/lgsm/modules/info_messages.sh
+++ b/lgsm/modules/info_messages.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Defines server info messages for details and alerts.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Separator is different for details.
fn_messages_separator() {
@@ -339,7 +339,7 @@ fn_info_message_gameserver() {
fi
fi
- # Reserved Slots
+ # Reverved Slots
if [ -n "${statspassword}" ]; then
echo -e "${lightblue}Reserved Slots:\t${default}${reservedslots}"
fi
@@ -386,19 +386,9 @@ fn_info_message_gameserver() {
echo -e "${lightblue}Game mode:\t${default}${gamemode}"
fi
- # World name
- if [ -n "${}" ]; then
- echo -e "${lightblue}World name:\t${default}${}"
- fi
-
- # World type
- if [ -n "${worldtype}" ]; then
- echo -e "${lightblue}World type:\t${default}${worldtype}"
- fi
-
- # World Size
- if [ -n "${worldsize}" ]; then
- echo -e "${lightblue}World size:\t${default}${worldsize}m"
+ # Game world
+ if [ -n "${gameworld}" ]; then
+ echo -e "${lightblue}Game world:\t${default}${gameworld}"
fi
# Tick rate
@@ -461,6 +451,11 @@ fn_info_message_gameserver() {
echo -e "${lightblue}Salt:\t${default}${salt}"
fi
+ # World Size (Rust)
+ if [ -n "${worldsize}" ]; then
+ echo -e "${lightblue}World size:\t${default}${worldsize}m"
+ fi
+
# Random map rotation mode (Squad and Post Scriptum)
if [ -n "${randommap}" ]; then
echo -e "${lightblue}Map rotation:\t${default}${randommap}"
@@ -778,7 +773,7 @@ fn_port() {
portname="${1}"
porttype="${2}"
portprotocol="${3}"
- echo -e "${portname}\t${!porttype}\t${portprotocol}\t$(echo "${ssinfo}" | grep ${portprotocol} | grep ${!porttype} | wc -l)"
+ echo -e "${portname}\t${!porttype}\t${portprotocol}\t$(echo "${ssinfo}" | grep "${portprotocol}" | grep -c "${!porttype}")"
fi
}
@@ -827,8 +822,7 @@ fn_info_message_av() {
{
fn_port "header"
fn_port "Game" port udp
- fn_port "Game" port tcp
- fn_port "Query" queryport tcp
+ fn_port "Query" queryport udp
fn_port "Steam Master" steammasterport udp
fn_port "Steam Query" steamqueryport udp
fn_port "RCON" rconport tcp
@@ -1224,6 +1218,7 @@ fn_info_message_pvr() {
{
fn_port "header"
fn_port "Game" port udp
+ fn_port "Game" port tcp
fn_port "Game+400" port401 udp
fn_port "Query" queryport tcp
} | column -s $'\t' -t
diff --git a/lgsm/modules/info_stats.sh b/lgsm/modules/info_stats.sh
old mode 100755
new mode 100644
index 0589770f6..2afe3338d
--- a/lgsm/modules/info_stats.sh
+++ b/lgsm/modules/info_stats.sh
@@ -6,7 +6,7 @@
# Description: Collect optional Stats sent to LinuxGSM project.
# Uses Google analytics.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
info_distro.sh
diff --git a/lgsm/modules/install_complete.sh b/lgsm/modules/install_complete.sh
old mode 100755
new mode 100644
index ad258b224..58189a4be
--- a/lgsm/modules/install_complete.sh
+++ b/lgsm/modules/install_complete.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Prints installation completion message and hints.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
echo -e ""
echo -e "================================="
diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh
old mode 100755
new mode 100644
index eb6a39a8a..699a919c3
--- a/lgsm/modules/install_config.sh
+++ b/lgsm/modules/install_config.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Creates default server configs.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Checks if server cfg dir exists, creates it if it doesn't.
fn_check_cfgdir() {
@@ -64,7 +64,7 @@ fn_default_config_local() {
# PASSWORD to random password
fn_set_config_vars() {
if [ -f "${servercfgfullpath}" ]; then
- random=$(echo $RANDOM | md5sum | head -c 8)
+ random=$(tr -dc A-Za-z0-9_ < /dev/urandom | head -c 8 | xargs)
servername="LinuxGSM"
rconpass="admin${random}"
echo -e "changing hostname."
diff --git a/lgsm/modules/install_dst_token.sh b/lgsm/modules/install_dst_token.sh
old mode 100755
new mode 100644
index 50bc7ed97..43db58fab
--- a/lgsm/modules/install_dst_token.sh
+++ b/lgsm/modules/install_dst_token.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Configures Don't Starve Together cluster with given token.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
echo -e ""
echo -e "${lightyellow}Enter ${gamename} Cluster Token${default}"
diff --git a/lgsm/modules/install_eula.sh b/lgsm/modules/install_eula.sh
old mode 100755
new mode 100644
index 5b8b4db5d..d70ca7d31
--- a/lgsm/modules/install_eula.sh
+++ b/lgsm/modules/install_eula.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Gets user to accept the EULA.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ "${shortname}" == "ts3" ]; then
eulaurl="https://www.teamspeak.com/en/privacy-and-terms"
@@ -31,11 +31,9 @@ if [ -z "${autoinstall}" ]; then
fi
elif [ "${commandname}" == "START" ]; then
fn_print_info "By continuing you are indicating your agreement to the EULA."
- echo -e ""
sleep 5
else
echo -e "By using auto-install you are indicating your agreement to the EULA."
- echo -e ""
sleep 5
fi
diff --git a/lgsm/modules/install_factorio_save.sh b/lgsm/modules/install_factorio_save.sh
old mode 100755
new mode 100644
index f5fdb8a04..c86ee2f37
--- a/lgsm/modules/install_factorio_save.sh
+++ b/lgsm/modules/install_factorio_save.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Creates the initial save file for Factorio.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
echo -e ""
echo -e "${lightyellow}Creating initial Factorio savefile${default}"
diff --git a/lgsm/modules/install_gslt.sh b/lgsm/modules/install_gslt.sh
old mode 100755
new mode 100644
index 1ae1ef3b0..e2224276f
--- a/lgsm/modules/install_gslt.sh
+++ b/lgsm/modules/install_gslt.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Configures GSLT.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
echo -e ""
echo -e "${lightyellow}Game Server Login Token${default}"
diff --git a/lgsm/modules/install_header.sh b/lgsm/modules/install_header.sh
old mode 100755
new mode 100644
index 4cf067f8f..b52e116e7
--- a/lgsm/modules/install_header.sh
+++ b/lgsm/modules/install_header.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Prints installation header.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
clear
fn_print_ascii_logo
diff --git a/lgsm/modules/install_logs.sh b/lgsm/modules/install_logs.sh
old mode 100755
new mode 100644
index 80a55fb94..31a408506
--- a/lgsm/modules/install_logs.sh
+++ b/lgsm/modules/install_logs.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Creates log directories.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if [ "${checklogs}" != "1" ]; then
echo -e ""
diff --git a/lgsm/modules/install_mta_resources.sh b/lgsm/modules/install_mta_resources.sh
old mode 100755
new mode 100644
index 011ad9b71..bafdbdbf1
--- a/lgsm/modules/install_mta_resources.sh
+++ b/lgsm/modules/install_mta_resources.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# 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]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_print_information_nl "${gamename} will not function without resources!"
echo -e " * install default resources using ./${selfname} install-default-resources"
diff --git a/lgsm/modules/install_retry.sh b/lgsm/modules/install_retry.sh
old mode 100755
new mode 100644
index a36b4fb38..1fc4bf36a
--- a/lgsm/modules/install_retry.sh
+++ b/lgsm/modules/install_retry.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Asks for installation retry after failure.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
if fn_prompt_yn "Retry install?" Y; then
command_install.sh
diff --git a/lgsm/modules/install_server_dir.sh b/lgsm/modules/install_server_dir.sh
old mode 100755
new mode 100644
index 658f4360c..08e83dce6
--- a/lgsm/modules/install_server_dir.sh
+++ b/lgsm/modules/install_server_dir.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Creates the server directory.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
echo -e ""
echo -e "${lightyellow}Server Directory${default}"
diff --git a/lgsm/modules/install_server_files.sh b/lgsm/modules/install_server_files.sh
old mode 100755
new mode 100644
index c98986685..717030df4
--- a/lgsm/modules/install_server_files.sh
+++ b/lgsm/modules/install_server_files.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Installs server files.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_install_server_files() {
if [ "${shortname}" == "ahl" ]; then
@@ -197,6 +197,9 @@ fn_install_server_files() {
chmodx="nochmodx" run="norun"
force="noforce"
md5="0188ae86dbc9376f11ae3032dba2d665"
+ else
+ fn_print_fail_nl "Installing ${gamename} Server failed, missing default configuration"
+ fn_script_log_fatal "Installing ${gamename} Server failed, missing default configuration"
fi
fn_fetch_file "${remote_fileurl}" "" "" "" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}"
fn_dl_extract "${local_filedir}" "${local_filename}" "${serverfiles}"
@@ -209,7 +212,8 @@ fn_sleep_time
if [ "${appid}" ]; then
remotelocation="SteamCMD"
- fn_dl_steamcmd
+ forceupdate=1
+ update_steamcmd.sh
fi
if [ "${shortname}" == "ts3" ]; then
@@ -233,6 +237,9 @@ elif [ "${shortname}" == "jk2" ]; then
update_jediknight2.sh
elif [ "${shortname}" == "vints" ]; then
update_vintagestory.sh
+elif [ "${shortname}" == "ut99" ]; then
+ fn_install_server_files
+ update_ut99.sh
elif [ -z "${appid}" ] || [ "${shortname}" == "ahl" ] || [ "${shortname}" == "bb" ] || [ "${shortname}" == "ns" ] || [ "${shortname}" == "sfc" ] || [ "${shortname}" == "ts" ] || [ "${shortname}" == "vs" ] || [ "${shortname}" == "zmr" ]; then
if [ "${shortname}" == "ut" ]; then
install_eula.sh
diff --git a/lgsm/modules/install_squad_license.sh b/lgsm/modules/install_squad_license.sh
old mode 100755
new mode 100644
index 181646e85..58053e134
--- a/lgsm/modules/install_squad_license.sh
+++ b/lgsm/modules/install_squad_license.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Configures the Squad server's license.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
echo -e ""
echo -e "${lightyellow}Squad Server License${default}"
diff --git a/lgsm/modules/install_stats.sh b/lgsm/modules/install_stats.sh
old mode 100755
new mode 100644
index d3b45b40b..8c65c007c
--- a/lgsm/modules/install_stats.sh
+++ b/lgsm/modules/install_stats.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Enabled LinuxGSM Stats.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
echo -e ""
echo -e "${lightyellow}LinuxGSM Stats${default}"
diff --git a/lgsm/modules/install_steamcmd.sh b/lgsm/modules/install_steamcmd.sh
old mode 100755
new mode 100644
index b1e64a42c..8eeb2de53
--- a/lgsm/modules/install_steamcmd.sh
+++ b/lgsm/modules/install_steamcmd.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Downloads SteamCMD on install.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
echo -e ""
echo -e "${lightyellow}Installing SteamCMD${default}"
diff --git a/lgsm/modules/install_ts3db.sh b/lgsm/modules/install_ts3db.sh
old mode 100755
new mode 100644
index e394296de..703f9b645
--- a/lgsm/modules/install_ts3db.sh
+++ b/lgsm/modules/install_ts3db.sh
@@ -5,20 +5,20 @@
# Website: https://linuxgsm.com
# Description: Installs the database server MariaDB for TeamSpeak 3.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_install_ts3db_mariadb() {
if [ ! -f "${serverfiles}/libts3db_mariadb.so" ]; then
echo -e "copying libmariadb.so.2...\c"
cp "${serverfiles}/redist/libmariadb.so.2" "${serverfiles}"
local exitcode=$?
- if [ "${exitcode}" == "0" ]; then
- fn_print_ok_eol_nl
- fn_script_log_pass "copying libmariadb.so.2"
- else
+ if [ "${exitcode}" != "0" ]; then
fn_print_fail_eol_nl
fn_script_log_fatal "copying libmariadb.so.2"
core_exit.sh
+ else
+ fn_print_ok_eol_nl
+ fn_script_log_pass "copying libmariadb.so.2"
fi
fi
@@ -64,7 +64,7 @@ fi
install_eula.sh
echo -e ""
-echo -e "${lightyellow}Getting privilege key${default}"
+echo -e "${lightyellow}Getting Privilege Key${default}"
echo -e "================================="
fn_sleep_time
fn_print_information_nl "Save these details for later."
diff --git a/lgsm/modules/install_ut2k4_key.sh b/lgsm/modules/install_ut2k4_key.sh
old mode 100755
new mode 100644
index 124052d05..c09c4590c
--- a/lgsm/modules/install_ut2k4_key.sh
+++ b/lgsm/modules/install_ut2k4_key.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Activates ut2k4 server with given key.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
echo -e ""
echo -e "${lightyellow}Enter ${gamename} CD Key${default}"
diff --git a/lgsm/modules/mods_core.sh b/lgsm/modules/mods_core.sh
old mode 100755
new mode 100644
index e79ceb9ad..2078ae167
--- a/lgsm/modules/mods_core.sh
+++ b/lgsm/modules/mods_core.sh
@@ -3,14 +3,14 @@
# Author: Daniel Gibbs
# Contributors: http://linuxgsm.com/contrib
# Website: https://linuxgsm.com
-# Description: Core functions for mods list/install/update/remove
+# Description: Core modules for mods list/install/update/remove
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Files and Directories.
modsdir="${lgsmdir}/mods"
modstmpdir="${modsdir}/tmp"
-extractdir="${modstmpdir}/extract"
+extractdest="${modstmpdir}/extract"
modsinstalledlist="installed-mods.txt"
modsinstalledlistfullpath="${modsdir}/${modsinstalledlist}"
@@ -25,10 +25,10 @@ fn_mod_install_files() {
fn_script_log_fatal "An issue occurred downloading ${modprettyname}"
core_exit.sh
fi
- if [ ! -d "${extractdir}" ]; then
- mkdir -p "${extractdir}"
+ if [ ! -d "${extractdest}" ]; then
+ mkdir -p "${extractdest}"
fi
- fn_dl_extract "${modstmpdir}" "${modfilename}" "${extractdir}"
+ fn_dl_extract "${modstmpdir}" "${modfilename}" "${extractdest}"
}
# Convert mod files to lowercase if needed.
@@ -39,9 +39,9 @@ fn_mod_lowercase() {
fn_sleep_time
fn_script_log_info "Converting ${modprettyname} files to lowercase"
# Total files and directories for the mod, to output to the user
- fileswc=$(find "${extractdir}" | wc -l)
+ fileswc=$(find "${extractdest}" | wc -l)
# Total uppercase files and directories for the mod, to output to the user
- filesupperwc=$(find "${extractdir}" -name '*[[:upper:]]*' | wc -l)
+ filesupperwc=$(find "${extractdest}" -name '*[[:upper:]]*' | wc -l)
fn_script_log_info "Found ${filesupperwc} uppercase files out of ${fileswc}, converting"
echo -en "Found ${filesupperwc} uppercase files out of ${fileswc}, converting..."
# Convert files and directories starting from the deepest to prevent issues (-depth argument)
@@ -63,7 +63,7 @@ fn_mod_lowercase() {
core_exit.sh
fi
fi
- done < <(find "${extractdir}" -depth -name '*[[:upper:]]*')
+ done < <(find "${extractdest}" -depth -name '*[[:upper:]]*')
fn_print_ok_eol_nl
fi
}
@@ -73,7 +73,7 @@ fn_mod_create_filelist() {
echo -en "building ${modcommand}-files.txt..."
fn_sleep_time
# ${modsdir}/${modcommand}-files.txt.
- find "${extractdir}" -mindepth 1 -printf '%P\n' > "${modsdir}/${modcommand}-files.txt"
+ find "${extractdest}" -mindepth 1 -printf '%P\n' > "${modsdir}/${modcommand}-files.txt"
local exitcode=$?
if [ "${exitcode}" != 0 ]; then
fn_print_fail_eol_nl
@@ -93,7 +93,7 @@ fn_mod_create_filelist() {
fn_mod_copy_destination() {
echo -en "copying ${modprettyname} to ${modinstalldir}..."
fn_sleep_time
- cp -Rf "${extractdir}/." "${modinstalldir}/"
+ cp -Rf "${extractdest}/." "${modinstalldir}/"
local exitcode=$?
if [ "${exitcode}" != 0 ]; then
fn_print_fail_eol_nl
diff --git a/lgsm/modules/mods_list.sh b/lgsm/modules/mods_list.sh
old mode 100755
new mode 100644
index f78686759..e093124e9
--- a/lgsm/modules/mods_list.sh
+++ b/lgsm/modules/mods_list.sh
@@ -8,7 +8,7 @@
# Usage: Then add this array to the mods_global_array.
# Usage: If needed, you can scrape the download URL first.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# Get a proper URL for mods that don't provide a good one (optional)
fn_script_log_info "Retrieving latest mods URLs"
@@ -88,6 +88,10 @@ movementapilatestversion=$(curl --connect-timeout 10 -s https://api.github.com/r
movementapilatestfile="MovementAPI-v${movementapilatestversion}.zip"
movementapilatestlink="https://github.com/danzayau/MovementAPI/releases/download/${movementapilatestversion}/${movementapilatestfile}"
+# Rust
+carbonrustapilatestfile="Carbon.Linux.Release.tar.gz"
+carbonrustlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/CarbonCommunity/Carbon.Core/releases/tags/production_build | jq -r '.assets[]|select(.name == "Carbon.Linux.Release.tar.gz") | .browser_download_url')
+
# Oxide
oxiderustlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/OxideMod/Oxide.Rust/releases/latest | jq -r '.assets[]|select(.browser_download_url | contains("linux")) | .browser_download_url')
oxidehurtworldlatestlink=$(curl --connect-timeout 10 -sL https://api.github.com/repos/OxideMod/Oxide.Hurtworld/releases/latest | jq -r '.assets[].browser_download_url')
@@ -187,6 +191,9 @@ mod_info_darkrp=(MOD "darkrp" "DarkRP" "https://github.com/FPtje/DarkRP/archive/
mod_info_darkrpmodification=(MOD "darkrpmodification" "DarkRP Modification" "https://github.com/FPtje/darkrpmodification/archive/master.zip" "darkrpmodification-master.zip" "0" "LowercaseOff" "${systemdir}/addons" "NOUPDATE" "ENGINES" "Garry's Mod;" "NOTGAMES" "http://darkrp.com" "Customize DarkRP settings")
mod_info_laserstool=(MOD "laserstool" "Laser STool" "https://github.com/dvdvideo1234/laserstool/archive/main.zip" "laserstool-main.zip" "0" "LowercaseOn" "${systemdir}/addons" "OVERWRITE" "ENGINES" "Garry's Mod;" "NOTGAMES" "https://github.com/dvdvideo1234/LaserSTool" "Scripted tool that spawns laser entities, simulates light rays and even kill players")
+# Rust
+mod_info_rustcarbon=(MOD "rustcarbon" "Carbon for Rust" "${carbonrustlatestlink}" "Carbon.Linux.Release.tar.gz" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Rust;" "NOTGAMES" "carbonmod.gg" "Allows for the use of both plugins and harmony mods")
+
# Oxidemod
mod_info_rustoxide=(MOD "rustoxide" "Oxide for Rust" "${oxiderustlatestlink}" "Oxide.Rust-linux.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Rust;" "NOTGAMES" "https://umod.org/games/rust" "Allows for the use of plugins")
mod_info_hwoxide=(MOD "hwoxide" "Oxide for Hurtworld" "${oxidehurtworldlatestlink}" "Oxide.Hurtworld.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Hurtworld;" "NOTGAMES" "https://umod.org/games/hurtworld" "Allows for the use of plugins")
@@ -199,4 +206,4 @@ mod_info_valheimplus=(MOD "valheimplus" "Valheim PLUS" "${valeimpluslatestlink}"
mod_info_bepinexvh=(MOD "bepinexvh" "BepInEx Valheim" "${bepinexvhlatestlink}" "denikson-BepInExPack_Valheim.zip" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Valheim;" "NOTGAMES" "https://valheim.thunderstore.io/package/denikson/BepInExPack_Valheim/" "Unity / XNA game patcher and plugin framework")
# REQUIRED: Set all mods info into the global array
-mods_global_array=("${mod_info_metamod[@]}" "${mod_info_base_amxx[@]}" "${mod_info_cs_amxx[@]}" "${mod_info_dod_amxx[@]}" "${mod_info_tfc_amxx[@]}" "${mod_info_ns_amxx[@]}" "${mod_info_ts_amxx[@]}" "${mod_info_metamodsource[@]}" "${mod_info_sourcemod[@]}" "${mod_info_steamworks[@]}" "${mod_info_gokz[@]}" "${mod_info_ttt[@]}" "${mod_info_get5[@]}" "${mod_info_prac[@]}" "${mod_info_pug[@]}" "${mod_info_dhook[@]}" "${mod_info_movement[@]}" "${mod_info_cleaner[@]}" "${mod_info_ulib[@]}" "${mod_info_ulx[@]}" "${mod_info_utime[@]}" "${mod_info_uclip[@]}" "${mod_info_acf[@]}" "${mod_info_acf_missiles[@]}" "${mod_info_acf_sweps[@]}" "${mod_info_advdupe2[@]}" "${mod_info_pac3[@]}" "${mod_info_wiremod[@]}" "${mod_info_wiremodextras[@]}" "${mod_info_darkrp[@]}" "${mod_info_darkrpmodification[@]}" "${mod_info_rustoxide[@]}" "${mod_info_hwoxide[@]}" "${mod_info_sdtdoxide[@]}" "${mod_info_advduplicator[@]}" "${mod_info_trackassemblytool[@]}" "${mod_info_physpropertiesadv[@]}" "${mod_info_controlsystemse2[@]}" "${mod_info_e2pistontiming[@]}" "${mod_info_propcannontool[@]}" "${mod_info_gearassemblytool[@]}" "${mod_info_spinnertool[@]}" "${mod_info_surfacefrictiontool[@]}" "${mod_info_magneticdipole[@]}" "${mod_info_environmentorganizer[@]}" "${mod_info_precision_alignment[@]}" "${mod_info_improved_stacker[@]}" "${mod_info_improved_weight[@]}" "${mod_info_improved_antinoclip[@]}" "${mod_info_laserstool[@]}" "${mod_info_valheimplus[@]}" "${mod_info_bepinexvh[@]}")
+mods_global_array=("${mod_info_metamod[@]}" "${mod_info_base_amxx[@]}" "${mod_info_cs_amxx[@]}" "${mod_info_dod_amxx[@]}" "${mod_info_tfc_amxx[@]}" "${mod_info_ns_amxx[@]}" "${mod_info_ts_amxx[@]}" "${mod_info_metamodsource[@]}" "${mod_info_sourcemod[@]}" "${mod_info_steamworks[@]}" "${mod_info_gokz[@]}" "${mod_info_ttt[@]}" "${mod_info_get5[@]}" "${mod_info_prac[@]}" "${mod_info_pug[@]}" "${mod_info_dhook[@]}" "${mod_info_movement[@]}" "${mod_info_cleaner[@]}" "${mod_info_ulib[@]}" "${mod_info_ulx[@]}" "${mod_info_utime[@]}" "${mod_info_uclip[@]}" "${mod_info_acf[@]}" "${mod_info_acf_missiles[@]}" "${mod_info_acf_sweps[@]}" "${mod_info_advdupe2[@]}" "${mod_info_pac3[@]}" "${mod_info_wiremod[@]}" "${mod_info_wiremodextras[@]}" "${mod_info_darkrp[@]}" "${mod_info_darkrpmodification[@]}" "${mod_info_rustcarbon[@]}" "${mod_info_rustoxide[@]}" "${mod_info_hwoxide[@]}" "${mod_info_sdtdoxide[@]}" "${mod_info_advduplicator[@]}" "${mod_info_trackassemblytool[@]}" "${mod_info_physpropertiesadv[@]}" "${mod_info_controlsystemse2[@]}" "${mod_info_e2pistontiming[@]}" "${mod_info_propcannontool[@]}" "${mod_info_gearassemblytool[@]}" "${mod_info_spinnertool[@]}" "${mod_info_surfacefrictiontool[@]}" "${mod_info_magneticdipole[@]}" "${mod_info_environmentorganizer[@]}" "${mod_info_precision_alignment[@]}" "${mod_info_improved_stacker[@]}" "${mod_info_improved_weight[@]}" "${mod_info_improved_antinoclip[@]}" "${mod_info_laserstool[@]}" "${mod_info_valheimplus[@]}" "${mod_info_bepinexvh[@]}")
diff --git a/lgsm/modules/query_gamedig.sh b/lgsm/modules/query_gamedig.sh
old mode 100755
new mode 100644
index 43f748bcc..bbf24f5d7
--- a/lgsm/modules/query_gamedig.sh
+++ b/lgsm/modules/query_gamedig.sh
@@ -6,8 +6,8 @@
# Description: Querys a gameserver using node-gamedig.
# https://github.com/sonicsnes/node-gamedig
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
-
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+querystatus="2"
# Check if gamedig and jq are installed.
if [ "$(command -v gamedig 2> /dev/null)" ] && [ "$(command -v jq 2> /dev/null)" ]; then
@@ -81,7 +81,7 @@ if [ "$(command -v gamedig 2> /dev/null)" ] && [ "$(command -v jq 2> /dev/null)"
# server version.
if [ "${querytype}" == "teamspeak3" ]; then
- dversion=$(echo "${gamedigraw}" | jq -re '.raw.virtualserver_version')
+ gdversion=$(echo "${gamedigraw}" | jq -re '.raw.virtualserver_version')
else
gdversion=$(echo "${gamedigraw}" | jq -re '.raw.version')
fi
diff --git a/lgsm/modules/query_gsquery.py b/lgsm/modules/query_gsquery.py
old mode 100755
new mode 100644
index 62c92082e..09bb147d9
--- a/lgsm/modules/query_gsquery.py
+++ b/lgsm/modules/query_gsquery.py
@@ -1,6 +1,6 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
-# LinuxGSM query_gsquery.py function
+# LinuxGSM query_gsquery.py module
# Author: Daniel Gibbs
# Contributors: http://linuxgsm.com/contrib
# Website: https://linuxgsm.com
diff --git a/lgsm/modules/update_factorio.sh b/lgsm/modules/update_factorio.sh
index 2c8bf0d01..2d58f0cf9 100644
--- a/lgsm/modules/update_factorio.sh
+++ b/lgsm/modules/update_factorio.sh
@@ -5,49 +5,46 @@
# Website: https://linuxgsm.com
# Description: Handles updating of Factorio servers.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(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_dl_extract "${tmpdir}" "factorio_headless_${factorioarch}-${remotebuild}.tar.xz" "${tmpdir}"
- echo -e "copying to ${serverfiles}...\c"
- cp -R "${tmpdir}/factorio/"* "${serverfiles}"
- local exitcode=$?
- if [ "${exitcode}" == "0" ]; then
- fn_print_ok_eol_nl
- fn_script_log_pass "Copying to ${serverfiles}"
- fn_clear_tmp
- else
- fn_print_fail_eol_nl
- fn_script_log_fatal "Copying to ${serverfiles}"
- core_exit.sh
- fn_clear_tmp
- fi
+fn_update_dl() {
+ # Download and extract files to serverfiles
+ fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "nohash"
+ fn_dl_extract "${tmpdir}" "factorio_headless_${factorioarch}-${remotebuildversion}.tar.xz" "${serverfiles}" "factorio"
+ fn_clear_tmp
}
-fn_update_factorio_localbuild() {
+fn_update_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
+ # Uses executable to get local build.
+ if [ -d "${exutabledir}" ]; then
+ cd "${executabledir}" || exit
localbuild=$(${executable} --version | grep "Version:" | awk '{print $2}')
- fn_print_ok "Checking for update: ${remotelocation}: checking local build"
- fn_script_log_pass "Checking local build"
- else
+ fi
+ if [ -z "${localbuild}" ]; then
+ fn_print_error "Checking local build: ${remotelocation}: missing local build info"
+ fn_script_log_error "Missing local build info"
+ fn_script_log_error "Set localbuild to 0"
localbuild="0"
- fn_print_error "Checking for update: ${remotelocation}: checking local build"
- fn_script_log_error "Checking local build"
+ else
+ fn_print_ok "Checking local build: ${remotelocation}"
+ fn_script_log_pass "Checking local build"
fi
}
-fn_update_factorio_remotebuild() {
- # Gets remote build info.
- remotebuild=$(curl -s "https://factorio.com/get-download/${downloadbranch}/headless/${factorioarch}" | grep -o '[0-9]\.[0-9]\{1,\}\.[0-9]\{1,\}' | head -1)
+fn_update_remotebuild() {
+ # Get remote build info.
+ apiurl="https://factorio.com/get-download/${branch}/headless/${factorioarch}"
+ remotebuildresponse=$(curl -s "${apiurl}")
+ remotebuildversion=$(echo "${remotebuildresponse}" | grep -o '[0-9]\.[0-9]\{1,\}\.[0-9]\{1,\}' | head -1)
+ remotebuildurl="https://factorio.com/get-download/${branch}/headless/${factorioarch}"
+ remotebuildfilename="factorio_headless_${factorioarch}-${remotebuildversion}.tar.xz"
+
if [ "${firstcommandname}" != "INSTALL" ]; then
fn_print_dots "Checking remote build: ${remotelocation}"
- # Checks if remotebuild variable has been set.
- if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then
+ # Checks if remotebuildversion variable has been set.
+ if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then
fn_print_fail "Checking remote build: ${remotelocation}"
fn_script_log_fatal "Checking remote build"
core_exit.sh
@@ -57,7 +54,7 @@ fn_update_factorio_remotebuild() {
fi
else
# Checks if remotebuild variable has been set.
- if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then
+ if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then
fn_print_failure "Unable to get remote build"
fn_script_log_fatal "Unable to get remote build"
core_exit.sh
@@ -65,101 +62,107 @@ fn_update_factorio_remotebuild() {
fi
}
-fn_update_factorio_compare() {
+fn_update_compare() {
fn_print_dots "Checking for update: ${remotelocation}"
- # Removes dots so if statement can compare version numbers.
- fn_print_dots "Checking for update: ${remotelocation}"
- localbuilddigit=$(echo -e "${localbuild}" | tr -cd '[:digit:]')
- remotebuilddigit=$(echo -e "${remotebuild}" | tr -cd '[:digit:]')
- if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ] || [ "${forceupdate}" == "1" ]; then
+ if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then
fn_print_ok_nl "Checking for update: ${remotelocation}"
echo -en "\n"
echo -e "Update available"
echo -e "* Local build: ${red}${localbuild} ${factorioarch}${default}"
- echo -e "* Remote build: ${green}${remotebuild} ${factorioarch}${default}"
+ echo -e "* Remote build: ${green}${remotebuildversion} ${factorioarch}${default}"
if [ -n "${branch}" ]; then
echo -e "* Branch: ${branch}"
fi
+ if [ -f "${rootdir}/.dev-debug" ]; then
+ echo -e "Remote build info"
+ echo -e "* apiurl: ${apiurl}"
+ echo -e "* remotebuildfilename: ${remotebuildfilename}"
+ echo -e "* remotebuildurl: ${remotebuildurl}"
+ echo -e "* remotebuildversion: ${remotebuildversion}"
+ fi
echo -en "\n"
fn_script_log_info "Update available"
fn_script_log_info "Local build: ${localbuild} ${factorioarch}"
- fn_script_log_info "Remote build: ${remotebuild} ${factorioarch}"
- if [ -v "${branch}" ]; then
+ fn_script_log_info "Remote build: ${remotebuildversion} ${factorioarch}"
+ if [ -n "${branch}" ]; then
fn_script_log_info "Branch: ${branch}"
fi
- fn_script_log_info "${localbuild} > ${remotebuild}"
+ fn_script_log_info "${localbuild} > ${remotebuildversion}"
- unset updateonstart
- check_status.sh
- # If server stopped.
- if [ "${status}" == "0" ]; then
- exitbypass=1
- fn_update_factorio_dl
- if [ "${requirerestart}" == "1" ]; then
+ if [ "${commandname}" == "UPDATE" ]; then
+ unset updateonstart
+ check_status.sh
+ # If server stopped.
+ if [ "${status}" == "0" ]; then
+ fn_update_dl
+ if [ "${localbuild}" == "0" ]; then
+ exitbypass=1
+ command_start.sh
+ fn_firstcommand_reset
+ exitbypass=1
+ sleep 5
+ command_stop.sh
+ fn_firstcommand_reset
+ fi
+ # If server started.
+ else
+ fn_print_restart_warning
exitbypass=1
- command_start.sh
+ command_stop.sh
fn_firstcommand_reset
exitbypass=1
- command_stop.sh
+ fn_update_dl
+ exitbypass=1
+ command_start.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_factorio_dl
- exitbypass=1
- command_start.sh
- fn_firstcommand_reset
+ unset exitbypass
+ date +%s > "${lockdir}/lastupdate.lock"
+ alert="update"
+ elif [ "${commandname}" == "CHECK-UPDATE" ]; then
+ alert="check-update"
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} ${factorioarch}${default}"
- echo -e "* Remote build: ${green}${remotebuild} ${factorioarch}${default}"
- if [ -v "${branch}" ]; then
+ echo -e "* Remote build: ${green}${remotebuildversion} ${factorioarch}${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} ${factorioarch}"
- fn_script_log_info "Remote build: ${remotebuild} ${factorioarch}"
- if [ -v "${branch}" ]; then
+ fn_script_log_info "Remote build: ${remotebuildversion} ${factorioarch}"
+ if [ -n "${branch}" ]; then
fn_script_log_info "Branch: ${branch}"
fi
+ if [ -f "${rootdir}/.dev-debug" ]; then
+ echo -e "Remote build info"
+ echo -e "* apiurl: ${apiurl}"
+ echo -e "* remotebuildfilename: ${remotebuildfilename}"
+ echo -e "* remotebuildurl: ${remotebuildurl}"
+ echo -e "* remotebuildversion: ${remotebuildversion}"
+ fi
fi
}
-# The location where the builds are checked and downloaded.
-remotelocation="factorio.com"
-
# Game server architecture.
factorioarch="linux64"
-if [ "${branch}" == "stable" ]; then
- downloadbranch="stable"
-elif [ "${branch}" == "experimental" ]; then
- downloadbranch="latest"
-else
- downloadbranch="${branch}"
-fi
+# The location where the builds are checked and downloaded.
+remotelocation="factorio.com"
if [ "${firstcommandname}" == "INSTALL" ]; then
- fn_update_factorio_remotebuild
- fn_update_factorio_dl
+ fn_update_remotebuild
+ fn_update_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_factorio_localbuild
- fn_update_factorio_remotebuild
- fn_update_factorio_compare
+ fn_update_localbuild
+ fn_update_remotebuild
+ fn_update_compare
fi
diff --git a/lgsm/modules/update_jediknight2.sh b/lgsm/modules/update_jediknight2.sh
index 421bc543f..8a6cd9bfc 100644
--- a/lgsm/modules/update_jediknight2.sh
+++ b/lgsm/modules/update_jediknight2.sh
@@ -3,81 +3,45 @@
# Author: Daniel Gibbs
# Contributors: http://linuxgsm.com/contrib
# Website: https://linuxgsm.com
-# Description: Handles updating of jk2 servers.
+# Description: Handles updating of Jedi Knight 2 servers.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(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_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"
- local exitcode=$?
- if [ "${exitcode}" == "0" ]; then
- fn_print_ok_eol_nl
- fn_script_log_pass "Copying to ${serverfiles}"
- fn_clear_tmp
- else
- fn_print_fail_eol_nl
- fn_script_log_fatal "Copying to ${serverfiles}"
- core_exit.sh
- fi
+fn_update_dl() {
+ # Download and extract files to serverfiles
+ fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "nohash"
+ fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}/GameData" "linux-amd64"
+ fn_clear_tmp
}
-fn_update_jk2_localbuild() {
+fn_update_localbuild() {
# Gets local build info.
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}"
- fn_print_error_nl "Checking local build: ${remotelocation}: no log files containing version info"
- fn_print_info_nl "Checking local build: ${remotelocation}: forcing server restart"
- fn_script_log_error "No log files containing version info"
- fn_script_log_info "Forcing server restart"
-
- check_status.sh
- # If server stopped.
- if [ "${status}" == "0" ]; then
- exitbypass=1
- command_start.sh
- fn_firstcommand_reset
- sleep 3
- exitbypass=1
- command_stop.sh
- fn_firstcommand_reset
- # If server started.
- else
- exitbypass=1
- command_stop.sh
- fn_firstcommand_reset
- fi
- fi
-
- if [ -z "${localbuild}" ]; then
- localbuild=$(grep Version "$(ls -tr "${consolelogdir}"/* 2> /dev/null)" | tail -1 | sed 's/.*Version //')
- fi
-
+ # Uses log file to get local build.
+ localbuild=$(grep "\"version\"" "${consolelogdir}"/* 2> /dev/null | sed 's/.*://' | awk '{print $1}' | head -n 1 | sed 's/v//')
if [ -z "${localbuild}" ]; then
- localbuild="0"
- fn_print_error "Checking local build: ${remotelocation}: waiting for local build: missing local build info"
+ fn_print_error "Checking local build: ${remotelocation}: missing local build info"
fn_script_log_error "Missing local build info"
fn_script_log_error "Set localbuild to 0"
+ localbuild="0"
else
fn_print_ok "Checking local build: ${remotelocation}"
fn_script_log_pass "Checking local build"
fi
}
-fn_update_jk2_remotebuild() {
- # Gets remote build info.
- remotebuild=$(curl -s "https://api.github.com/repos/mvdevs/jk2mv/releases/latest" | grep dedicated.zip | tail -1 | awk -F"/" '{ print $8 }')
+fn_update_remotebuild() {
+ # Get remote build info.
+ apiurl="https://api.github.com/repos/mvdevs/jk2mv/releases/latest"
+ remotebuildresponse=$(curl -s "${apiurl}")
+ remotebuildfilename=$(echo "${remotebuildresponse}" | jq -r '.assets[]|select(.browser_download_url | contains("dedicated.zip")) | .name')
+ remotebuildurl=$(echo "${remotebuildresponse}" | jq -r '.assets[]|select(.browser_download_url | contains("dedicated.zip")) | .browser_download_url')
+ remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '.tag_name')
+
if [ "${firstcommandname}" != "INSTALL" ]; then
fn_print_dots "Checking remote build: ${remotelocation}"
- # Checks if remotebuild variable has been set.
- if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then
+ # Checks if remotebuildversion variable has been set.
+ if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then
fn_print_fail "Checking remote build: ${remotelocation}"
fn_script_log_fatal "Checking remote build"
core_exit.sh
@@ -87,7 +51,7 @@ fn_update_jk2_remotebuild() {
fi
else
# Checks if remotebuild variable has been set.
- if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then
+ if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then
fn_print_failure "Unable to get remote build"
fn_script_log_fatal "Unable to get remote build"
core_exit.sh
@@ -95,80 +59,105 @@ fn_update_jk2_remotebuild() {
fi
}
-fn_update_jk2_compare() {
- # Removes dots so if statement can compare version numbers.
+fn_update_compare() {
fn_print_dots "Checking for update: ${remotelocation}"
- localbuilddigit=$(echo -e "${localbuild}" | tr -cd '[:digit:]')
- remotebuilddigit=$(echo -e "${remotebuild}" | tr -cd '[:digit:]')
- if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ] || [ "${forceupdate}" == "1" ]; then
+ if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then
fn_print_ok_nl "Checking for update: ${remotelocation}"
echo -en "\n"
echo -e "Update available"
- echo -e "* Local build: ${red}${localbuild} ${jk2arch}${default}"
- echo -e "* Remote build: ${green}${remotebuild} ${jk2arch}${default}"
+ echo -e "* Local build: ${red}${localbuild}${default}"
+ echo -e "* Remote build: ${green}${remotebuildversion}${default}"
+ if [ -n "${branch}" ]; then
+ echo -e "* Branch: ${branch}"
+ fi
+ if [ -f "${rootdir}/.dev-debug" ]; then
+ echo -e "Remote build info"
+ echo -e "* apiurl: ${apiurl}"
+ echo -e "* remotebuildfilename: ${remotebuildfilename}"
+ echo -e "* remotebuildurl: ${remotebuildurl}"
+ echo -e "* remotebuildversion: ${remotebuildversion}"
+ fi
echo -en "\n"
fn_script_log_info "Update available"
- fn_script_log_info "Local build: ${localbuild} ${jk2arch}"
- fn_script_log_info "Remote build: ${remotebuild} ${jk2arch}"
- fn_script_log_info "${localbuild} > ${remotebuild}"
+ fn_script_log_info "Local build: ${localbuild}"
+ fn_script_log_info "Remote build: ${remotebuildversion}"
+ if [ -n "${branch}" ]; then
+ fn_script_log_info "Branch: ${branch}"
+ fi
+ fn_script_log_info "${localbuild} > ${remotebuildversion}"
- unset updateonstart
- check_status.sh
- # If server stopped.
- if [ "${status}" == "0" ]; then
- exitbypass=1
- fn_update_jk2_dl
- if [ "${requirerestart}" == "1" ]; then
+ if [ "${commandname}" == "UPDATE" ]; then
+ unset updateonstart
+ check_status.sh
+ # If server stopped.
+ if [ "${status}" == "0" ]; then
+ fn_update_dl
+ if [ "${localbuild}" == "0" ]; then
+ exitbypass=1
+ command_start.sh
+ fn_firstcommand_reset
+ exitbypass=1
+ sleep 5
+ command_stop.sh
+ fn_firstcommand_reset
+ fi
+ # If server started.
+ else
+ fn_print_restart_warning
exitbypass=1
- command_start.sh
+ command_stop.sh
fn_firstcommand_reset
exitbypass=1
- command_stop.sh
+ fn_update_dl
+ exitbypass=1
+ command_start.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_jk2_dl
- exitbypass=1
- command_start.sh
- fn_firstcommand_reset
+ unset exitbypass
+ date +%s > "${lockdir}/lastupdate.lock"
+ alert="update"
+ elif [ "${commandname}" == "CHECK-UPDATE" ]; then
+ alert="check-update"
fi
- 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} ${jk2arch}${default}"
- echo -e "* Remote build: ${green}${remotebuild} ${jk2arch}${default}"
+ echo -e "* Local build: ${green}${localbuild}${default}"
+ echo -e "* Remote build: ${green}${remotebuildversion}${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} ${jk2arch}"
- fn_script_log_info "Remote build: ${remotebuild} ${jk2arch}"
+ fn_script_log_info "Local build: ${localbuild}"
+ fn_script_log_info "Remote build: ${remotebuildversion}"
+ if [ -n "${branch}" ]; then
+ fn_script_log_info "Branch: ${branch}"
+ fi
+ if [ -f "${rootdir}/.dev-debug" ]; then
+ echo -e "Remote build info"
+ echo -e "* apiurl: ${apiurl}"
+ echo -e "* remotebuildfilename: ${remotebuildfilename}"
+ echo -e "* remotebuildurl: ${remotebuildurl}"
+ echo -e "* remotebuildversion: ${remotebuildversion}"
+ fi
fi
}
# The location where the builds are checked and downloaded.
-remotelocation="jk2mv.org"
-
-# Game server architecture.
-jk2arch="x64"
+remotelocation="github.com"
if [ "${firstcommandname}" == "INSTALL" ]; then
- fn_update_jk2_remotebuild
- fn_update_jk2_dl
+ fn_update_remotebuild
+ fn_update_dl
else
update_steamcmd.sh
fn_print_dots "Checking for update"
fn_print_dots "Checking for update: ${remotelocation}"
fn_script_log_info "Checking for update: ${remotelocation}"
- fn_update_jk2_localbuild
- fn_update_jk2_remotebuild
- fn_update_jk2_compare
+ fn_update_localbuild
+ fn_update_remotebuild
+ fn_update_compare
fi
diff --git a/lgsm/modules/update_minecraft.sh b/lgsm/modules/update_minecraft.sh
index d20b98ef4..69dc118b1 100644
--- a/lgsm/modules/update_minecraft.sh
+++ b/lgsm/modules/update_minecraft.sh
@@ -3,66 +3,57 @@
# Author: Daniel Gibbs
# Contributors: http://linuxgsm.com/contrib
# Website: https://linuxgsm.com
-# Description: Handles updating of Minecraft servers.
+# Description: Handles updating of Minecraft: Java Edition servers.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
-fn_update_minecraft_dl() {
- # Generate link to version manifest json.
- remotebuildlink=$(curl -s "https://launchermeta.${remotelocation}/mc/game/version_manifest.json" | jq -r --arg branch ${branch} --arg mcversion ${remotebuild} '.versions | .[] | select(.type==$branch and .id==$mcversion) | .url')
- # 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"
- echo -e "copying to ${serverfiles}...\c"
- cp "${tmpdir}/minecraft_server.${remotebuild}.jar" "${serverfiles}/minecraft_server.jar"
- local exitcode=$?
- if [ "${exitcode}" == "0" ]; then
- fn_print_ok_eol_nl
- fn_script_log_pass "Copying to ${serverfiles}"
- chmod u+x "${serverfiles}/minecraft_server.jar"
- fn_clear_tmp
- else
- fn_print_fail_eol_nl
- fn_script_log_fatal "Copying to ${serverfiles}"
- fn_clear_tmp
- core_exit.sh
- fi
+fn_update_dl() {
+ # Download and extract files to serverfiles
+ fn_fetch_file "${remotebuildurl}" "" "" "" "${serverfiles}" "minecraft_server.jar" "chmodx" "norun" "noforce" "nohash"
}
-fn_update_minecraft_localbuild() {
+fn_update_localbuild() {
# Gets local build info.
fn_print_dots "Checking local build: ${remotelocation}"
- # Uses executable to find local build.
- cd "${executabledir}" || exit
- if [ -f "minecraft_server.jar" ]; then
+ # Uses executable to get local build.
+ if [ -d "${exutabledir}" ]; then
+ cd "${executabledir}" || exit
localbuild=$(unzip -p "minecraft_server.jar" version.json | jq -r '.id')
+ fi
+ if [ -z "${localbuild}" ]; then
+ fn_print_error "Checking local build: ${remotelocation}: missing local build info"
+ fn_script_log_error "Missing local build info"
+ fn_script_log_error "Set localbuild to 0"
+ localbuild="0"
+ else
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_minecraft_remotebuild() {
- # Gets remote build info.
+fn_update_remotebuild() {
+ # Get remote build info.
+ apiurl="https://launchermeta.mojang.com/mc/game/version_manifest.json"
+ remotebuildresponse=$(curl -s "${apiurl}")
# Latest release.
if [ "${branch}" == "release" ] && [ "${mcversion}" == "latest" ]; then
- remotebuild=$(curl -s "https://launchermeta.${remotelocation}/mc/game/version_manifest.json" | jq -r '.latest.release')
+ remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '.latest.release')
# Latest snapshot.
elif [ "${branch}" == "snapshot" ] && [ "${mcversion}" == "latest" ]; then
- remotebuild=$(curl -s "https://launchermeta.${remotelocation}/mc/game/version_manifest.json" | jq -r '.latest.snapshot')
+ remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '.latest.snapshot')
# Specific release/snapshot.
else
- remotebuild=$(curl -s "https://launchermeta.${remotelocation}/mc/game/version_manifest.json" | jq -r --arg branch ${branch} --arg mcversion ${mcversion} '.versions | .[] | select(.type==$branch and .id==$mcversion) | .id')
+ remotebuildversion=$(echo "${remotebuildresponse}" | jq -r --arg branch "${branch}" --arg mcversion "${mcversion}" '.versions | .[] | select(.type==$branch and .id==$mcversion) | .id')
fi
+ # Generate link to version manifest json.
+ remotebuildmanifest=$(echo "${remotebuildresponse}" | jq -r --arg branch "${branch}" --arg mcversion "${remotebuildversion}" '.versions | .[] | select(.type==$branch and .id==$mcversion) | .url')
+ # Generate link to server.jar
+ remotebuildurl=$(curl -s "${remotebuildmanifest}" | jq -r '.downloads.server.url')
if [ "${firstcommandname}" != "INSTALL" ]; then
fn_print_dots "Checking remote build: ${remotelocation}"
- # Checks if remotebuild variable has been set.
- if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then
+ # Checks if remotebuildversion variable has been set.
+ if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then
fn_print_fail "Checking remote build: ${remotelocation}"
fn_script_log_fatal "Checking remote build"
core_exit.sh
@@ -72,7 +63,7 @@ fn_update_minecraft_remotebuild() {
fi
else
# Checks if remotebuild variable has been set.
- if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then
+ if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then
fn_print_failure "Unable to get remote build"
fn_script_log_fatal "Unable to get remote build"
core_exit.sh
@@ -80,70 +71,90 @@ fn_update_minecraft_remotebuild() {
fi
}
-fn_update_minecraft_compare() {
- # Removes dots so if statement can compare version numbers.
+fn_update_compare() {
fn_print_dots "Checking for update: ${remotelocation}"
- if [ "${localbuild}" != "${remotebuild}" ] || [ "${forceupdate}" == "1" ]; then
+ if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${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}"
+ echo -e "* Remote build: ${green}${remotebuildversion}${default}"
if [ -n "${branch}" ]; then
echo -e "* Branch: ${branch}"
fi
+ if [ -f "${rootdir}/.dev-debug" ]; then
+ echo -e "Remote build info"
+ echo -e "* apiurl: ${apiurl}"
+ echo -e "* remotebuildfilename: ${remotebuildfilename}"
+ echo -e "* remotebuildurl: ${remotebuildurl}"
+ echo -e "* remotebuildversion: ${remotebuildversion}"
+ 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}"
+ fn_script_log_info "Remote build: ${remotebuildversion}"
+ if [ -n "${branch}" ]; then
+ fn_script_log_info "Branch: ${branch}"
+ fi
+ fn_script_log_info "${localbuild} > ${remotebuildversion}"
- unset updateonstart
- check_status.sh
- # If server stopped.
- if [ "${status}" == "0" ]; then
- exitbypass=1
- fn_update_minecraft_dl
- if [ "${requirerestart}" == "1" ]; then
+ if [ "${commandname}" == "UPDATE" ]; then
+ unset updateonstart
+ check_status.sh
+ # If server stopped.
+ if [ "${status}" == "0" ]; then
+ fn_update_dl
+ if [ "${localbuild}" == "0" ]; then
+ exitbypass=1
+ command_start.sh
+ fn_firstcommand_reset
+ exitbypass=1
+ sleep 5
+ command_stop.sh
+ fn_firstcommand_reset
+ fi
+ # If server started.
+ else
+ fn_print_restart_warning
exitbypass=1
- command_start.sh
+ command_stop.sh
fn_firstcommand_reset
exitbypass=1
- command_stop.sh
+ fn_update_dl
+ exitbypass=1
+ command_start.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_minecraft_dl
- exitbypass=1
- command_start.sh
- fn_firstcommand_reset
+ unset exitbypass
+ date +%s > "${lockdir}/lastupdate.lock"
+ alert="update"
+ elif [ "${commandname}" == "CHECK-UPDATE" ]; then
+ alert="check-update"
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}"
+ echo -e "* Remote build: ${green}${remotebuildversion}${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}"
+ fn_script_log_info "Remote build: ${remotebuildversion}"
if [ -n "${branch}" ]; then
fn_script_log_info "Branch: ${branch}"
fi
+ if [ -f "${rootdir}/.dev-debug" ]; then
+ echo -e "Remote build info"
+ echo -e "* apiurl: ${apiurl}"
+ echo -e "* remotebuildfilename: ${remotebuildfilename}"
+ echo -e "* remotebuildurl: ${remotebuildurl}"
+ echo -e "* remotebuildversion: ${remotebuildversion}"
+ fi
fi
}
@@ -151,13 +162,13 @@ fn_update_minecraft_compare() {
remotelocation="mojang.com"
if [ "${firstcommandname}" == "INSTALL" ]; then
- fn_update_minecraft_remotebuild
- fn_update_minecraft_dl
+ fn_update_remotebuild
+ fn_update_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_minecraft_localbuild
- fn_update_minecraft_remotebuild
- fn_update_minecraft_compare
+ fn_update_localbuild
+ fn_update_remotebuild
+ fn_update_compare
fi
diff --git a/lgsm/modules/update_minecraft_bedrock.sh b/lgsm/modules/update_minecraft_bedrock.sh
index 163e076aa..a0d76aa20 100644
--- a/lgsm/modules/update_minecraft_bedrock.sh
+++ b/lgsm/modules/update_minecraft_bedrock.sh
@@ -5,92 +5,62 @@
# Website: https://linuxgsm.com
# Description: Handles updating of Minecraft Bedrock servers.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
-#random number for userAgent
-randnum=$((1 + RANDOM % 5000))
-
-fn_update_minecraft_dl() {
- fn_fetch_file "https://minecraft.azureedge.net/bin-linux/bedrock-server-${remotebuild}.zip" "" "" "" "${tmpdir}" "bedrock_server.${remotebuild}.zip"
+fn_update_dl() {
+ fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "bedrock_server.${remotebuildversion}.zip"
echo -e "Extracting to ${serverfiles}...\c"
if [ "${firstcommandname}" == "INSTALL" ]; then
- unzip -oq "${tmpdir}/bedrock_server.${remotebuild}.zip" -x "server.properties" -d "${serverfiles}"
+ unzip -oq "${tmpdir}/bedrock_server.${remotebuildversion}.zip" -x "server.properties" -d "${serverfiles}"
else
- unzip -oq "${tmpdir}/bedrock_server.${remotebuild}.zip" -x "permissions.json" "server.properties" "allowlist.json" -d "${serverfiles}"
+ unzip -oq "${tmpdir}/bedrock_server.${remotebuildversion}.zip" -x "permissions.json" "server.properties" "allowlist.json" -d "${serverfiles}"
fi
local exitcode=$?
- if [ "${exitcode}" == "0" ]; then
- fn_print_ok_eol_nl
- fn_script_log_pass "Extracting to ${serverfiles}"
- chmod u+x "${serverfiles}/bedrock_server"
- fn_clear_tmp
- else
+ if [ "${exitcode}" != 0 ]; then
fn_print_fail_eol_nl
- fn_script_log_fatal "Extracting to ${serverfiles}"
- fn_clear_tmp
+ fn_script_log_fatal "Extracting ${local_filename}"
+ if [ -f "${lgsmlog}" ]; then
+ echo -e "${extractcmd}" >> "${lgsmlog}"
+ fi
+ echo -e "${extractcmd}"
core_exit.sh
+ else
+ fn_print_ok_eol_nl
+ fn_script_log_pass "Extracting ${local_filename}"
fi
}
-fn_update_minecraft_localbuild() {
+fn_update_localbuild() {
# Gets local build info.
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}"
- fn_print_error_nl "Checking local build: ${remotelocation}: no log files containing version info"
- fn_print_info_nl "Checking local build: ${remotelocation}: forcing server restart"
- fn_script_log_error "No log files containing version info"
- fn_script_log_info "Forcing server restart"
-
- check_status.sh
- # If server stopped.
- if [ "${status}" == "0" ]; then
- exitbypass=1
- command_start.sh
- fn_firstcommand_reset
- sleep 3
- exitbypass=1
- command_stop.sh
- fn_firstcommand_reset
- # If server started.
- else
- exitbypass=1
- command_stop.sh
- fn_firstcommand_reset
- fi
- fi
-
- if [ -z "${localbuild}" ]; then
- localbuild=$(grep Version "$(ls -tr "${consolelogdir}"/* 2> /dev/null)" | tail -1 | sed 's/.*Version //')
- fi
-
+ # Uses log file to get local build.
+ localbuild=$(grep Version "${consolelogdir}"/* 2> /dev/null | tail -1 | sed 's/.*Version //' | tr -d '\000-\011\013-\037')
if [ -z "${localbuild}" ]; then
- localbuild="0"
- fn_print_error "Checking local build: ${remotelocation}: waiting for local build: missing local build info"
+ fn_print_error "Checking local build: ${remotelocation}: missing local build info"
fn_script_log_error "Missing local build info"
fn_script_log_error "Set localbuild to 0"
+ localbuild="0"
else
fn_print_ok "Checking local build: ${remotelocation}"
fn_script_log_pass "Checking local build"
fi
}
-fn_update_minecraft_remotebuild() {
- # Gets remote build info.
+fn_update_remotebuild() {
+ # Random number for userAgent
+ randnum=$((1 + RANDOM % 5000))
+ # Get remote build info.
if [ "${mcversion}" == "latest" ]; then
- 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]")
+ remotebuildversion=$(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]")
else
- remotebuild="${mcversion}"
+ remotebuildversion="${mcversion}"
fi
+ remotebuildurl="https://minecraft.azureedge.net/bin-linux/bedrock-server-${remotebuildversion}.zip"
if [ "${firstcommandname}" != "INSTALL" ]; then
fn_print_dots "Checking remote build: ${remotelocation}"
- # Checks if remotebuild variable has been set.
- if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then
+ # Checks if remotebuildversion variable has been set.
+ if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then
fn_print_fail "Checking remote build: ${remotelocation}"
fn_script_log_fatal "Checking remote build"
core_exit.sh
@@ -100,7 +70,7 @@ fn_update_minecraft_remotebuild() {
fi
else
# Checks if remotebuild variable has been set.
- if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then
+ if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then
fn_print_failure "Unable to get remote build"
fn_script_log_fatal "Unable to get remote build"
core_exit.sh
@@ -108,63 +78,90 @@ fn_update_minecraft_remotebuild() {
fi
}
-fn_update_minecraft_compare() {
- # Removes dots so if statement can compare version numbers.
+fn_update_compare() {
fn_print_dots "Checking for update: ${remotelocation}"
- localbuilddigit=$(echo -e "${localbuild}" | tr -cd '[:digit:]')
- remotebuilddigit=$(echo -e "${remotebuild}" | tr -cd '[:digit:]')
- if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ] || [ "${forceupdate}" == "1" ]; then
+ if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${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}"
+ echo -e "* Remote build: ${green}${remotebuildversion}${default}"
+ if [ -n "${branch}" ]; then
+ echo -e "* Branch: ${branch}"
+ fi
+ if [ -f "${rootdir}/.dev-debug" ]; then
+ echo -e "Remote build info"
+ echo -e "* apiurl: ${apiurl}"
+ echo -e "* remotebuildfilename: ${remotebuildfilename}"
+ echo -e "* remotebuildurl: ${remotebuildurl}"
+ echo -e "* remotebuildversion: ${remotebuildversion}"
+ 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}"
+ fn_script_log_info "Remote build: ${remotebuildversion}"
+ if [ -n "${branch}" ]; then
+ fn_script_log_info "Branch: ${branch}"
+ fi
+ fn_script_log_info "${localbuild} > ${remotebuildversion}"
- unset updateonstart
- check_status.sh
- # If server stopped.
- if [ "${status}" == "0" ]; then
- exitbypass=1
- fn_update_minecraft_dl
- if [ "${requirerestart}" == "1" ]; then
+ if [ "${commandname}" == "UPDATE" ]; then
+ unset updateonstart
+ check_status.sh
+ # If server stopped.
+ if [ "${status}" == "0" ]; then
+ fn_update_dl
+ if [ "${localbuild}" == "0" ]; then
+ exitbypass=1
+ command_start.sh
+ fn_firstcommand_reset
+ exitbypass=1
+ sleep 5
+ command_stop.sh
+ fn_firstcommand_reset
+ fi
+ # If server started.
+ else
+ fn_print_restart_warning
exitbypass=1
- command_start.sh
+ command_stop.sh
fn_firstcommand_reset
exitbypass=1
- command_stop.sh
+ fn_update_dl
+ exitbypass=1
+ command_start.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_minecraft_dl
- exitbypass=1
- command_start.sh
- fn_firstcommand_reset
+ unset exitbypass
+ date +%s > "${lockdir}/lastupdate.lock"
+ alert="update"
+ elif [ "${commandname}" == "CHECK-UPDATE" ]; then
+ alert="check-update"
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}"
+ echo -e "* Remote build: ${green}${remotebuildversion}${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}"
+ fn_script_log_info "Remote build: ${remotebuildversion}"
+ if [ -n "${branch}" ]; then
+ fn_script_log_info "Branch: ${branch}"
+ fi
+ if [ -f "${rootdir}/.dev-debug" ]; then
+ echo -e "Remote build info"
+ echo -e "* apiurl: ${apiurl}"
+ echo -e "* remotebuildfilename: ${remotebuildfilename}"
+ echo -e "* remotebuildurl: ${remotebuildurl}"
+ echo -e "* remotebuildversion: ${remotebuildversion}"
+ fi
fi
}
@@ -172,13 +169,13 @@ fn_update_minecraft_compare() {
remotelocation="minecraft.net"
if [ "${firstcommandname}" == "INSTALL" ]; then
- fn_update_minecraft_remotebuild
- fn_update_minecraft_dl
+ fn_update_remotebuild
+ fn_update_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_minecraft_localbuild
- fn_update_minecraft_remotebuild
- fn_update_minecraft_compare
+ fn_update_localbuild
+ fn_update_remotebuild
+ fn_update_compare
fi
diff --git a/lgsm/modules/update_mta.sh b/lgsm/modules/update_mta.sh
index 61216b809..16b8278c7 100644
--- a/lgsm/modules/update_mta.sh
+++ b/lgsm/modules/update_mta.sh
@@ -5,105 +5,41 @@
# Website: https://linuxgsm.com
# Description: Handles updating of Multi Theft Auto servers.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(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"
- mkdir "${tmpdir}/multitheftauto_linux_x64"
- fn_dl_extract "${tmpdir}" "multitheftauto_linux_x64.tar.gz" "${tmpdir}/multitheftauto_linux_x64"
- echo -e "copying to ${serverfiles}...\c"
- cp -R "${tmpdir}/multitheftauto_linux_x64/multitheftauto_linux_x64/"* "${serverfiles}"
- local exitcode=$?
- fn_clear_tmp
- if [ "${exitcode}" == "0" ]; then
- fn_print_ok_eol_nl
- fn_script_log_pass "Copying to ${serverfiles}"
- chmod u+x "${serverfiles}/mta-server64"
- else
- fn_print_fail_eol_nl
- fn_script_log_fatal "Copying to ${serverfiles}"
- core_exit.sh
- fi
+fn_update_dl() {
+ # Download and extract files to tmpdir.
+ fn_fetch_file "http://linux.mtasa.com/dl/multitheftauto_linux_x64.tar.gz" "" "" "" "${tmpdir}" "multitheftauto_linux_x64.tar.gz" "nochmodx" "norun" "force" "nohash"
+ fn_dl_extract "${tmpdir}" "multitheftauto_linux_x64.tar.gz" "${serverfiles}" "multitheftauto_linux_x64"
}
-fn_update_mta_localbuild() {
+fn_update_localbuild() {
# Gets local build info.
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"
- fn_print_info_nl "Checking local build: ${remotelocation}: forcing server restart"
- fn_script_log_error "No log files containing version info"
- fn_script_log_info "Forcing server restart"
- exitbypass=1
- command_stop.sh
- exitbypass=1
- command_start.sh
- fn_firstcommand_reset
- totalseconds=0
- # Check again, allow time to generate logs.
- while [ ! -f "${serverfiles}/mods/deathmatch/logs/server.log" ]; do
- sleep 1
- fn_print_info "Checking local build: ${remotelocation}: waiting for log file: ${totalseconds}"
- if [ -v "${loopignore}" ]; then
- loopignore=1
- fn_script_log_info "Waiting for log file to generate"
- fi
-
- if [ "${totalseconds}" -gt "120" ]; then
- localbuild="0"
- fn_print_error "Checking local build: ${remotelocation}: waiting for log file: missing log file"
- fn_script_log_error "Missing log file"
- fn_script_log_error "Set localbuild to 0"
- fi
-
- totalseconds=$((totalseconds + 1))
- done
- fi
-
+ # Uses log file to get local build.
+ localbuild=$(grep "= Multi Theft Auto: San Andreas v" "${serverfiles}/mods/deathmatch/logs/server.log" | awk '{ print $7 }' | sed -r 's/^.{1}//' | tail -1)
if [ -z "${localbuild}" ]; then
- localbuild=$(grep "= Multi Theft Auto: San Andreas v" "${serverfiles}/mods/deathmatch/logs/server.log" | awk '{ print $7 }' | sed -r 's/^.{1}//' | tail -1)
- fi
-
- if [ -z "${localbuild}" ]; then
- # Gives time for var to generate.
- totalseconds=0
- for seconds in {1..120}; do
- fn_print_info "Checking local build: ${remotelocation}: waiting for local build: ${totalseconds}"
- if [ -z "${loopignore}" ]; then
- loopignore=1
- fn_script_log_info "Waiting for local build to generate"
- fi
- localbuild=$(grep "= Multi Theft Auto: San Andreas v" "${serverfiles}/mods/deathmatch/logs/server.log" | awk '{ print $7 }' | sed -r 's/^.{1}//' | tail -1)
- if [ "${localbuild}" ]; then
- break
- fi
- sleep 1
- totalseconds=$((totalseconds + 1))
- done
- fi
-
- if [ -z "${localbuild}" ]; then
- localbuild="0"
- fn_print_error "Checking local build: ${remotelocation}: waiting for local build: missing local build info"
+ fn_print_error "Checking local build: ${remotelocation}: missing local build info"
fn_script_log_error "Missing local build info"
fn_script_log_error "Set localbuild to 0"
+ localbuild="0"
else
fn_print_ok "Checking local build: ${remotelocation}"
fn_script_log_pass "Checking local build"
fi
}
-fn_update_mta_remotebuild() {
- # Gets remote build info.
- remotebuild=$(curl -s "https://api.github.com/repos/multitheftauto/mtasa-blue/releases/latest" | jq -r '.tag_name')
+fn_update_remotebuild() {
+ # Get remote build info.
+ apiurl="https://api.github.com/repos/multitheftauto/mtasa-blue/releases/latest"
+ remotebuildresponse=$(curl -s "${apiurl}")
+ remotebuildfilename=$(echo "${remotebuildresponse}" | jq -r '.assets[]|select(.browser_download_url | contains("Linux-amd64")) | .name')
+ remotebuildurl=$(echo "${remotebuildresponse}" | jq -r '.assets[]|select(.browser_download_url | contains("Linux-amd64")) | .browser_download_url')
+ remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '.tag_name')
if [ "${firstcommandname}" != "INSTALL" ]; then
fn_print_dots "Checking remote build: ${remotelocation}"
- # Checks if remotebuild variable has been set.
- if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then
+ # Checks if remotebuildversion variable has been set.
+ if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then
fn_print_fail "Checking remote build: ${remotelocation}"
fn_script_log_fatal "Checking remote build"
core_exit.sh
@@ -113,7 +49,7 @@ fn_update_mta_remotebuild() {
fi
else
# Checks if remotebuild variable has been set.
- if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then
+ if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then
fn_print_failure "Unable to get remote build"
fn_script_log_fatal "Unable to get remote build"
core_exit.sh
@@ -121,69 +57,96 @@ fn_update_mta_remotebuild() {
fi
}
-fn_update_mta_compare() {
- # Removes dots so if statement can compare version numbers.
+fn_update_compare() {
fn_print_dots "Checking for update: ${remotelocation}"
- localbuilddigit=$(echo -e "${localbuild}" | tr -cd '[:digit:]')
- remotebuilddigit=$(echo -e "${remotebuild}" | tr -cd '[:digit:]')
- if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ] || [ "${forceupdate}" == "1" ]; then
- fn_print_ok_nl "Checking for update: ${remotelocation}"
+ if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then
if [ "${forceupdate}" == "1" ]; then
# forceupdate bypasses checks, useful for small build changes
mtaupdatestatus="forced"
else
mtaupdatestatus="available"
fi
+ fn_print_ok_nl "Checking for update: ${remotelocation}"
echo -en "\n"
- echo -e "Update ${mtaupdatestatus}:"
+ echo -e "Update available"
echo -e "* Local build: ${red}${localbuild}${default}"
- echo -e "* Remote build: ${green}${remotebuild}${default}"
+ echo -e "* Remote build: ${green}${remotebuildversion}${default}"
+ if [ -n "${branch}" ]; then
+ echo -e "* Branch: ${branch}"
+ fi
+ if [ -f "${rootdir}/.dev-debug" ]; then
+ echo -e "Remote build info"
+ echo -e "* apiurl: ${apiurl}"
+ echo -e "* remotebuildfilename: ${remotebuildfilename}"
+ echo -e "* remotebuildurl: ${remotebuildurl}"
+ echo -e "* remotebuildversion: ${remotebuildversion}"
+ 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}"
+ fn_script_log_info "Remote build: ${remotebuildversion}"
+ if [ -n "${branch}" ]; then
+ fn_script_log_info "Branch: ${branch}"
+ fi
+ fn_script_log_info "${localbuild} > ${remotebuildversion}"
- unset updateonstart
- check_status.sh
- # If server stopped.
- if [ "${status}" == "0" ]; then
- exitbypass=1
- fn_update_mta_dl
- if [ "${requirerestart}" == "1" ]; then
+ if [ "${commandname}" == "UPDATE" ]; then
+ unset updateonstart
+ check_status.sh
+ # If server stopped.
+ if [ "${status}" == "0" ]; then
+ fn_update_dl
+ if [ "${localbuild}" == "0" ]; then
+ exitbypass=1
+ command_start.sh
+ fn_firstcommand_reset
+ exitbypass=1
+ sleep 5
+ command_stop.sh
+ fn_firstcommand_reset
+ fi
+ # If server started.
+ else
+ fn_print_restart_warning
exitbypass=1
- command_start.sh
+ command_stop.sh
fn_firstcommand_reset
exitbypass=1
- command_stop.sh
+ fn_update_dl
+ exitbypass=1
+ command_start.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_mta_dl
- exitbypass=1
- command_start.sh
- fn_firstcommand_reset
+ unset exitbypass
+ date +%s > "${lockdir}/lastupdate.lock"
+ alert="update"
+ elif [ "${commandname}" == "CHECK-UPDATE" ]; then
+ alert="check-update"
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}"
+ echo -e "* Remote build: ${green}${remotebuildversion}${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}"
+ fn_script_log_info "Remote build: ${remotebuildversion}"
+ if [ -n "${branch}" ]; then
+ fn_script_log_info "Branch: ${branch}"
+ fi
+ if [ -f "${rootdir}/.dev-debug" ]; then
+ echo -e "Remote build info"
+ echo -e "* apiurl: ${apiurl}"
+ echo -e "* remotebuildfilename: ${remotebuildfilename}"
+ echo -e "* remotebuildurl: ${remotebuildurl}"
+ echo -e "* remotebuildversion: ${remotebuildversion}"
+ fi
fi
}
@@ -191,13 +154,13 @@ fn_update_mta_compare() {
remotelocation="linux.mtasa.com"
if [ "${firstcommandname}" == "INSTALL" ]; then
- fn_update_mta_remotebuild
- fn_update_mta_dl
+ fn_update_remotebuild
+ fn_update_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_mta_localbuild
- fn_update_mta_remotebuild
- fn_update_mta_compare
+ fn_update_localbuild
+ fn_update_remotebuild
+ fn_update_compare
fi
diff --git a/lgsm/modules/update_papermc.sh b/lgsm/modules/update_papermc.sh
index 302e0baac..447f8808a 100644
--- a/lgsm/modules/update_papermc.sh
+++ b/lgsm/modules/update_papermc.sh
@@ -1,119 +1,171 @@
#!/bin/bash
-# LinuxGSM update_papermc.sh function
+# LinuxGSM update_papermc.sh module
# Author: Daniel Gibbs
# Contributors: http://linuxgsm.com/contrib
# Website: https://linuxgsm.com
# Description: Handles updating of PaperMC and Waterfall servers.
-commandname="UPDATE"
-commandaction="Update"
-function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+module_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_dl() {
+ # Download and extract files to serverfiles
+ fn_fetch_file "${remotebuildurl}" "" "" "" "${serverfiles}" "${executable#./}" "chmodx" "norun" "force" "${remotebuildhash}"
+ echo "${remotebuildversion}" > "${serverfiles}/build.txt"
}
-fn_update_papermc_localbuild() {
+fn_update_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
-
+ fn_print_dots "Checking local build: ${remotelocation}"
+ # Uses version file to get local build.
+ localbuild=$(head -n 1 "${serverfiles}/build.txt")
if [ -z "${localbuild}" ]; then
+ fn_print_error "Checking local build: ${remotelocation}: missing local build info"
+ fn_script_log_error "Missing local build info"
+ fn_script_log_error "Set localbuild to 0"
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_print_ok "Checking local build: ${remotelocation}"
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
+fn_update_remotebuild() {
+ # Get remote build info.
+ apiurl="https://papermc.io/api/v2/projects/"
+ # Get list of projects.
+ remotebuildresponse=$(curl -s "${apiurl}")
+ # Get list of Minecraft versions for project.
+ remotebuildresponseproject=$(curl -s "${apiurl}/${paperproject}")
+ # Get latest Minecraft: Java Edition version or user specified version.
+ if [ "${mcversion}" == "latest" ]; then
+ remotebuildmcversion=$(echo "${remotebuildresponseproject}" | jq -r '.versions[-1]')
else
- fn_print_ok "Got build for version ${paperversion}"
- fn_script_log "Got build for version ${paperversion}"
+ # Checks if user specified version exists.
+ remotebuildmcversion=$(echo "${remotebuildresponseproject}" | jq -r -e --arg mcversion "${mcversion}" '.versions[]|select(. == $mcversion)')
+ if [ -z "${remotebuildmcversion}" ]; 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
+ # Get list of paper builds for specific Minecraft: Java Edition version.
+ remotebuildresponsemcversion=$(curl -s "${apiurl}/paper/versions/${remotebuildmcversion}")
+ # Get latest paper build for specific Minecraft: Java Edition version.
+ remotebuildpaperversion=$(echo "${remotebuildresponsemcversion}" | jq -r '.builds[-1]')
+ # Get various info about the paper build.
+ remotebuildresponseversion=$(curl -s "${apiurl}/${paperproject}/versions/${remotebuildmcversion}/builds/${remotebuildpaperversion}")
+ remotebuildfilename=$(echo "${remotebuildresponseversion}" | jq -r '.downloads.application.name')
+ remotebuildhash=$(echo "${remotebuildresponseversion}" | jq -r '.downloads.application.sha256')
+ remotebuildurl="${apiurl}/${paperproject}/versions/${remotebuildmcversion}/builds/${remotebuildpaperversion}/downloads/${remotebuildfilename}"
+ # Combines Minecraft: Java Edition version and paper build. e.g 1.16.5-456
+ remotebuildversion="${remotebuildmcversion}-${remotebuildpaperversion}"
+
+ if [ "${firstcommandname}" != "INSTALL" ]; then
+ fn_print_dots "Checking remote build: ${remotelocation}"
+ # Checks if remotebuildversion variable has been set.
+ if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "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 "${remotebuildversion}" ] || [ "${remotebuildversion}" == "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_papermc_compare() {
+fn_update_compare() {
fn_print_dots "Checking for update: ${remotelocation}"
- sleep 0.5
- if [ "${localbuild}" != "${remotebuild}" ] || [ "${forceupdate}" == "1" ]; then
+ if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${forceupdate}" == "1" ]; then
fn_print_ok_nl "Checking for update: ${remotelocation}"
echo -en "\n"
- echo -e "Update available for version ${paperversion}"
+ echo -e "Update available"
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 -e "* Remote build: ${green}${remotebuildversion}${default}"
+ if [ -n "${branch}" ]; then
+ echo -e "* Branch: ${branch}"
+ fi
+ if [ -f "${rootdir}/.dev-debug" ]; then
+ echo -e "Remote build info"
+ echo -e "* apiurl: ${apiurl}"
+ echo -e "* remotebuildfilename: ${remotebuildfilename}"
+ echo -e "* remotebuildurl: ${remotebuildurl}"
+ echo -e "* remotebuildversion: ${remotebuildversion}"
+ fi
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
+ fn_script_log_info "Update available"
+ fn_script_log_info "Local build: ${localbuild}"
+ fn_script_log_info "Remote build: ${remotebuildversion}"
+ if [ -n "${branch}" ]; then
+ fn_script_log_info "Branch: ${branch}"
+ fi
+ fn_script_log_info "${localbuild} > ${remotebuildversion}"
+
+ if [ "${commandname}" == "UPDATE" ]; then
+ unset updateonstart
+ check_status.sh
+ # If server stopped.
+ if [ "${status}" == "0" ]; then
+ fn_update_dl
+ if [ "${localbuild}" == "0" ]; then
+ exitbypass=1
+ command_start.sh
+ fn_firstcommand_reset
+ exitbypass=1
+ sleep 5
+ 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_dl
+ exitbypass=1
+ command_start.sh
+ fn_firstcommand_reset
+ fi
+ unset exitbypass
+ date +%s > "${lockdir}/lastupdate.lock"
+ alert="update"
+ elif [ "${commandname}" == "CHECK-UPDATE" ]; then
+ alert="check-update"
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 "No update available"
echo -e "* Local build: ${green}${localbuild}${default}"
- echo -e "* Remote build: ${green}${remotebuild}${default}"
+ echo -e "* Remote build: ${green}${remotebuildversion}${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}"
+ fn_script_log_info "Remote build: ${remotebuildversion}"
+ if [ -n "${branch}" ]; then
+ fn_script_log_info "Branch: ${branch}"
+ fi
+ if [ -f "${rootdir}/.dev-debug" ]; then
+ echo -e "Remote build info"
+ echo -e "* apiurl: ${apiurl}"
+ echo -e "* remotebuildfilename: ${remotebuildfilename}"
+ echo -e "* remotebuildurl: ${remotebuildurl}"
+ echo -e "* remotebuildversion: ${remotebuildversion}"
+ fi
fi
}
@@ -128,35 +180,14 @@ 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
+ fn_update_remotebuild
+ fn_update_dl
else
+ fn_print_dots "Checking for update"
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
+ fn_update_localbuild
+ fn_update_remotebuild
+ fn_update_compare
fi
diff --git a/lgsm/modules/update_steamcmd.sh b/lgsm/modules/update_steamcmd.sh
index 85bacb899..401da43a8 100644
--- a/lgsm/modules/update_steamcmd.sh
+++ b/lgsm/modules/update_steamcmd.sh
@@ -5,7 +5,7 @@
# Website: https://linuxgsm.com
# Description: Handles updating using SteamCMD.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
# init steamcmd functions
core_steamcmd.sh
@@ -18,7 +18,7 @@ fn_print_dots "${remotelocation}"
if [ "${forceupdate}" == "1" ]; then
# forceupdate bypasses update checks.
- if [ "${status}" != "0" ]; then
+ if [ "${status}" != "0" ] && [ -v "${status}" ]; then
fn_print_restart_warning
exitbypass=1
command_stop.sh
diff --git a/lgsm/modules/update_ts3.sh b/lgsm/modules/update_ts3.sh
index be5c9e06f..dc79090ed 100644
--- a/lgsm/modules/update_ts3.sh
+++ b/lgsm/modules/update_ts3.sh
@@ -5,118 +5,50 @@
# Website: https://linuxgsm.com
# Description: Handles updating of Teamspeak 3 servers.
-functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
-fn_update_ts3_dl() {
- ts3latestdata=$(curl -s "https://www.${remotelocation}/versions/server.json" | jq '.linux')
- if [ "${ts3arch}" == "amd64" ]; then
- remotebuildurl=$(echo -e "${ts3latestdata}" | jq -r '.x86_64.mirrors."teamspeak.com"')
- remotehash=$(echo -e "${ts3latestdata}" | jq -r '.x86_64.checksum')
- elif [ "${ts3arch}" == "x86" ]; then
- remotebuildurl=$(echo -e "${ts3latestdata}" | jq -r '.x86.mirrors."teamspeak.com"')
- remotehash=$(echo -e "${ts3latestdata}" | jq -r '.x86.checksum')
- fi
- remotefile=$(basename "${remotebuildurl}")
- fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotefile}" "" "norun" "noforce" "${remotehash}"
- fn_dl_extract "${tmpdir}" "${remotefile}" "${tmpdir}"
- echo -e "copying to ${serverfiles}...\c"
- cp -R "${tmpdir}/teamspeak3-server_linux_${ts3arch}/"* "${serverfiles}"
- local exitcode=$?
- if [ "${exitcode}" == "0" ]; then
- fn_print_ok_eol_nl
- fn_script_log_pass "Copying to ${serverfiles}"
- fn_clear_tmp
- else
- fn_print_fail_eol_nl
- fn_script_log_fatal "Copying to ${serverfiles}"
- fn_clear_tmp
- core_exit.sh
- fi
+fn_update_dl() {
+ # Download and extract files to serverfiles
+ fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "${remotebuildhash}"
+ fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}" "teamspeak3-server_linux_${ts3arch}"
+ fn_clear_tmp
}
-fn_update_ts3_localbuild() {
+fn_update_localbuild() {
# Gets local build info.
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"
- fn_print_info_nl "Checking local build: ${remotelocation}: forcing server restart"
- fn_script_log_error "No log files containing version info"
- fn_script_log_info "Forcing server restart"
- exitbypass=1
- command_stop.sh
- exitbypass=1
- command_start.sh
- fn_firstcommand_reset
- totalseconds=0
- # Check again, allow time to generate logs.
- while [ ! -d "${serverfiles}/logs" ] || [ -z "$(find "${serverfiles}/logs/"* -name 'ts3server*_0.log' 2> /dev/null)" ]; do
- sleep 1
- fn_print_info "Checking local build: ${remotelocation}: waiting for log file: ${totalseconds}"
- if [ -v "${loopignore}" ]; then
- loopignore=1
- fn_script_log_info "Waiting for log file to generate"
- fi
-
- if [ "${totalseconds}" -gt "120" ]; then
- localbuild="0"
- fn_print_error "Checking local build: ${remotelocation}: waiting for log file: missing log file"
- fn_script_log_error "Missing log file"
- fn_script_log_error "Set localbuild to 0"
- fi
-
- totalseconds=$((totalseconds + 1))
- done
- fi
-
- if [ -z "${localbuild}" ]; then
- localbuild=$(cat "$(find ./* -name "ts3server*_0.log" 2> /dev/null | sort | tail -1)" | grep -Eo "TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" | grep -Eo "((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" | tail -1)
- fi
-
- if [ -z "${localbuild}" ]; then
- # Gives time for var to generate.
- totalseconds=0
- for seconds in {1..120}; do
- fn_print_info "Checking local build: ${remotelocation}: waiting for local build: ${totalseconds}"
- if [ -z "${loopignore}" ]; then
- loopignore=1
- fn_script_log_info "Waiting for local build to generate"
- fi
- localbuild=$(cat "$(find ./* -name "ts3server*_0.log" 2> /dev/null | sort | tail -1)" | grep -Eo "TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" | grep -Eo "((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" | tail -1)
- if [ "${localbuild}" ] || [ "${seconds}" == "120" ]; then
- break
- fi
- sleep 1
- totalseconds=$((totalseconds + 1))
- done
- fi
-
+ # Uses log file to get local build.
+ localbuild=$(grep -Eo "TeamSpeak 3 Server ((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" "$(find ./* -name "ts3server*_0.log" 2> /dev/null | sort | tail -1)" | grep -Eo "((\.)?[0-9]{1,3}){1,3}\.[0-9]{1,3}" | tail -1)
if [ -z "${localbuild}" ]; then
- localbuild="0"
- fn_print_error "Checking local build: ${remotelocation}: waiting for local build: missing local build info"
+ fn_print_error "Checking local build: ${remotelocation}: missing local build info"
fn_script_log_error "Missing local build info"
fn_script_log_error "Set localbuild to 0"
+ localbuild="0"
else
fn_print_ok "Checking local build: ${remotelocation}"
fn_script_log_pass "Checking local build"
fi
}
-fn_update_ts3_remotebuild() {
- # Gets remote build info.
- ts3latestdata=$(curl -s "https://www.${remotelocation}/versions/server.json" | jq '.linux')
+fn_update_remotebuild() {
+ # Get remote build info.
+ apiurl="https://www.teamspeak.com/versions/server.json"
+ remotebuildresponse=$(curl -s "${apiurl}")
+
if [ "${ts3arch}" == "amd64" ]; then
- remotebuild=$(echo -e "${ts3latestdata}" | jq -r '.x86_64.version')
+ remotebuildurl=$(echo -e "${remotebuildresponse}" | jq -r '.linux.x86_64.mirrors."teamspeak.com"')
+ remotebuildhash=$(echo -e "${remotebuildresponse}" | jq -r '.linux.x86_64.checksum')
elif [ "${ts3arch}" == "x86" ]; then
- remotebuild=$(echo -e "${ts3latestdata}" | jq -r '.x86.version')
+ remotebuildurl=$(echo -e "${remotebuildresponse}" | jq -r '.linux.x86.mirrors."teamspeak.com"')
+ remotebuildhash=$(echo -e "${remotebuildresponse}" | jq -r '.linux.x86.checksum')
fi
+ remotebuildfilename=$(basename "${remotebuildurl}")
+ remotebuildversion=$(echo -e "${remotebuildresponse}" | jq -r '.linux.x86_64.version')
+
if [ "${firstcommandname}" != "INSTALL" ]; then
fn_print_dots "Checking remote build: ${remotelocation}"
- # Checks if remotebuild variable has been set.
- if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then
+ # Checks if remotebuildversion variable has been set.
+ if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then
fn_print_fail "Checking remote build: ${remotelocation}"
fn_script_log_fatal "Checking remote build"
core_exit.sh
@@ -126,7 +58,7 @@ fn_update_ts3_remotebuild() {
fi
else
# Checks if remotebuild variable has been set.
- if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then
+ if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then
fn_print_failure "Unable to get remote build"
fn_script_log_fatal "Unable to get remote build"
core_exit.sh
@@ -134,34 +66,45 @@ fn_update_ts3_remotebuild() {
fi
}
-fn_update_ts3_compare() {
- # Removes dots so if statement can compare version numbers.
+fn_update_compare() {
fn_print_dots "Checking for update: ${remotelocation}"
- localbuilddigit=$(echo -e "${localbuild}" | tr -cd '[:digit:]')
- remotebuilddigit=$(echo -e "${remotebuild}" | tr -cd '[:digit:]')
- if [ "${localbuilddigit}" -ne "${remotebuilddigit}" ] || [ "${forceupdate}" == "1" ]; then
+ if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${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}"
+ echo -e "* Remote build: ${green}${remotebuildversion}${default}"
+ if [ -n "${branch}" ]; then
+ echo -e "* Branch: ${branch}"
+ fi
+ if [ -f "${rootdir}/.dev-debug" ]; then
+ echo -e "Remote build info"
+ echo -e "* apiurl: ${apiurl}"
+ echo -e "* remotebuildfilename: ${remotebuildfilename}"
+ echo -e "* remotebuildurl: ${remotebuildurl}"
+ echo -e "* remotebuildversion: ${remotebuildversion}"
+ 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}"
+ fn_script_log_info "Remote build: ${remotebuildversion}"
+ if [ -n "${branch}" ]; then
+ fn_script_log_info "Branch: ${branch}"
+ fi
+ fn_script_log_info "${localbuild} > ${remotebuildversion}"
if [ "${commandname}" == "UPDATE" ]; then
unset updateonstart
check_status.sh
# If server stopped.
if [ "${status}" == "0" ]; then
- exitbypass=1
- fn_update_ts3_dl
- if [ "${requirerestart}" == "1" ]; then
+ fn_update_dl
+ if [ "${localbuild}" == "0" ]; then
exitbypass=1
command_start.sh
fn_firstcommand_reset
exitbypass=1
+ sleep 5
command_stop.sh
fn_firstcommand_reset
fi
@@ -172,7 +115,7 @@ fn_update_ts3_compare() {
command_stop.sh
fn_firstcommand_reset
exitbypass=1
- fn_update_ts3_dl
+ fn_update_dl
exitbypass=1
command_start.sh
fn_firstcommand_reset
@@ -189,11 +132,24 @@ fn_update_ts3_compare() {
echo -en "\n"
echo -e "No update available"
echo -e "* Local build: ${green}${localbuild}${default}"
- echo -e "* Remote build: ${green}${remotebuild}${default}"
+ echo -e "* Remote build: ${green}${remotebuildversion}${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}"
+ fn_script_log_info "Remote build: ${remotebuildversion}"
+ if [ -n "${branch}" ]; then
+ fn_script_log_info "Branch: ${branch}"
+ fi
+ if [ -f "${rootdir}/.dev-debug" ]; then
+ echo -e "Remote build info"
+ echo -e "* apiurl: ${apiurl}"
+ echo -e "* remotebuildfilename: ${remotebuildfilename}"
+ echo -e "* remotebuildurl: ${remotebuildurl}"
+ echo -e "* remotebuildversion: ${remotebuildversion}"
+ fi
fi
}
@@ -213,13 +169,13 @@ fi
remotelocation="teamspeak.com"
if [ "${firstcommandname}" == "INSTALL" ]; then
- fn_update_ts3_remotebuild
- fn_update_ts3_dl
+ fn_update_remotebuild
+ fn_update_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_ts3_localbuild
- fn_update_ts3_remotebuild
- fn_update_ts3_compare
+ fn_update_localbuild
+ fn_update_remotebuild
+ fn_update_compare
fi
diff --git a/lgsm/modules/update_ut99.sh b/lgsm/modules/update_ut99.sh
new file mode 100644
index 000000000..a1dc2b3dd
--- /dev/null
+++ b/lgsm/modules/update_ut99.sh
@@ -0,0 +1,163 @@
+#!/bin/bash
+# LinuxGSM command_ut99.sh module
+# Author: Daniel Gibbs
+# Contributors: http://linuxgsm.com/contrib
+# Website: https://linuxgsm.com
+# Description: Handles updating of Unreal Tournament 99 servers.
+
+module_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+
+fn_update_dl() {
+ # Download and extract files to serverfiles
+ fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "nohash"
+ fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}"
+ echo "${remotebuildversion}" > "${serverfiles}/build.txt"
+ fn_clear_tmp
+}
+
+fn_update_localbuild() {
+ # Gets local build info.
+ fn_print_dots "Checking local build: ${remotelocation}"
+ # Uses build file to get local build.
+ localbuild=$(head -n 1 "${serverfiles}/build.txt")
+ if [ -z "${localbuild}" ]; then
+ fn_print_error "Checking local build: ${remotelocation}: missing local build info"
+ fn_script_log_error "Missing local build info"
+ fn_script_log_error "Set localbuild to 0"
+ localbuild="0"
+ else
+ fn_print_ok "Checking local build: ${remotelocation}"
+ fn_script_log_pass "Checking local build"
+ fi
+}
+
+fn_update_remotebuild() {
+ # Get remote build info.
+ apiurl="https://api.github.com/repos/OldUnreal/UnrealTournamentPatches/releases/latest"
+ remotebuildresponse=$(curl -s "${apiurl}")
+ remotebuildfilename=$(echo "${remotebuildresponse}" | jq -r '.assets[]|select(.browser_download_url | contains("Linux-amd64")) | .name')
+ remotebuildurl=$(echo "${remotebuildresponse}" | jq -r '.assets[]|select(.browser_download_url | contains("Linux-amd64")) | .browser_download_url')
+ remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '.tag_name')
+
+ if [ "${firstcommandname}" != "INSTALL" ]; then
+ fn_print_dots "Checking remote build: ${remotelocation}"
+ # Checks if remotebuildversion variable has been set.
+ if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "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 "${remotebuildversion}" ] || [ "${remotebuildversion}" == "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_compare() {
+ fn_print_dots "Checking for update: ${remotelocation}"
+ if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${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}${remotebuildversion}${default}"
+ if [ -n "${branch}" ]; then
+ echo -e "* Branch: ${branch}"
+ fi
+ if [ -f "${rootdir}/.dev-debug" ]; then
+ echo -e "Remote build info"
+ echo -e "* apiurl: ${apiurl}"
+ echo -e "* remotebuildfilename: ${remotebuildfilename}"
+ echo -e "* remotebuildurl: ${remotebuildurl}"
+ echo -e "* remotebuildversion: ${remotebuildversion}"
+ fi
+ echo -en "\n"
+ fn_script_log_info "Update available"
+ fn_script_log_info "Local build: ${localbuild}"
+ fn_script_log_info "Remote build: ${remotebuildversion}"
+ if [ -n "${branch}" ]; then
+ fn_script_log_info "Branch: ${branch}"
+ fi
+ fn_script_log_info "${localbuild} > ${remotebuildversion}"
+
+ if [ "${commandname}" == "UPDATE" ]; then
+ unset updateonstart
+ check_status.sh
+ # If server stopped.
+ if [ "${status}" == "0" ]; then
+ fn_update_dl
+ if [ "${localbuild}" == "0" ]; then
+ exitbypass=1
+ command_start.sh
+ fn_firstcommand_reset
+ exitbypass=1
+ sleep 5
+ 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_dl
+ exitbypass=1
+ command_start.sh
+ fn_firstcommand_reset
+ fi
+ unset exitbypass
+ 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}${remotebuildversion}${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: ${remotebuildversion}"
+ if [ -n "${branch}" ]; then
+ fn_script_log_info "Branch: ${branch}"
+ fi
+ if [ -f "${rootdir}/.dev-debug" ]; then
+ echo -e "Remote build info"
+ echo -e "* apiurl: ${apiurl}"
+ echo -e "* remotebuildfilename: ${remotebuildfilename}"
+ echo -e "* remotebuildurl: ${remotebuildurl}"
+ echo -e "* remotebuildversion: ${remotebuildversion}"
+ fi
+ fi
+}
+
+# The location where the builds are checked and downloaded.
+remotelocation="github.com"
+
+if [ "${firstcommandname}" == "INSTALL" ]; then
+ fn_update_remotebuild
+ fn_update_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_localbuild
+ fn_update_remotebuild
+ fn_update_compare
+fi
diff --git a/lgsm/modules/update_vintagestory.sh b/lgsm/modules/update_vintagestory.sh
old mode 100755
new mode 100644
index 905384922..946b6ed0b
--- a/lgsm/modules/update_vintagestory.sh
+++ b/lgsm/modules/update_vintagestory.sh
@@ -5,48 +5,51 @@
# 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')
+moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
+fn_update_dl() {
# Download and extract files to serverfiles
- fn_fetch_file "${remotebuildlink}" "" "" "" "${tmpdir}" "${remotebuildfile}" "nochmodx" "norun" "force" "${remotebuildmd5}"
- fn_dl_extract "${tmpdir}" "${remotebuildfile}" "${serverfiles}"
+ fn_fetch_file "${remotebuildurl}" "" "" "" "${tmpdir}" "${remotebuildfilename}" "nochmodx" "norun" "force" "${remotebuildhash}"
+ fn_dl_extract "${tmpdir}" "${remotebuildfilename}" "${serverfiles}"
fn_clear_tmp
}
-fn_update_vs_localbuild() {
+fn_update_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
+ # Uses executable to get local build.
+ if [ -d "${exutabledir}" ]; then
+ cd "${executabledir}" || exit
localbuild="$(${preexecutable} ${executable} --version | sed '/^[[:space:]]*$/d')"
+ fi
+ if [ -z "${localbuild}" ]; then
+ fn_print_error "Checking local build: ${remotelocation}: missing local build info"
+ fn_script_log_error "Missing local build info"
+ fn_script_log_error "Set localbuild to 0"
+ localbuild="0"
+ else
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() {
+fn_update_remotebuild() {
+ # Get remote build info.
+ apiurl="http://api.vintagestory.at/stable-unstable.json"
+ remotebuildresponse=$(curl -s "${apiurl}")
if [ "${branch}" == "stable" ]; then
- remotebuild=$(curl -s "${apiurl}" | jq -r '[ to_entries[] ] | .[].key' | grep -Ev "\-rc|\-pre" | sort -r -V | head -1)
+ remotebuildversion=$(echo "${remotebuildresponse}" | 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)
+ remotebuildversion=$(echo "${remotebuildresponse}" | jq -r '[ to_entries[] ] | .[].key' | grep -E "\-rc|\-pre" | sort -r -V | head -1)
fi
+ remotebuildfilename=$(echo "${remotebuildresponse}" | jq --arg remotebuildversion "${remotebuildversion}" -r '.[$remotebuildversion].server.filename')
+ remotebuildurl=$(echo "${remotebuildresponse}" | jq --arg remotebuildversion "${remotebuildversion}" -r '.[$remotebuildversion].server.urls.cdn')
+ remotebuildhash=$(echo "${remotebuildresponse}" | jq --arg remotebuildversion "${remotebuildversion}" -r '.[$remotebuildversion].server.md5')
if [ "${firstcommandname}" != "INSTALL" ]; then
fn_print_dots "Checking remote build: ${remotelocation}"
- # Checks if remotebuild variable has been set.
- if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then
+ # Checks if remotebuildversion variable has been set.
+ if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then
fn_print_fail "Checking remote build: ${remotelocation}"
fn_script_log_fatal "Checking remote build"
core_exit.sh
@@ -56,7 +59,7 @@ fn_update_vs_remotebuild() {
fi
else
# Checks if remotebuild variable has been set.
- if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ]; then
+ if [ -z "${remotebuildversion}" ] || [ "${remotebuildversion}" == "null" ]; then
fn_print_failure "Unable to get remote build"
fn_script_log_fatal "Unable to get remote build"
core_exit.sh
@@ -64,85 +67,104 @@ fn_update_vs_remotebuild() {
fi
}
-fn_update_vs_compare() {
- # Removes dots so if statement can compare version numbers.
+fn_update_compare() {
fn_print_dots "Checking for update: ${remotelocation}"
- if [ "${localbuild}" != "${remotebuild}" ] || [ "${forceupdate}" == "1" ]; then
+ if [ "${localbuild}" != "${remotebuildversion}" ] || [ "${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}"
+ echo -e "* Remote build: ${green}${remotebuildversion}${default}"
if [ -n "${branch}" ]; then
echo -e "* Branch: ${branch}"
fi
+ if [ -f "${rootdir}/.dev-debug" ]; then
+ echo -e "Remote build info"
+ echo -e "* apiurl: ${apiurl}"
+ echo -e "* remotebuildfilename: ${remotebuildfilename}"
+ echo -e "* remotebuildurl: ${remotebuildurl}"
+ echo -e "* remotebuildversion: ${remotebuildversion}"
+ 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}"
+ fn_script_log_info "Remote build: ${remotebuildversion}"
+ if [ -n "${branch}" ]; then
+ fn_script_log_info "Branch: ${branch}"
+ fi
+ fn_script_log_info "${localbuild} > ${remotebuildversion}"
- unset updateonstart
- check_status.sh
- # If server stopped.
- if [ "${status}" == "0" ]; then
- exitbypass=1
- fn_update_vs_dl
- if [ "${requirerestart}" == "1" ]; then
+ if [ "${commandname}" == "UPDATE" ]; then
+ unset updateonstart
+ check_status.sh
+ # If server stopped.
+ if [ "${status}" == "0" ]; then
+ fn_update_dl
+ if [ "${localbuild}" == "0" ]; then
+ exitbypass=1
+ command_start.sh
+ fn_firstcommand_reset
+ exitbypass=1
+ sleep 5
+ command_stop.sh
+ fn_firstcommand_reset
+ fi
+ # If server started.
+ else
+ fn_print_restart_warning
exitbypass=1
- command_start.sh
+ command_stop.sh
fn_firstcommand_reset
exitbypass=1
- command_stop.sh
+ fn_update_dl
+ exitbypass=1
+ command_start.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
+ unset exitbypass
+ date +%s > "${lockdir}/lastupdate.lock"
+ alert="update"
+ elif [ "${commandname}" == "CHECK-UPDATE" ]; then
+ alert="check-update"
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}"
+ echo -e "* Remote build: ${green}${remotebuildversion}${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}"
+ fn_script_log_info "Remote build: ${remotebuildversion}"
if [ -n "${branch}" ]; then
fn_script_log_info "Branch: ${branch}"
fi
+ if [ -f "${rootdir}/.dev-debug" ]; then
+ echo -e "Remote build info"
+ echo -e "* apiurl: ${apiurl}"
+ echo -e "* remotebuildfilename: ${remotebuildfilename}"
+ echo -e "* remotebuildurl: ${remotebuildurl}"
+ echo -e "* remotebuildversion: ${remotebuildversion}"
+ 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
+ fn_update_remotebuild
+ fn_update_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
+ fn_update_localbuild
+ fn_update_remotebuild
+ fn_update_compare
fi
diff --git a/linuxgsm.sh b/linuxgsm.sh
index 3e4812439..dd7d51bb3 100755
--- a/linuxgsm.sh
+++ b/linuxgsm.sh
@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x
fi
-version="v23.1.0"
+version="v23.2.0"
shortname="core"
gameservername="core"
commandname="CORE"
@@ -32,7 +32,7 @@ logdir="${rootdir}/log"
lgsmlogdir="${logdir}/lgsm"
steamcmddir="${HOME}/.steam/steamcmd"
serverfiles="${rootdir}/serverfiles"
-functionsdir="${lgsmdir}/functions"
+modulesdir="${lgsmdir}/modules"
tmpdir="${lgsmdir}/tmp"
datadir="${lgsmdir}/data"
lockdir="${lgsmdir}/lock"
@@ -57,14 +57,14 @@ if [ ! "$(command -v curl 2> /dev/null)" ]; then
exit 1
fi
-# Core function that is required first.
-core_functions.sh() {
- functionfile="${FUNCNAME[0]}"
- fn_bootstrap_fetch_file_github "lgsm/functions" "core_functions.sh" "${functionsdir}" "chmodx" "run" "noforcedl" "nomd5"
+# Core module that is required first.
+core_modules.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_bootstrap_fetch_file_github "lgsm/modules" "core_modules.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nomd5"
}
# Bootstrap
-# Fetches the core functions required before passed off to core_dl.sh.
+# Fetches the core modules required before passed off to core_dl.sh.
fn_bootstrap_fetch_file() {
remote_fileurl="${1}"
remote_fileurl_backup="${2}"
@@ -183,7 +183,7 @@ fn_bootstrap_fetch_file_github() {
run="${5:-0}"
forcedl="${6:-0}"
md5="${7:-0}"
- # Passes vars to the file download function.
+ # Passes vars to the file download module.
fn_bootstrap_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}"
}
@@ -327,11 +327,11 @@ if [ "$(whoami)" == "root" ] && [ ! -f /.dockerenv ]; then
echo -e "[ FAIL ] Do NOT run this script as root!"
exit 1
fi
- elif [ ! -f "${functionsdir}/core_functions.sh" ] || [ ! -f "${functionsdir}/check_root.sh" ] || [ ! -f "${functionsdir}/core_messages.sh" ]; then
+ elif [ ! -f "${modulesdir}/core_modules.sh" ] || [ ! -f "${modulesdir}/check_root.sh" ] || [ ! -f "${modulesdir}/core_messages.sh" ]; then
echo -e "[ FAIL ] Do NOT run this script as root!"
exit 1
else
- core_functions.sh
+ core_modules.sh
check_root.sh
fi
fi
@@ -377,7 +377,7 @@ if [ "${shortname}" == "core" ]; then
# LinuxGSM server mode.
else
- core_functions.sh
+ core_modules.sh
if [ "${shortname}" != "core-dep" ]; then
# Load LinuxGSM configs.
# These are required to get all the default variables for the specific server.
@@ -397,8 +397,8 @@ else
echo -e "OK"
fi
else
- function_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg")
- if [ "${function_file_diff}" != "" ]; then
+ config_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg")
+ if [ "${config_file_diff}" != "" ]; then
fn_print_warn_nl "_default.cfg has altered. reloading config."
echo -en "copying _default.cfg...\c"
cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg"
diff --git a/tests/tests_fctrserver.sh b/tests/tests_fctrserver.sh
index 11ed61f93..97981c0cc 100644
--- a/tests/tests_fctrserver.sh
+++ b/tests/tests_fctrserver.sh
@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x
fi
-version="v23.1.0"
+version="v23.2.0"
shortname="fctr"
gameservername="fctrserver"
commandname="CORE"
@@ -32,7 +32,7 @@ logdir="${rootdir}/log"
lgsmlogdir="${logdir}/lgsm"
steamcmddir="${HOME}/.steam/steamcmd"
serverfiles="${rootdir}/serverfiles"
-functionsdir="${lgsmdir}/functions"
+modulesdir="${lgsmdir}/modules"
tmpdir="${lgsmdir}/tmp"
datadir="${lgsmdir}/data"
lockdir="${lgsmdir}/lock"
@@ -51,20 +51,20 @@ if [ -z "${TRAVIS}" ]; then
fi
travistest="1"
## GitHub Branch Select
-# Allows for the use of different function files
+# Allows for the use of different module files
# from a different repo and/or branch.
githubuser="GameServerManagers"
githubrepo="LinuxGSM"
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"
+# Core module that is required first.
+core_modules.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_bootstrap_fetch_file_github "lgsm/modules" "core_modules.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash"
}
# Bootstrap
-# Fetches the core functions required before passed off to core_dl.sh.
+# Fetches the core modules required before passed off to core_dl.sh.
fn_bootstrap_fetch_file() {
remote_fileurl="${1}"
remote_fileurl_backup="${2}"
@@ -168,7 +168,7 @@ fn_bootstrap_fetch_file_github() {
github_file_url_dir="${1}"
github_file_url_name="${2}"
# If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork.
- if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then
+ if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}"
else
@@ -183,7 +183,7 @@ fn_bootstrap_fetch_file_github() {
run="${5:-0}"
forcedl="${6:-0}"
md5="${7:-0}"
- # Passes vars to the file download function.
+ # Passes vars to the file download module.
fn_bootstrap_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}"
}
@@ -327,11 +327,11 @@ if [ "$(whoami)" == "root" ]; then
echo -e "[ FAIL ] Do NOT run this script as root!"
exit 1
fi
- elif [ ! -f "${functionsdir}/core_functions.sh" ] || [ ! -f "${functionsdir}/check_root.sh" ] || [ ! -f "${functionsdir}/core_messages.sh" ]; then
+ elif [ ! -f "${modulesdir}/core_modules.sh" ] || [ ! -f "${modulesdir}/check_root.sh" ] || [ ! -f "${modulesdir}/core_messages.sh" ]; then
echo -e "[ FAIL ] Do NOT run this script as root!"
exit 1
else
- core_functions.sh
+ core_modules.sh
check_root.sh
fi
fi
@@ -377,7 +377,7 @@ if [ "${shortname}" == "core" ]; then
# LinuxGSM server mode.
else
- core_functions.sh
+ core_modules.sh
if [ "${shortname}" != "core-dep" ]; then
# Load LinuxGSM configs.
# These are required to get all the default variables for the specific server.
@@ -398,8 +398,8 @@ else
echo -e "OK"
fi
else
- function_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg")
- if [ "${function_file_diff}" != "" ]; then
+ module_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg")
+ if [ "${module_file_diff}" != "" ]; then
fn_print_warn_nl "_default.cfg has been altered. reloading config."
echo -en "copying _default.cfg...\c"
cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg"
@@ -614,8 +614,8 @@ echo -e "8.3 - dev - detect deps"
echo -e "8.4 - dev - query-raw"
echo -e ""
-echo -e "9.0 - Donate"
-echo -e "9.1 - donate"
+echo -e "9.0 - Sponsor"
+echo -e "9.1 - sponsor"
echo -e ""
echo -e "0.0 - Pre-test Tasks"
@@ -636,7 +636,7 @@ echo -e ""
)
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "0.2 - Enable dev-debug"
@@ -653,7 +653,7 @@ echo -e ""
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "1.0 - Pre-install tests"
@@ -681,7 +681,7 @@ fi
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "1.2 - getopt"
@@ -699,7 +699,7 @@ echo -e ""
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "1.3 - getopt with incorrect args"
@@ -718,7 +718,7 @@ getopt="abc123"
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "2.0 - Installation"
@@ -739,7 +739,7 @@ echo -e "Command: ./${gameservername} auto-install"
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "3.0 - Start/Stop/Restart Tests"
@@ -762,7 +762,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "3.2 - start - online"
@@ -781,7 +781,7 @@ fn_setstatus
fn_test_result_fail
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "3.3 - start - updateonstart"
@@ -801,7 +801,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "3.4 - stop"
@@ -820,7 +820,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "3.5 - stop - offline"
@@ -839,7 +839,7 @@ fn_setstatus
fn_test_result_fail
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "3.6 - restart"
@@ -858,7 +858,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "3.7 - restart - offline"
@@ -877,7 +877,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "4.0 - Update Tests"
@@ -900,7 +900,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "4.2 - update-lgsm"
@@ -920,7 +920,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "5.0 - Monitor Tests"
@@ -947,7 +947,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "5.2 - monitor - offline - with lockfile"
@@ -970,7 +970,7 @@ echo "${port}" >> "${lockdir}/${selfname}.lock"
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "5.3 - monitor - offline - no lockfile"
@@ -989,7 +989,7 @@ fn_setstatus
fn_test_result_fail
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "5.4 - test-alert"
@@ -1008,7 +1008,7 @@ fn_setstatus
fn_test_result_fail
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "6.0 - Details Tests"
@@ -1031,7 +1031,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "6.2 - postdetails"
@@ -1050,7 +1050,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "7.0 - Backup Tests"
@@ -1069,7 +1069,7 @@ echo -e "test de-activated until issue #1839 fixed"
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "8.0 - Development Tools Tests"
@@ -1092,7 +1092,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "8.2 - dev - detect ldd"
@@ -1111,7 +1111,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "8.3 - dev - detect deps"
@@ -1130,7 +1130,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "8.4 - dev - query-raw"
@@ -1149,31 +1149,31 @@ fn_setstatus
fn_test_result_na
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
-echo -e "9.0 - Donate"
+echo -e "9.0 - Sponsor"
echo -e "=================================================================="
echo -e ""
-echo -e "9.1 - donate"
+echo -e "9.1 - sponsor"
echo -e "================================="
echo -e "Description:"
-echo -e "donate."
-echo -e "Command: ./${gameservername} donate"
+echo -e "sponsor."
+echo -e "Command: ./${gameservername} sponsor"
requiredstatus="STARTED"
fn_setstatus
(
exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
- command_donate.sh
+ command_sponsor.sh
)
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "================================="
diff --git a/tests/tests_jc2server.sh b/tests/tests_jc2server.sh
index 5e0158b7a..57dd28cc8 100644
--- a/tests/tests_jc2server.sh
+++ b/tests/tests_jc2server.sh
@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x
fi
-version="v23.1.0"
+version="v23.2.0"
shortname="jc2"
gameservername="jc2server"
commandname="CORE"
@@ -32,7 +32,7 @@ logdir="${rootdir}/log"
lgsmlogdir="${logdir}/lgsm"
steamcmddir="${HOME}/.steam/steamcmd"
serverfiles="${rootdir}/serverfiles"
-functionsdir="${lgsmdir}/functions"
+modulesdir="${lgsmdir}/modules"
tmpdir="${lgsmdir}/tmp"
datadir="${lgsmdir}/data"
lockdir="${lgsmdir}/lock"
@@ -52,20 +52,20 @@ fi
travistest="1"
## GitHub Branch Select
-# Allows for the use of different function files
+# Allows for the use of different module files
# from a different repo and/or branch.
githubuser="GameServerManagers"
githubrepo="LinuxGSM"
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"
+# Core module that is required first.
+core_modules.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_bootstrap_fetch_file_github "lgsm/modules" "core_modules.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash"
}
# Bootstrap
-# Fetches the core functions required before passed off to core_dl.sh.
+# Fetches the core modules required before passed off to core_dl.sh.
fn_bootstrap_fetch_file() {
remote_fileurl="${1}"
remote_fileurl_backup="${2}"
@@ -169,7 +169,7 @@ fn_bootstrap_fetch_file_github() {
github_file_url_dir="${1}"
github_file_url_name="${2}"
# If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork.
- if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then
+ if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}"
else
@@ -184,7 +184,7 @@ fn_bootstrap_fetch_file_github() {
run="${5:-0}"
forcedl="${6:-0}"
md5="${7:-0}"
- # Passes vars to the file download function.
+ # Passes vars to the file download module.
fn_bootstrap_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}"
}
@@ -328,11 +328,11 @@ if [ "$(whoami)" == "root" ]; then
echo -e "[ FAIL ] Do NOT run this script as root!"
exit 1
fi
- elif [ ! -f "${functionsdir}/core_functions.sh" ] || [ ! -f "${functionsdir}/check_root.sh" ] || [ ! -f "${functionsdir}/core_messages.sh" ]; then
+ elif [ ! -f "${modulesdir}/core_modules.sh" ] || [ ! -f "${modulesdir}/check_root.sh" ] || [ ! -f "${modulesdir}/core_messages.sh" ]; then
echo -e "[ FAIL ] Do NOT run this script as root!"
exit 1
else
- core_functions.sh
+ core_modules.sh
check_root.sh
fi
fi
@@ -378,7 +378,7 @@ if [ "${shortname}" == "core" ]; then
# LinuxGSM server mode.
else
- core_functions.sh
+ core_modules.sh
if [ "${shortname}" != "core-dep" ]; then
# Load LinuxGSM configs.
# These are required to get all the default variables for the specific server.
@@ -399,8 +399,8 @@ else
echo -e "OK"
fi
else
- function_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg")
- if [ "${function_file_diff}" != "" ]; then
+ module_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg")
+ if [ "${module_file_diff}" != "" ]; then
fn_print_warn_nl "_default.cfg has been altered. reloading config."
echo -en "copying _default.cfg...\c"
cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg"
@@ -620,8 +620,8 @@ echo -e "8.2 - dev - detect ldd"
echo -e "8.3 - dev - detect deps"
echo -e "8.4 - dev - query-raw"
echo -e ""
-echo -e "9.0 - Donate"
-echo -e "9.1 - donate"
+echo -e "9.0 - Sponsor"
+echo -e "9.1 - sponsor"
echo -e ""
echo -e "0.0 - Pre-test Tasks"
echo -e "=================================================================="
@@ -641,7 +641,7 @@ echo -e ""
)
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "0.2 - Enable dev-debug"
@@ -658,7 +658,7 @@ echo -e ""
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "1.0 - Pre-install tests"
@@ -686,7 +686,7 @@ fi
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "1.2 - getopt"
@@ -704,7 +704,7 @@ echo -e ""
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "1.3 - getopt with incorrect args"
@@ -723,7 +723,7 @@ getopt="abc123"
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "2.0 - Installation"
@@ -744,7 +744,7 @@ echo -e "Command: ./${gameservername} auto-install"
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "3.0 - Start/Stop/Restart Tests"
@@ -767,7 +767,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "3.2 - start - online"
@@ -786,7 +786,7 @@ fn_setstatus
fn_test_result_fail
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "3.3 - start - updateonstart"
@@ -806,7 +806,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "3.4 - stop"
@@ -825,7 +825,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "3.5 - stop - offline"
@@ -844,7 +844,7 @@ fn_setstatus
fn_test_result_fail
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "3.6 - restart"
@@ -863,7 +863,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "3.7 - restart - offline"
@@ -882,7 +882,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "4.0 - Update Tests"
@@ -905,7 +905,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "4.2 - update - change buildid"
@@ -926,7 +926,7 @@ sed -i 's/[0-9]\+/0/' "${serverfiles}/steamapps/appmanifest_${appid}.acf"
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "4.3 - update - change buildid - online"
@@ -947,7 +947,7 @@ sed -i 's/[0-9]\+/0/' "${serverfiles}/steamapps/appmanifest_${appid}.acf"
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "4.4 - update - remove appmanifest file"
@@ -968,7 +968,7 @@ rm --verbose "${serverfiles:?}/steamapps/appmanifest_${appid}.acf"
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "4.5 - force-update"
@@ -988,7 +988,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "4.6 - force-update - online"
@@ -1008,7 +1008,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "4.7 - validate"
@@ -1027,7 +1027,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "4.8 - validate - online"
@@ -1047,7 +1047,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "4.9 - update-lgsm"
@@ -1067,7 +1067,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "Inserting IP address"
@@ -1108,7 +1108,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "5.2 - monitor - offline - with lockfile"
@@ -1131,7 +1131,7 @@ echo "${port}" >> "${lockdir}/${selfname}.lock"
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "5.3 - monitor - offline - no lockfile"
@@ -1150,7 +1150,7 @@ fn_setstatus
fn_test_result_fail
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "5.4 - test-alert"
@@ -1171,7 +1171,7 @@ sed -i 's/[0-9]\+/0/' "${servercfgfullpath}"
fn_test_result_fail
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
fn_print_info_nl "Re-generating ${servercfg}."
@@ -1199,7 +1199,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "6.2 - postdetails"
@@ -1218,7 +1218,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "7.0 - Backup Tests"
@@ -1237,7 +1237,7 @@ echo -e "test de-activated until issue #1839 fixed"
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "8.0 - Development Tools Tests"
@@ -1260,7 +1260,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "8.2 - dev - detect ldd"
@@ -1279,7 +1279,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "8.3 - dev - detect deps"
@@ -1298,7 +1298,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "8.4 - dev - query-raw"
@@ -1317,30 +1317,30 @@ fn_setstatus
fn_test_result_na
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
-echo -e "9.0 - Donate"
+echo -e "9.0 - Sponsor"
echo -e "=================================================================="
echo -e ""
-echo -e "9.1 - donate"
+echo -e "9.1 - sponsor"
echo -e "================================="
echo -e "Description:"
-echo -e "donate."
-echo -e "Command: ./${gameservername} donate"
+echo -e "sponsor."
+echo -e "Command: ./${gameservername} sponsor"
requiredstatus="STARTED"
fn_setstatus
(
exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
- command_donate.sh
+ command_sponsor.sh
)
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "================================="
diff --git a/tests/tests_mcserver.sh b/tests/tests_mcserver.sh
index 560484910..a32ffd8f5 100644
--- a/tests/tests_mcserver.sh
+++ b/tests/tests_mcserver.sh
@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x
fi
-version="v23.1.0"
+version="v23.2.0"
shortname="mc"
gameservername="mcserver"
commandname="CORE"
@@ -32,7 +32,7 @@ logdir="${rootdir}/log"
lgsmlogdir="${logdir}/lgsm"
steamcmddir="${HOME}/.steam/steamcmd"
serverfiles="${rootdir}/serverfiles"
-functionsdir="${lgsmdir}/functions"
+modulesdir="${lgsmdir}/modules"
tmpdir="${lgsmdir}/tmp"
datadir="${lgsmdir}/data"
lockdir="${lgsmdir}/lock"
@@ -52,20 +52,20 @@ fi
travistest="1"
## GitHub Branch Select
-# Allows for the use of different function files
+# Allows for the use of different module files
# from a different repo and/or branch.
githubuser="GameServerManagers"
githubrepo="LinuxGSM"
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"
+# Core module that is required first.
+core_modules.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_bootstrap_fetch_file_github "lgsm/modules" "core_modules.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash"
}
# Bootstrap
-# Fetches the core functions required before passed off to core_dl.sh.
+# Fetches the core modules required before passed off to core_dl.sh.
fn_bootstrap_fetch_file() {
remote_fileurl="${1}"
remote_fileurl_backup="${2}"
@@ -169,7 +169,7 @@ fn_bootstrap_fetch_file_github() {
github_file_url_dir="${1}"
github_file_url_name="${2}"
# If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork.
- if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then
+ if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}"
else
@@ -184,7 +184,7 @@ fn_bootstrap_fetch_file_github() {
run="${5:-0}"
forcedl="${6:-0}"
md5="${7:-0}"
- # Passes vars to the file download function.
+ # Passes vars to the file download module.
fn_bootstrap_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}"
}
@@ -328,11 +328,11 @@ if [ "$(whoami)" == "root" ]; then
echo -e "[ FAIL ] Do NOT run this script as root!"
exit 1
fi
- elif [ ! -f "${functionsdir}/core_functions.sh" ] || [ ! -f "${functionsdir}/check_root.sh" ] || [ ! -f "${functionsdir}/core_messages.sh" ]; then
+ elif [ ! -f "${modulesdir}/core_modules.sh" ] || [ ! -f "${modulesdir}/check_root.sh" ] || [ ! -f "${modulesdir}/core_messages.sh" ]; then
echo -e "[ FAIL ] Do NOT run this script as root!"
exit 1
else
- core_functions.sh
+ core_modules.sh
check_root.sh
fi
fi
@@ -378,7 +378,7 @@ if [ "${shortname}" == "core" ]; then
# LinuxGSM server mode.
else
- core_functions.sh
+ core_modules.sh
if [ "${shortname}" != "core-dep" ]; then
# Load LinuxGSM configs.
# These are required to get all the default variables for the specific server.
@@ -399,8 +399,8 @@ else
echo -e "OK"
fi
else
- function_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg")
- if [ "${function_file_diff}" != "" ]; then
+ module_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg")
+ if [ "${module_file_diff}" != "" ]; then
fn_print_warn_nl "_default.cfg has been altered. reloading config."
echo -en "copying _default.cfg...\c"
cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg"
@@ -613,8 +613,8 @@ echo -e "8.2 - dev - detect ldd"
echo -e "8.3 - dev - detect deps"
echo -e "8.4 - dev - query-raw"
echo -e ""
-echo -e "9.0 - Donate"
-echo -e "9.1 - donate"
+echo -e "9.0 - Sponsor"
+echo -e "9.1 - sponsor"
echo -e ""
echo -e "0.0 - Pre-test Tasks"
@@ -635,7 +635,7 @@ echo -e ""
)
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "0.2 - Enable dev-debug"
@@ -652,7 +652,7 @@ echo -e ""
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "1.0 - Pre-install tests"
@@ -680,7 +680,7 @@ fi
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "1.2 - getopt"
@@ -698,7 +698,7 @@ echo -e ""
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "1.3 - getopt with incorrect args"
@@ -717,7 +717,7 @@ getopt="abc123"
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "2.0 - Installation"
@@ -738,7 +738,7 @@ echo -e "Command: ./${gameservername} auto-install"
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "3.0 - Start/Stop/Restart Tests"
@@ -761,7 +761,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "3.2 - start - online"
@@ -780,7 +780,7 @@ fn_setstatus
fn_test_result_fail
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "3.3 - start - updateonstart"
@@ -800,7 +800,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "30s Pause"
echo -e "================================="
@@ -828,7 +828,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "3.5 - stop - offline"
@@ -847,7 +847,7 @@ fn_setstatus
fn_test_result_fail
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "3.6 - restart"
@@ -866,7 +866,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "3.7 - restart - offline"
@@ -885,7 +885,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "4.0 - Update Tests"
@@ -908,7 +908,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "4.2 - update-lgsm"
@@ -928,7 +928,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "Inserting IP address"
@@ -979,7 +979,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "5.2 - monitor - offline - with lockfile"
@@ -1002,7 +1002,7 @@ echo "${port}" >> "${lockdir}/${selfname}.lock"
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "5.3 - monitor - offline - no lockfile"
@@ -1021,7 +1021,7 @@ fn_setstatus
fn_test_result_fail
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "5.4 - test-alert"
@@ -1040,7 +1040,7 @@ fn_setstatus
fn_test_result_fail
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "6.0 - Details Tests"
@@ -1063,7 +1063,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "6.2 - postdetails"
@@ -1082,7 +1082,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "7.0 - Backup Tests"
@@ -1101,7 +1101,7 @@ echo -e "test de-activated until issue #1839 fixed"
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "8.0 - Development Tools Tests"
@@ -1124,7 +1124,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "8.2 - dev - detect ldd"
@@ -1143,7 +1143,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "8.3 - dev - detect deps"
@@ -1162,7 +1162,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "Inserting IP address"
@@ -1195,30 +1195,30 @@ fn_setstatus
fn_test_result_na
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
-echo -e "9.0 - Donate"
+echo -e "9.0 - Sponsor"
echo -e "=================================================================="
echo -e ""
-echo -e "9.1 - donate"
+echo -e "9.1 - sponsor"
echo -e "================================="
echo -e "Description:"
-echo -e "donate."
-echo -e "Command: ./${gameservername} donate"
+echo -e "sponsor."
+echo -e "Command: ./${gameservername} sponsor"
requiredstatus="STARTED"
fn_setstatus
(
exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
- command_donate.sh
+ command_sponsor.sh
)
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "================================="
diff --git a/tests/tests_ts3server.sh b/tests/tests_ts3server.sh
index 731a38518..7d7ed7180 100644
--- a/tests/tests_ts3server.sh
+++ b/tests/tests_ts3server.sh
@@ -20,7 +20,7 @@ if [ -f ".dev-debug" ]; then
set -x
fi
-version="v23.1.0"
+version="v23.2.0"
shortname="ts3"
gameservername="ts3server"
commandname="CORE"
@@ -32,7 +32,7 @@ logdir="${rootdir}/log"
lgsmlogdir="${logdir}/lgsm"
steamcmddir="${HOME}/.steam/steamcmd"
serverfiles="${rootdir}/serverfiles"
-functionsdir="${lgsmdir}/functions"
+modulesdir="${lgsmdir}/modules"
tmpdir="${lgsmdir}/tmp"
datadir="${lgsmdir}/data"
lockdir="${lgsmdir}/lock"
@@ -52,20 +52,20 @@ fi
travistest="1"
## GitHub Branch Select
-# Allows for the use of different function files
+# Allows for the use of different module files
# from a different repo and/or branch.
githubuser="GameServerManagers"
githubrepo="LinuxGSM"
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"
+# Core module that is required first.
+core_modules.sh() {
+ modulefile="${FUNCNAME[0]}"
+ fn_bootstrap_fetch_file_github "lgsm/modules" "core_modules.sh" "${modulesdir}" "chmodx" "run" "noforcedl" "nohash"
}
# Bootstrap
-# Fetches the core functions required before passed off to core_dl.sh.
+# Fetches the core modules required before passed off to core_dl.sh.
fn_bootstrap_fetch_file() {
remote_fileurl="${1}"
remote_fileurl_backup="${2}"
@@ -169,7 +169,7 @@ fn_bootstrap_fetch_file_github() {
github_file_url_dir="${1}"
github_file_url_name="${2}"
# If master branch will currently running LinuxGSM version to prevent "version mixing". This is ignored if a fork.
- if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManager" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then
+ if [ "${githubbranch}" == "master" ] && [ "${githubuser}" == "GameServerManagers" ] && [ "${commandname}" != "UPDATE-LGSM" ]; then
remote_fileurl="https://raw.githubusercontent.com/${githubuser}/${githubrepo}/${version}/${github_file_url_dir}/${github_file_url_name}"
remote_fileurl_backup="https://bitbucket.org/${githubuser}/${githubrepo}/raw/${version}/${github_file_url_dir}/${github_file_url_name}"
else
@@ -184,7 +184,7 @@ fn_bootstrap_fetch_file_github() {
run="${5:-0}"
forcedl="${6:-0}"
md5="${7:-0}"
- # Passes vars to the file download function.
+ # Passes vars to the file download module.
fn_bootstrap_fetch_file "${remote_fileurl}" "${remote_fileurl_backup}" "${remote_fileurl_name}" "${remote_fileurl_backup_name}" "${local_filedir}" "${local_filename}" "${chmodx}" "${run}" "${forcedl}" "${md5}"
}
@@ -328,11 +328,11 @@ if [ "$(whoami)" == "root" ]; then
echo -e "[ FAIL ] Do NOT run this script as root!"
exit 1
fi
- elif [ ! -f "${functionsdir}/core_functions.sh" ] || [ ! -f "${functionsdir}/check_root.sh" ] || [ ! -f "${functionsdir}/core_messages.sh" ]; then
+ elif [ ! -f "${modulesdir}/core_modules.sh" ] || [ ! -f "${modulesdir}/check_root.sh" ] || [ ! -f "${modulesdir}/core_messages.sh" ]; then
echo -e "[ FAIL ] Do NOT run this script as root!"
exit 1
else
- core_functions.sh
+ core_modules.sh
check_root.sh
fi
fi
@@ -378,7 +378,7 @@ if [ "${shortname}" == "core" ]; then
# LinuxGSM server mode.
else
- core_functions.sh
+ core_modules.sh
if [ "${shortname}" != "core-dep" ]; then
# Load LinuxGSM configs.
# These are required to get all the default variables for the specific server.
@@ -399,8 +399,8 @@ else
echo -e "OK"
fi
else
- function_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg")
- if [ "${function_file_diff}" != "" ]; then
+ module_file_diff=$(diff -q "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg")
+ if [ "${module_file_diff}" != "" ]; then
fn_print_warn_nl "_default.cfg has been altered. reloading config."
echo -en "copying _default.cfg...\c"
cp -R "${configdirdefault}/config-lgsm/${gameservername}/_default.cfg" "${configdirserver}/_default.cfg"
@@ -614,8 +614,8 @@ echo -e "8.2 - dev - detect ldd"
echo -e "8.3 - dev - detect deps"
echo -e "8.4 - dev - query-raw"
echo -e ""
-echo -e "9.0 - Donate"
-echo -e "9.1 - donate"
+echo -e "9.0 - Sponsor"
+echo -e "9.1 - sponsor"
echo -e ""
echo -e "0.0 - Pre-test Tasks"
echo -e "=================================================================="
@@ -635,7 +635,7 @@ echo -e ""
)
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "0.2 - Enable dev-debug"
@@ -652,7 +652,7 @@ echo -e ""
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "1.0 - Pre-install tests"
@@ -680,7 +680,7 @@ fi
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "1.2 - getopt"
@@ -698,7 +698,7 @@ echo -e ""
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "1.3 - getopt with incorrect args"
@@ -717,7 +717,7 @@ getopt="abc123"
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "2.0 - Installation"
@@ -738,7 +738,7 @@ echo -e "Command: ./${gameservername} auto-install"
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "3.0 - Start/Stop/Restart Tests"
@@ -761,7 +761,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "3.2 - start - online"
@@ -780,7 +780,7 @@ fn_setstatus
fn_test_result_fail
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "3.3 - start - updateonstart"
@@ -800,7 +800,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "3.4 - stop"
@@ -819,7 +819,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "3.5 - stop - offline"
@@ -838,7 +838,7 @@ fn_setstatus
fn_test_result_fail
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "3.6 - restart"
@@ -857,7 +857,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "3.7 - restart - offline"
@@ -876,7 +876,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "4.0 - Update Tests"
@@ -899,7 +899,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "4.2 - update-lgsm"
@@ -919,7 +919,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "5.0 - Monitor Tests"
@@ -946,7 +946,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "5.2 - monitor - offline - with lockfile"
@@ -969,7 +969,7 @@ echo "${port}" >> "${lockdir}/${selfname}.lock"
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "5.3 - monitor - offline - no lockfile"
@@ -988,7 +988,7 @@ fn_setstatus
fn_test_result_fail
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "5.4 - test-alert"
@@ -1007,7 +1007,7 @@ fn_setstatus
fn_test_result_fail
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "6.0 - Details Tests"
@@ -1030,7 +1030,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "6.2 - postdetails"
@@ -1049,7 +1049,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "7.0 - Backup Tests"
@@ -1068,7 +1068,7 @@ echo -e "test de-activated until issue #1839 fixed"
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "8.0 - Development Tools Tests"
@@ -1091,7 +1091,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "8.2 - dev - detect ldd"
@@ -1110,7 +1110,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "8.3 - dev - detect deps"
@@ -1129,7 +1129,7 @@ fn_setstatus
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "8.4 - dev - query-raw"
@@ -1148,30 +1148,30 @@ fn_setstatus
fn_test_result_na
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
-echo -e "9.0 - Donate"
+echo -e "9.0 - Sponsor"
echo -e "=================================================================="
echo -e ""
-echo -e "9.1 - donate"
+echo -e "9.1 - sponsor"
echo -e "================================="
echo -e "Description:"
-echo -e "donate."
-echo -e "Command: ./${gameservername} donate"
+echo -e "sponsor."
+echo -e "Command: ./${gameservername} sponsor"
requiredstatus="STARTED"
fn_setstatus
(
exec 5> "${TRAVIS_BUILD_DIR}/dev-debug.log"
BASH_XTRACEFD="5"
set -x
- command_donate.sh
+ command_sponsor.sh
)
fn_test_result_pass
echo -e "run order"
echo -e "================="
-grep functionfile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/functionfile=//g'
+grep modulefile= "${TRAVIS_BUILD_DIR}/dev-debug.log" | sed 's/modulefile=//g'
echo -e ""
echo -e "================================="