diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index e9f2d000b..b47fff71d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -8,6 +8,51 @@ body: attributes: value: | Thanks for taking the time to fill out this bug report! + - type: dropdown + id: severity + attributes: + label: Severity + description: Triage metadata used for prioritization. + options: + - "severity: low" + - "severity: medium" + - "severity: high" + - "severity: critical" + validations: + required: true + - type: dropdown + id: reproducibility + attributes: + label: Reproducibility + description: Triage metadata used for prioritization. + options: + - "reproducible: always" + - "reproducible: sometimes" + - "reproducible: unable" + validations: + required: true + - type: dropdown + id: regression + attributes: + label: Regression + description: Triage metadata used for prioritization. + options: + - "regression: yes" + - "regression: no" + - "regression: unknown" + validations: + required: true + - type: dropdown + id: affects-latest + attributes: + label: Affects latest release + description: Triage metadata used for prioritization. + options: + - "latest-release: yes" + - "latest-release: no" + - "latest-release: unknown" + validations: + required: true - type: input id: user-story attributes: @@ -16,6 +61,14 @@ body: placeholder: As a [user description], I want [desired action] so that [desired outcome]. validations: required: true + - type: input + id: script-name + attributes: + label: Script name + description: LinuxGSM script name in use. + placeholder: vhserver + validations: + required: true - type: input id: game attributes: @@ -30,11 +83,18 @@ body: label: Linux distro multiple: true options: + - Ubuntu 26.04 - Ubuntu 24.04 - Ubuntu 22.04 - Ubuntu 20.04 + - Debian 13 - Debian 12 - Debian 11 + - AlmaLinux 9 + - AlmaLinux 8 + - Rocky 10 + - Rocky 9 + - Rocky 8 - RedHat 9 - RedHat 8 - Other @@ -66,6 +126,22 @@ body: - "command: send" validations: required: true + - type: textarea + id: expected-behavior + attributes: + label: Expected behavior + description: What should happen? + placeholder: Describe the expected result. + validations: + required: true + - type: textarea + id: actual-behavior + attributes: + label: Actual behavior + description: What actually happens? + placeholder: Describe the observed result. + validations: + required: true - type: textarea id: further-info attributes: @@ -74,11 +150,19 @@ body: placeholder: Tell us what you see! validations: required: true + - type: checkboxes + id: prechecks + attributes: + label: Pre-checks + description: Confirm standard troubleshooting has been completed. + options: + - label: I ran update and validate before reporting this issue. + required: true - type: textarea id: logs attributes: label: Relevant log output - description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. + description: Include the exact command used and the full related output (debug/details if available). This will be automatically formatted into code. render: shell - type: textarea id: steps @@ -90,3 +174,5 @@ body: 2. Click on '....' 3. Scroll down to '....' 4. See error + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index d2113c6ca..f9eb19b0c 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -6,3 +6,6 @@ contact_links: - name: Discord Server about: Join the LinuxGSM Discord community server. Discuss your LinuxGSM setup, get help and advice url: https://linuxgsm.com/discord + - name: Report a security vulnerability + about: Please report security vulnerabilities privately, not in public issues. + url: https://github.com/GameServerManagers/LinuxGSM/security/advisories/new diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index f1a8ccaf6..1c50616bf 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -8,6 +8,17 @@ body: attributes: value: | Thanks for taking the time to fill out this feature request! + - type: dropdown + id: priority + attributes: + label: Priority + description: How important is this feature to you? + options: + - "priority: low" + - "priority: medium" + - "priority: high" + validations: + required: true - type: input id: user-story attributes: @@ -30,11 +41,18 @@ body: label: Linux distro multiple: true options: + - Ubuntu 26.04 - Ubuntu 24.04 - Ubuntu 22.04 - Ubuntu 20.04 + - Debian 13 - Debian 12 - Debian 11 + - AlmaLinux 9 + - AlmaLinux 8 + - Rocky 10 + - Rocky 9 + - Rocky 8 - RedHat 9 - RedHat 8 - Other @@ -64,12 +82,41 @@ body: - "command: update-lgsm" - "command: wipe" - "command: send" + validations: + required: false + - type: textarea + id: problem-statement + attributes: + label: Problem statement + description: What is painful today, and why is this needed? + placeholder: Describe the current limitation or pain point. + validations: + required: true + - type: dropdown + id: scope-impact + attributes: + label: Scope and impact + description: Which area would this change impact? + options: + - "scope: single game" + - "scope: multiple games" + - "scope: all servers" + - "scope: documentation only" + - "scope: ci/cd or automation" + - "scope: other" validations: required: true - type: textarea id: further-info attributes: label: Further information - description: A clear description of what the feature is and any ideas on how to achieve this. + description: A clear description of the proposed solution and any implementation ideas. validations: required: true + - type: textarea + id: alternatives + attributes: + label: Alternatives considered + description: Describe alternatives or workarounds you considered. + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/server_request.yml b/.github/ISSUE_TEMPLATE/server_request.yml index 31dbc6b81..849bcaa21 100644 --- a/.github/ISSUE_TEMPLATE/server_request.yml +++ b/.github/ISSUE_TEMPLATE/server_request.yml @@ -7,7 +7,7 @@ body: - type: markdown attributes: value: | - Thanks for taking the time to fill out this game server! + Thanks for taking the time to fill out this game server request! - type: input id: game-server attributes: @@ -15,11 +15,19 @@ body: description: What game server would you like to add? validations: required: true + - type: checkboxes + id: dedicated-server + attributes: + label: Dedicated server + description: Confirm this is a dedicated server request and not client hosting. + options: + - label: "Yes, this is a dedicated server (not client hosting)." + required: true - type: checkboxes id: on-linux attributes: label: Linux support - description: Does this game server have Linux support? (not wine) + description: Does this game server have native Linux server support? (not wine) options: - label: "Yes" validations: @@ -38,20 +46,40 @@ body: id: steam-id attributes: label: Steam appid - description: What is the Steam appid of the game server? Use SteamDB to get the appid. (https://steamdb.info). + description: What is the Steam appid of the dedicated server? Required when Steam is Yes. Use SteamDB to get the appid (https://steamdb.info). placeholder: "892970" validations: required: false + - type: textarea + id: official-docs + attributes: + label: Official dedicated server documentation + description: Provide official documentation links for installing/running the dedicated server. + placeholder: | + https://example.com/docs/server-setup + https://example.com/docs/dedicated-server + validations: + required: true + - type: textarea + id: linux-binary-proof + attributes: + label: Linux binary proof + description: Provide evidence that Linux server binaries are available (official docs/download links/version notes). + placeholder: | + https://example.com/downloads/linux-dedicated-server + https://example.com/release-notes/linux-server + validations: + required: true - type: textarea id: guides attributes: label: Guides - description: Links to guides on how to install the game server + description: Links to community or third-party guides on how to install the game server. - type: checkboxes id: terms attributes: label: Code of Conduct - description: By submitting this issue, you agree to follow our [Code of Conduct](https://example.com) + description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/GameServerManagers/LinuxGSM/blob/master/CODE_OF_CONDUCT.md) options: - label: I agree to follow this project's Code of Conduct required: true diff --git a/.github/instructions/pr-review.instructions.md b/.github/instructions/pr-review.instructions.md new file mode 100644 index 000000000..9d0d8fef2 --- /dev/null +++ b/.github/instructions/pr-review.instructions.md @@ -0,0 +1,29 @@ +--- +title: "LinuxGSM PR Review Guidance" +applyTo: "**" +description: "Use when reviewing pull requests in LinuxGSM; prioritize regressions, behavior changes, shell safety, and missing tests over style-only feedback." +--- + +Focus review effort on correctness and operational safety first. + +Primary priorities: + +- Identify behavior regressions and compatibility risks. +- Flag unsafe shell patterns (`rm -rf`, unquoted vars, unchecked command failures). +- Verify workflow changes do not weaken permissions or secret handling. +- Check for missing tests/validation when logic changes. +- Confirm labels, templates, and automation rules stay internally consistent. + +Feedback expectations: + +- Give concrete, actionable findings with file and reason. +- Prefer high-signal issues over style nits. +- If no defects are found, state that clearly and mention residual risk areas. +- Suggest minimal, low-risk fixes before proposing broad refactors. + +LinuxGSM-specific checks: + +- Shell scripts should preserve robust defaults (`set -euo pipefail` where appropriate). +- Label/workflow updates should avoid duplicate or stale taxonomy. +- Automation should fail safe (log and continue for advisory AI; block on true CI errors). +- Keep issue/PR automation rules aligned with templates and existing labels. diff --git a/.github/labeler.yml b/.github/labeler.yml index 34ffd66f1..efca99286 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -69,7 +69,7 @@ "game: Ballistic Overkill": - "/(Ballistic Overkill)/i" "game: BATTALION: Legacy": - - "/(BATTALION: Legacy)/i" + - "/(BATTALION: Legacy|Battalion 1944)/i" "game: Barotrauma": - "/(Barotrauma)/i" "game: Counter-Strike: Global Offensive": @@ -77,21 +77,27 @@ "game: Counter-Strike 2": - "/(Counter-Strike 2|CS2)/i" "game: Counter-Strike: Source": - - "/(Counter-Strike: Source|CS:S)/i" + - "/(Counter-Strike: Source|Counter Strike: Source|CS:S)/i" "game: Counter-Strike 1.6": - "/(Counter-Strike 1.6|Counter Strike 1.6|CS 1.6|cs1.6)/i" -"game: Dayz": - - "/(Dayz)/i" +"game: DayZ": + - "/(DayZ|Dayz)/i" +"game: Deathmatch Classic": + - "/(Deathmatch Classic|Death Match Classic|DMC)/i" "game: Don't Starve Together": - "/(Don't Starve Together|Dont Starve Together|DST)/i" "game: Eco": - "/(^Eco$)/i" "game: Factorio": - "/(Factorio)/i" -"game: Garry's Mod": +"game: Garrys Mod": - "/(Garry's Mod|Garrys Mod|GMod)/i" +"game: Hurtworld": + - "/(Hurtworld|Hurtword)/i" +"game: Insurgency": + - "/(^Insurgency$|Insurgecy)/i" "game: Insurgency: Sandstorm": - - "/(Insurgency: Sandstorm|Insurgency)/i" + - "/(Insurgency: Sandstorm)/i" "game: Killing Floor 2": - "/(Killing Floor 2|KF2)/i" "game: Left 4 Dead 2": @@ -100,18 +106,20 @@ - "/(Minecraft)((?!bedrock).)*$/i" "game: Minecraft Bedrock": - "/(Bedrock)/i" -"game: Mumble": - - "/(Mumble)/i" "game: Project Zomboid": - "/(Project Zomboid|PZ)/i" -"game: Quake 3": - - "/(Quake 3|Q3A|q3)/i" +"game: Quake 3: Arena": + - "/(Quake 3: Arena|Quake 3|Q3A|q3)/i" +"game: Quake World": + - "/(Quake World|QuakeWorld)/i" "game: Rising World": - "/(Rising World)/i" "game: Satisfactory": - "/(Satisfactory)/i" "game: Squad": - "/(Squad)/i" +"game: Squad 44": + - "/(Squad 44|Post Scriptum)/i" "game: Starbound": - "/(Starbound)/i" "game: Stationeers": @@ -120,6 +128,8 @@ - "/(Teamspeak 3|ts3)/i" "game: Rust": - "/(Rust)/i" +"game: Soldier Of Fortune 2: Gold Edition": + - "/(Soldier Of Fortune 2: Gold Edition|Soldier of Fortune 2)/i" "game: Unturned": - "/(Unturned)/i" "game: Unreal Tournament 99": @@ -130,6 +140,8 @@ - "/(Unreal Tournament 3|ut3)/i" "game: Valheim": - "/(Valheim)/i" +"game: Zombie Master: Reborn": + - "/(Zombie Master: Reborn|Zombie Master Reborn)/i" # Info "info: alerts": @@ -157,6 +169,54 @@ "type: game server request": - "/(Server Request)/i" "type: bug": - - "/(bug)/i" -"type: feature request": - - "/(feature)/i" + - "/(\\[bug\\]|bug report|type: bug)/i" +"type: bugfix": + - "/(^fix(\\(.+\\))?:|\\[x\\] Bug fix)/im" +"type: feature": + - "/(feature request|new feature|^feat(\\(.+\\))?:|\\[x\\] New feature)/im" +"type: docs": + - "/(^docs(\\(.+\\))?:|documentation|\\[x\\] Comment update)/im" +"type: refactor": + - "/(^refactor(\\(.+\\))?:|\\[x\\] Refactor)/im" +"type: chore": + - "/(^chore(\\(.+\\))?:|^ci(\\(.+\\))?:)/im" + +# Severity (bug reports) +"severity: low": + - "/(severity: low)/i" +"severity: medium": + - "/(severity: medium)/i" +"severity: high": + - "/(severity: high)/i" +"severity: critical": + - "/(severity: critical)/i" + +# Reproducibility (bug reports) +"reproducible: always": + - "/(reproducible: always)/i" +"reproducible: sometimes": + - "/(reproducible: sometimes)/i" +"reproducible: unable": + - "/(reproducible: unable)/i" + +# Regression (bug reports) +"regression: yes": + - "/(regression: yes)/i" + +# Priority (feature requests) +"priority: low": + - "/(priority: low)/i" +"priority: medium": + - "/(priority: medium)/i" +"priority: high": + - "/(priority: high)/i" + +# Scope (feature requests) +"scope: single game": + - "/(scope: single game)/i" +"scope: multiple games": + - "/(scope: multiple games)/i" +"scope: all servers": + - "/(scope: all servers)/i" +"scope: documentation": + - "/(scope: documentation)/i" diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 9f6864e57..d95b4278e 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -12,18 +12,40 @@ Fixes #[issue] - [ ] Refactor (restructures existing code). - [ ] Comment update (typo, spelling, explanation, examples, etc). +## Testing + +Please list the exact validation you performed and the outcome. + +- Commands/tests run: +- Result: +- Environment used (distro/version): + +## Risk and rollback + +- Risk level: low / medium / high +- Rollback plan: + +## Breaking changes + +- [ ] No breaking changes. +- [ ] Breaking changes included (describe below). + +## Documentation impact + +- [ ] No documentation update required. +- [ ] User documentation update required. +- [ ] Developer documentation update required. + ## Checklist PR will not be merged until all steps are complete. - [ ] This pull request links to an issue. -- [ ] This pull request uses the `develop` branch as its base. +- [ ] This pull request uses the develop branch as its base. - [ ] This pull request subject follows the Conventional Commits standard. - [ ] This code follows the style guidelines of this project. - [ ] I have performed a self-review of my code. -- [ ] I have checked that this code is commented where required. - [ ] I have provided a detailed enough description of this PR. -- [ ] I have checked if documentation needs updating. ## Documentation diff --git a/.github/scripts/details-check-generate-matrix.sh b/.github/scripts/details-check-generate-matrix.sh new file mode 100755 index 000000000..cf37b528c --- /dev/null +++ b/.github/scripts/details-check-generate-matrix.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +ref="${LGSM_REF:-${GITHUB_REF#refs/heads/}}" +curl "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${ref}/lgsm/data/serverlist.csv" | grep -v '^[[:blank:]]*$' > serverlist.csv + +echo -n "{" > "shortnamearray.json" +echo -n "\"include\":[" >> "shortnamearray.json" + +while read -r line; do + shortname=$(echo "$line" | awk -F, '{ print $1 }') + # If TARGETED_SHORTNAMES is set, skip servers not in the list + if [ -n "${TARGETED_SHORTNAMES:-}" ]; then + if ! echo "${TARGETED_SHORTNAMES}" | grep -qw "${shortname}"; then + continue + fi + fi + export shortname + servername=$(echo "$line" | awk -F, '{ print $2 }') + export servername + gamename=$(echo "$line" | awk -F, '{ print $3 }') + export gamename + distro=$(echo "$line" | awk -F, '{ print $4 }') + export distro + # Legacy servers that require older Ubuntu/Debian versions due to glibc compatibility + case "${shortname}" in + bfv | bf1942) + # Requires Ubuntu <= 22.04 or Debian <= 12 (glibc 2.31 compatible) + runner="ubuntu-22.04" + ;; + btl | onset) + # Requires Ubuntu <= 20.04 or Debian <= 11 (glibc 2.31 compatible) + runner="ubuntu-20.04" + ;; + *) + runner="ubuntu-latest" + ;; + esac + { + echo -n "{" + echo -n "\"shortname\":" + echo -n "\"${shortname}\"" + echo -n ",\"runner\":" + echo -n "\"${runner}\"" + echo -n "}," + } >> "shortnamearray.json" +done < <(tail -n +2 serverlist.csv) +sed -i '$ s/.$//' "shortnamearray.json" +echo -n "]" >> "shortnamearray.json" +echo -n "}" >> "shortnamearray.json" +rm serverlist.csv diff --git a/.github/workflows/serverlist-validate-game-icons.sh b/.github/scripts/serverlist-validate-game-icons.sh similarity index 100% rename from .github/workflows/serverlist-validate-game-icons.sh rename to .github/scripts/serverlist-validate-game-icons.sh diff --git a/.github/workflows/serverlist-validate.sh b/.github/scripts/serverlist-validate.sh similarity index 60% rename from .github/workflows/serverlist-validate.sh rename to .github/scripts/serverlist-validate.sh index 3d83d89da..9f3826cfa 100755 --- a/.github/workflows/serverlist-validate.sh +++ b/.github/scripts/serverlist-validate.sh @@ -22,20 +22,4 @@ for csv in "${csvlist[@]}"; do fi done -# Compare all game servers listed in serverlist.csv to $shortname-icon.png files in ${datadir}/gameicons -# if the game server is listed in serverlist.csv then it will have a $shortname-icon.png file - -# loop though shortname in serverlist.csv -echo "" -echo "Checking that all the game servers listed in serverlist.csv have a shortname-icon.png file" -for shortname in $(tail -n +2 serverlist.csv | cut -d ',' -f1); do - # check if $shortname-icon.png exists - if [ ! -f "gameicons/${shortname}-icon.png" ]; then - echo "ERROR: gameicons/${shortname}-icon.png does not exist" - exitcode=1 - else - echo "OK: gameicons/${shortname}-icon.png exists" - fi -done - exit "${exitcode}" diff --git a/.github/scripts/sync-game-labels.sh b/.github/scripts/sync-game-labels.sh new file mode 100644 index 000000000..2914f3d80 --- /dev/null +++ b/.github/scripts/sync-game-labels.sh @@ -0,0 +1,87 @@ +#!/usr/bin/env bash +# sync-game-labels.sh +# Reads lgsm/data/serverlist.csv and ensures a "game: " label exists in +# the GitHub repo for every unique game name. Safe to run multiple times. +# +# Requires: gh CLI authenticated with issues:write scope. +# Usage: .github/scripts/sync-game-labels.sh [OWNER/REPO] +# +# The OWNER/REPO argument is optional; if omitted gh uses the current repo. + +set -euo pipefail + +REPO="${1:-}" +SERVERLIST="lgsm/data/serverlist.csv" +LABEL_COLOR="5b21b6" +LABEL_PREFIX="game: " + +normalize_label() { + printf '%s' "$1" | tr '[:upper:]' '[:lower:]' +} + +if [[ ! -f "${SERVERLIST}" ]]; then + echo "ERROR: ${SERVERLIST} not found. Run from the repository root." + exit 1 +fi + +declare -A EXISTING_COLORS=() +declare -A EXISTING_DESCRIPTIONS=() +declare -A EXISTING_NAMES=() + +# Fetch all existing game label metadata once (up to 1000) and cache locally. +echo "Fetching existing labels..." +while IFS=$'\t' read -r NAME COLOR DESCRIPTION; do + [[ -n "${NAME}" ]] || continue + EXISTING_COLORS["${NAME}"]="${COLOR}" + EXISTING_DESCRIPTIONS["${NAME}"]="${DESCRIPTION}" + EXISTING_NAMES["$(normalize_label "${NAME}")"]="${NAME}" +done < <( + gh label list --limit 1000 --json name,color,description ${REPO:+--repo "$REPO"} \ + | jq -r '.[] | select(.name | startswith("game: ")) | [.name, .color, (.description // "")] | @tsv' +) + +# Parse unique game names from the CSV (column 3, skip header). +mapfile -t GAMES < <( + tail -n +2 "${SERVERLIST}" \ + | cut -d',' -f3 \ + | sort -u +) + +CREATED=0 +UPDATED=0 +UNCHANGED=0 + +for GAME in "${GAMES[@]}"; do + LABEL="${LABEL_PREFIX}${GAME}" + DESCRIPTION="Issues related to ${GAME}" + NORMALIZED_LABEL="$(normalize_label "${LABEL}")" + + if [[ -v EXISTING_NAMES["${NORMALIZED_LABEL}"] ]]; then + CURRENT_LABEL="${EXISTING_NAMES["${NORMALIZED_LABEL}"]}" + CURRENT_COLOR="${EXISTING_COLORS["${CURRENT_LABEL}"]}" + CURRENT_DESCRIPTION="${EXISTING_DESCRIPTIONS["${CURRENT_LABEL}"]}" + + if [[ "${CURRENT_LABEL}" != "${LABEL}" || "${CURRENT_COLOR}" != "${LABEL_COLOR}" || "${CURRENT_DESCRIPTION}" != "${DESCRIPTION}" ]]; then + echo " update ${LABEL}" + gh label edit "${CURRENT_LABEL}" \ + --name "${LABEL}" \ + --color "${LABEL_COLOR}" \ + --description "${DESCRIPTION}" \ + ${REPO:+--repo "$REPO"} + ((UPDATED++)) || true + else + echo " ok ${LABEL}" + ((UNCHANGED++)) || true + fi + else + echo " create ${LABEL}" + gh label create "${LABEL}" \ + --color "${LABEL_COLOR}" \ + --description "${DESCRIPTION}" \ + ${REPO:+--repo "$REPO"} + ((CREATED++)) || true + fi +done + +echo "" +echo "Done. Created: ${CREATED} Updated: ${UPDATED} Unchanged: ${UNCHANGED}" diff --git a/.github/workflows/version-check.sh b/.github/scripts/version-check.sh similarity index 100% rename from .github/workflows/version-check.sh rename to .github/scripts/version-check.sh diff --git a/.github/workflows/action-super-linter.yml b/.github/workflows/action-super-linter.yml index e2755e20a..31b2fa949 100644 --- a/.github/workflows/action-super-linter.yml +++ b/.github/workflows/action-super-linter.yml @@ -27,9 +27,9 @@ jobs: - name: Checkout code uses: actions/checkout@v6 with: - # Full clone required so super-linter can resolve GITHUB_BEFORE_SHA. + # super-linter needs the full git history to get the + # list of files that changed across commits fetch-depth: 0 - fetch-tags: false persist-credentials: false - name: Install Prettier plugins (for summary formatting) @@ -41,7 +41,6 @@ jobs: env: # To report GitHub Actions status checks GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DEFAULT_BRANCH: ${{ github.ref_name }} VALIDATE_BIOME_FORMAT: false VALIDATE_BIOME_LINT: false VALIDATE_GITHUB_ACTIONS_ZIZMOR: false @@ -49,7 +48,6 @@ jobs: VALIDATE_JSON_PRETTIER: false VALIDATE_MARKDOWN_PRETTIER: false VALIDATE_NATURAL_LANGUAGE: false - VALIDATE_PYTHON_RUFF_FORMAT: false VALIDATE_SHELL_SHFMT: false VALIDATE_TRIVY: false VALIDATE_YAML_PRETTIER: false diff --git a/.github/workflows/action-update-copyright-years-in-license-file.yml b/.github/workflows/action-update-copyright-years-in-license-file.yml deleted file mode 100644 index ab1549f0e..000000000 --- a/.github/workflows/action-update-copyright-years-in-license-file.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: Update copyright year(s) in license file - -on: - workflow_dispatch: - schedule: - - cron: "0 3 1 1 *" # 03:00 AM on January 1 - -permissions: - contents: write - -jobs: - update-license-year: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v6 - with: - fetch-depth: 0 - persist-credentials: false - - name: Action Update License Year - uses: FantasticFiasco/action-update-license-year@v3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - path: LICENSE.md - - name: Merge pull request - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - gh pr merge --merge --delete-branch diff --git a/.github/workflows/ai-triage.yml b/.github/workflows/ai-triage.yml new file mode 100644 index 000000000..fba1e4cf1 --- /dev/null +++ b/.github/workflows/ai-triage.yml @@ -0,0 +1,243 @@ +name: AI Issue Triage +on: + issues: + types: + - opened + - edited + +# Note: This workflow uses GitHub Models which may not be available +# in all environments. If GitHub Models API returns 401 or is unavailable, +# the workflow will skip gracefully and the issue will still be processed +# by other automation (labeler, etc.) + +permissions: + issues: write + contents: read + models: read + +jobs: + ai-triage: + if: github.repository_owner == 'GameServerManagers' + runs-on: ubuntu-latest + steps: + - name: Triage issue with GitHub Models + uses: actions/github-script@v7 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + script: | + const title = context.payload.issue.title || ''; + const body = context.payload.issue.body || ''; + const number = context.payload.issue.number; + const owner = context.repo.owner; + const repo = context.repo.repo; + const AI_MARKER = ''; + + function parseTriageResponse(raw) { + const input = (raw || '').trim(); + if (!input) return {}; + + const candidates = [input]; + const fenced = input.match(/```(?:json)?\s*([\s\S]*?)```/i); + if (fenced?.[1]) candidates.push(fenced[1].trim()); + + const firstBrace = input.indexOf('{'); + const lastBrace = input.lastIndexOf('}'); + if (firstBrace !== -1 && lastBrace > firstBrace) { + candidates.push(input.slice(firstBrace, lastBrace + 1)); + } + + for (const candidate of candidates) { + try { + return JSON.parse(candidate); + } catch (_err) { + // Continue trying fallbacks. + } + } + + return {}; + } + + // For short bodies, apply "needs: more info" label directly. + // Skip the AI call but still label the issue. + const isShortBody = body.trim().length < 80; + if (isShortBody) { + try { + await github.rest.issues.addLabels({ + owner, repo, issue_number: number, + labels: ['needs: more info'], + }); + } catch (err) { + console.log('Could not apply label for short body:', err.message); + } + return; + } + + // ── Call GitHub Models ──────────────────────────────────────── + // Note: GitHub Models access may not be available in all environments. + // If the API returns 401 (Unauthorized), it means GitHub Models is not + // enabled for this repository or the current token lacks access. + // The workflow will gracefully skip AI triage and continue. + let triage; + try { + const res = await fetch( + `https://models.github.ai/orgs/${owner}/inference/chat/completions`, + { + method: 'POST', + headers: { + 'Accept': 'application/vnd.github+json', + 'Authorization': `Bearer ${process.env.GITHUB_TOKEN}`, + 'X-GitHub-Api-Version': '2026-03-10', + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ + model: 'openai/gpt-4.1-mini', + temperature: 0.1, + max_tokens: 400, + messages: [ + { + role: 'system', + content: + 'You are a triage assistant for LinuxGSM, an open-source ' + + 'Linux game server manager. Your role is to:\n' + + '1. Analyze issue quality (completeness, clarity)\n' + + '2. Extract game names mentioned in the issue, even if misspelled or abbreviated\n' + + '3. Suggest corrections for likely typos using fuzzy matching\n' + + '4. Respond ONLY with a valid JSON object — no markdown fences.\n\n' + + 'Common game name variations and typos you should recognize:\n' + + '- "Valhiem" → "Valheim"\n' + + '- "Rrust" → "Rust"\n' + + '- "Conterstrike" / "CS" / "CSGO" → "Counter-Strike: Global Offensive"\n' + + '- "Garrys" / "GMod" → "Garrys Mod"\n' + + '- "ARK" / "Ark" → "ARK: Survival Evolved"\n' + + '- "DayZ" / "Dayz" → "DayZ"\n' + + '- "Insurgency Sandstorm" / "Insurgency 2" → "Insurgency: Sandstorm"', + }, + { + role: 'user', + content: + `Title: ${title}\n\nBody:\n${body.slice(0, 3000)}\n\n` + + 'Respond with this JSON schema:\n' + + '{\n' + + ' "quality": "good" | "ok" | "poor",\n' + + ' "missing_info": ["list of specific missing fields"],\n' + + ' "detected_game": "canonical game name if one is mentioned, or null",\n' + + ' "game_confidence": "high" | "medium" | "low" | null,\n' + + ' "game_note": "correction suggestion if the user misspelled a game name, or empty string",\n' + + ' "comment": "one or two sentence note to the reporter, or empty string"\n' + + '}', + }, + ], + }), + } + ); + + // GitHub Models may return 401 if not available for this repository. + // This is expected and not an error — the workflow simply skips AI triage. + if (!res.ok) { + console.log(`GitHub Models returned ${res.status} — skipping AI triage.`); + return; + } + + const data = await res.json(); + const raw = data.choices?.[0]?.message?.content || '{}'; + triage = parseTriageResponse(raw); + } catch (err) { + // Never fail the workflow if the AI call errors — it's advisory only. + console.log('AI triage skipped:', err.message); + return; + } + + if (!triage || typeof triage !== 'object') { + triage = {}; + } + + // ── Act on the result ──────────────────────────────────────── + const isPoor = triage.quality === 'poor'; + const missing = Array.isArray(triage.missing_info) ? triage.missing_info : []; + const hasIssues = isPoor || missing.length > 0; + + // Prepare labels to apply + const labelsToApply = []; + + // Check if a game was detected with high confidence + const detectedGame = triage.detected_game; + const gameConfidence = triage.game_confidence; + + if (detectedGame && gameConfidence === 'high') { + labelsToApply.push(`game: ${detectedGame}`); + } + + // Apply "needs: more info" label if quality issues detected + if (hasIssues) { + labelsToApply.push('needs: more info'); + } + + // Apply labels one-by-one so a single failure does not block all labels. + const uniqueLabels = [...new Set(labelsToApply)]; + for (const label of uniqueLabels) { + try { + await github.rest.issues.addLabels({ + owner, + repo, + issue_number: number, + labels: [label], + }); + } catch (err) { + console.log(`Could not apply label "${label}":`, err.message); + } + } + + // Post a comment only when there is something specific to say + const gameNote = triage.game_note || ''; + const reporterComment = triage.comment || ''; + + if (!hasIssues && !gameNote) return; + + const missingBlock = missing.length > 0 + ? `\n\n**Missing information:**\n${missing.map(m => `- ${m}`).join('\n')}` + : ''; + + const gameBlock = gameNote + ? `\n\n**Game name note:** ${gameNote}` + : ''; + + const triageCommentBody = + `${AI_MARKER}\n` + + `Thanks for opening this issue! 👋\n\n` + + `${reporterComment}` + + `${missingBlock}` + + `${gameBlock}\n\n` + + `_This note was generated automatically by AI triage and may not be perfect. ` + + `A maintainer will review shortly._`; + + try { + const comments = await github.rest.issues.listComments({ + owner, + repo, + issue_number: number, + per_page: 100, + }); + + const existingAiComment = comments.data.find( + (comment) => comment.user?.type === 'Bot' && comment.body?.includes(AI_MARKER) + ); + + if (existingAiComment) { + await github.rest.issues.updateComment({ + owner, + repo, + comment_id: existingAiComment.id, + body: triageCommentBody, + }); + } else { + await github.rest.issues.createComment({ + owner, + repo, + issue_number: number, + body: triageCommentBody, + }); + } + } catch (err) { + console.log('Could not post comment:', err.message); + } diff --git a/.github/workflows/details-check-generate-matrix.sh b/.github/workflows/details-check-generate-matrix.sh deleted file mode 100755 index 2c0803519..000000000 --- a/.github/workflows/details-check-generate-matrix.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -curl "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${GITHUB_REF#refs/heads/}/lgsm/data/serverlist.csv" | grep -v '^[[:blank:]]*$' > serverlist.csv - -echo -n "{" > "shortnamearray.json" -echo -n "\"include\":[" >> "shortnamearray.json" - -while read -r line; do - shortname=$(echo "$line" | awk -F, '{ print $1 }') - export shortname - servername=$(echo "$line" | awk -F, '{ print $2 }') - export servername - gamename=$(echo "$line" | awk -F, '{ print $3 }') - export gamename - distro=$(echo "$line" | awk -F, '{ print $4 }') - export distro - { - echo -n "{"; - echo -n "\"shortname\":"; - echo -n "\"${shortname}\""; - echo -n "},"; - } >> "shortnamearray.json" -done < <(tail -n +2 serverlist.csv) -sed -i '$ s/.$//' "shortnamearray.json" -echo -n "]" >> "shortnamearray.json" -echo -n "}" >> "shortnamearray.json" -rm serverlist.csv diff --git a/.github/workflows/details-check.yml b/.github/workflows/details-check.yml index c58aa0ae4..d4f7f644f 100644 --- a/.github/workflows/details-check.yml +++ b/.github/workflows/details-check.yml @@ -5,6 +5,9 @@ on: push: branches: - develop + pull_request: + branches: + - develop permissions: contents: read @@ -17,46 +20,97 @@ jobs: create-matrix: if: github.repository_owner == 'GameServerManagers' runs-on: ubuntu-latest + env: + LGSM_REF: ${{ github.event.pull_request.head.sha || github.ref_name }} outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 + + - name: Detect targeted servers (PR only) + id: targeted + if: github.event_name == 'pull_request' + run: | + changed=$(git diff --name-only origin/${{ github.base_ref }}...HEAD) + echo "Changed files:" + echo "$changed" + + # Only these modules directly affect what 'details', 'parse-game-details' + # and 'query-raw' output. Everything else (install, fix, update, check_*, + # data CSVs, game icons, etc.) is irrelevant to this check. + details_core='^(linuxgsm\.sh|lgsm/modules/(info_game|info_messages|command_details|command_dev_parse_game_details|command_dev_query_raw|core_modules)\.sh)$' + if echo "$changed" | grep -qE "${details_core}"; then + echo "Details-relevant core file changed — using full matrix." + echo "mode=full" >> "$GITHUB_OUTPUT" + else + # Extract shortnames from changed config-lgsm paths + shortnames=$(echo "$changed" \ + | grep -oE 'lgsm/config-default/config-lgsm/[a-z0-9]+server' \ + | sed 's|lgsm/config-default/config-lgsm/||;s|server$||' \ + | sort -u) + if [ -z "$shortnames" ]; then + echo "No server configs or core files changed — skipping matrix." + echo "mode=skip" >> "$GITHUB_OUTPUT" + else + echo "Targeted servers: $shortnames" + echo "mode=targeted" >> "$GITHUB_OUTPUT" + printf '%s\n' $shortnames > targeted_shortnames.txt + fi + fi - name: Generate matrix with generate-matrix.sh - run: chmod +x .github/workflows/details-check-generate-matrix.sh; .github/workflows/details-check-generate-matrix.sh + if: github.event_name != 'pull_request' || steps.targeted.outputs.mode != 'skip' + run: | + if [ -f targeted_shortnames.txt ]; then + TARGETED_SHORTNAMES=$(cat targeted_shortnames.txt) .github/scripts/details-check-generate-matrix.sh + else + .github/scripts/details-check-generate-matrix.sh + fi - name: Set Matrix id: set-matrix run: | - shortnamearray=$(cat shortnamearray.json) - echo "${shortnamearray}" - echo -n "matrix=${shortnamearray}" >> "$GITHUB_OUTPUT" + if [ ! -f shortnamearray.json ]; then + echo 'matrix={"include":[]}' >> "$GITHUB_OUTPUT" + else + shortnamearray=$(cat shortnamearray.json) + echo "${shortnamearray}" + echo -n "matrix=${shortnamearray}" >> "$GITHUB_OUTPUT" + fi details-check: if: github.repository_owner == 'GameServerManagers' needs: create-matrix continue-on-error: true - runs-on: ubuntu-latest + runs-on: ${{ matrix.runner }} + env: + LGSM_REF: ${{ github.event.pull_request.head.sha || github.ref_name }} strategy: matrix: ${{ fromJSON(needs.create-matrix.outputs.matrix) }} steps: - name: Download linuxgsm.sh - run: wget "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${GITHUB_REF#refs/heads/}/linuxgsm.sh"; chmod +x linuxgsm.sh + run: wget "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${LGSM_REF}/linuxgsm.sh"; chmod +x linuxgsm.sh + + - name: Cache apt packages + uses: actions/cache@v4 + with: + path: /var/cache/apt/archives + key: apt-${{ runner.os }}-libxml2-utils-jq - name: Install dependencies - run: sudo apt-get install libxml2-utils jq + run: sudo apt-get install -y --no-install-recommends libxml2-utils jq - name: Create serverfiles directory run: mkdir -p serverfiles - name: Grab server - run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./linuxgsm.sh ${{ matrix.shortname }}server + run: LGSM_GITHUBBRANCH="${LGSM_REF}" ./linuxgsm.sh ${{ matrix.shortname }}server - name: Enable developer mode - run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server developer + run: LGSM_GITHUBBRANCH="${LGSM_REF}" ./${{ matrix.shortname }}server developer - name: Generate servercfgname id: sets-servercfgname @@ -73,7 +127,7 @@ jobs: fi - name: Pre-load LinuxGSM - run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server details + run: LGSM_GITHUBBRANCH="${LGSM_REF}" ./${{ matrix.shortname }}server details - name: Display config run: | @@ -87,10 +141,36 @@ jobs: run: grep "startparameters" lgsm/config-default/config-lgsm/${{ matrix.shortname }}server/_default.cfg - name: Details - run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server details + id: details + run: LGSM_GITHUBBRANCH="${LGSM_REF}" ./${{ matrix.shortname }}server details - name: Detect details - run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server parse-game-details + id: detect-details + run: LGSM_GITHUBBRANCH="${LGSM_REF}" ./${{ matrix.shortname }}server parse-game-details - name: Query Raw - run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server query-raw + id: query-raw + run: LGSM_GITHUBBRANCH="${LGSM_REF}" ./${{ matrix.shortname }}server query-raw + + - name: Write job summary + if: always() + run: | + status_icon() { + case "$1" in + success) echo "✅" ;; + failure) echo "❌" ;; + skipped) echo "⏭️" ;; + *) echo "⚠️" ;; + esac + } + details_icon=$(status_icon "${{ steps.details.outcome }}") + parse_icon=$(status_icon "${{ steps.detect-details.outcome }}") + query_icon=$(status_icon "${{ steps.query-raw.outcome }}") + { + echo "## ${{ matrix.shortname }}server" + echo "| Step | Result |" + echo "|------|--------|" + echo "| Details | ${details_icon} ${{ steps.details.outcome }} |" + echo "| Parse game details | ${parse_icon} ${{ steps.detect-details.outcome }} |" + echo "| Query raw | ${query_icon} ${{ steps.query-raw.outcome }} |" + } >> "$GITHUB_STEP_SUMMARY" diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 4a946a861..f1e47bc50 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -4,14 +4,24 @@ on: types: - opened - edited + pull_request: + types: + - opened + - edited + - synchronize + - reopened permissions: issues: write + pull-requests: write contents: read +env: + FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" + jobs: issue-labeler: - if: github.repository_owner == 'GameServerManagers' + if: github.repository_owner == 'GameServerManagers' && github.event_name == 'issues' runs-on: ubuntu-latest steps: - name: Issue Labeler @@ -21,12 +31,28 @@ jobs: configuration-path: .github/labeler.yml enable-versioned-regex: 0 include-title: 1 + sync-labels: 1 + + pr-labeler: + if: github.repository_owner == 'GameServerManagers' && github.event_name == 'pull_request' + runs-on: ubuntu-latest + steps: + - name: PR Labeler + uses: github/issue-labeler@v3.4 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + configuration-path: .github/labeler.yml + enable-versioned-regex: 0 + include-title: 1 + include-body: 0 + sync-labels: 1 is-sponsor-label: - if: github.repository_owner == 'GameServerManagers' + if: github.repository_owner == 'GameServerManagers' && github.event_name == 'issues' runs-on: ubuntu-latest steps: - name: Is Sponsor Label + if: github.event.action == 'opened' uses: JasonEtco/is-sponsor-label-action@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index 8a08284a4..a0a810172 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Lock Threads - uses: dessant/lock-threads@v5 + uses: dessant/lock-threads@v6 with: github-token: ${{ secrets.GITHUB_TOKEN }} issue-comment: > diff --git a/.github/workflows/serverlist-validate.yml b/.github/workflows/serverlist-validate.yml index c2605b062..3e8807407 100644 --- a/.github/workflows/serverlist-validate.yml +++ b/.github/workflows/serverlist-validate.yml @@ -6,16 +6,19 @@ on: permissions: contents: read +env: + datadir: lgsm/data + jobs: serverlist-validate: if: github.repository_owner == 'GameServerManagers' runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Compare Versions - run: chmod +x .github/workflows/serverlist-validate.sh; .github/workflows/serverlist-validate.sh + run: .github/scripts/serverlist-validate.sh - name: Validate Game Icons - run: chmod +x .github/workflows/serverlist-validate-game-icons.sh; .github/workflows/serverlist-validate-game-icons.sh + run: .github/scripts/serverlist-validate-game-icons.sh diff --git a/.github/workflows/sync-game-labels.yml b/.github/workflows/sync-game-labels.yml new file mode 100644 index 000000000..eccb0ed46 --- /dev/null +++ b/.github/workflows/sync-game-labels.yml @@ -0,0 +1,28 @@ +name: Sync Game Labels +on: + push: + branches: + - master + - develop + paths: + - "lgsm/data/serverlist.csv" + workflow_dispatch: {} + +permissions: + issues: write + contents: read + +jobs: + sync-game-labels: + if: github.repository_owner == 'GameServerManagers' + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v5 + + - name: Sync game labels from serverlist + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + chmod +x .github/scripts/sync-game-labels.sh + .github/scripts/sync-game-labels.sh diff --git a/.github/workflows/trigger-docker-build.yml b/.github/workflows/trigger-docker-build.yml index 390123322..823592457 100644 --- a/.github/workflows/trigger-docker-build.yml +++ b/.github/workflows/trigger-docker-build.yml @@ -15,12 +15,22 @@ jobs: runs-on: ubuntu-latest steps: - name: Trigger Workflow and Wait (linuxgsm) - uses: convictional/trigger-workflow-and-wait@v1.6.5 - with: - owner: GameServerManagers - repo: docker-linuxgsm - github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - workflow_file_name: action-docker-publish.yml + env: + GH_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + run: | + before=$(date -u +%Y-%m-%dT%H:%M:%SZ) + gh workflow run action-docker-publish.yml --repo GameServerManagers/docker-linuxgsm + sleep 10 + run_id=$(gh run list \ + --workflow action-docker-publish.yml \ + --repo GameServerManagers/docker-linuxgsm \ + --created ">=${before}" \ + --limit 1 \ + --json databaseId \ + --jq '.[0].databaseId') + gh run watch "${run_id}" \ + --repo GameServerManagers/docker-linuxgsm \ + --exit-status trigger_build_docker-gameserver: if: github.repository_owner == 'GameServerManagers' @@ -29,9 +39,19 @@ jobs: runs-on: ubuntu-latest steps: - name: Trigger Workflow and Wait (gameserver) - uses: convictional/trigger-workflow-and-wait@v1.6.5 - with: - owner: GameServerManagers - repo: docker-gameserver - github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} - workflow_file_name: action-docker-publish.yml + env: + GH_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + run: | + before=$(date -u +%Y-%m-%dT%H:%M:%SZ) + gh workflow run action-docker-publish.yml --repo GameServerManagers/docker-gameserver + sleep 10 + run_id=$(gh run list \ + --workflow action-docker-publish.yml \ + --repo GameServerManagers/docker-gameserver \ + --created ">=${before}" \ + --limit 1 \ + --json databaseId \ + --jq '.[0].databaseId') + gh run watch "${run_id}" \ + --repo GameServerManagers/docker-gameserver \ + --exit-status diff --git a/.github/workflows/update-check.yml b/.github/workflows/update-check.yml index 8863cedc7..ad1150f7b 100644 --- a/.github/workflows/update-check.yml +++ b/.github/workflows/update-check.yml @@ -16,6 +16,8 @@ jobs: update-check: if: github.repository_owner == 'GameServerManagers' runs-on: ubuntu-latest + env: + LGSM_REF: ${{ github.event.pull_request.head.sha || github.ref_name }} strategy: fail-fast: false @@ -24,30 +26,30 @@ jobs: steps: - name: Download linuxgsm.sh - run: wget "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${GITHUB_REF#refs/heads/}/linuxgsm.sh"; chmod +x linuxgsm.sh + run: wget "https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/${LGSM_REF}/linuxgsm.sh"; chmod +x linuxgsm.sh - name: Install dependencies run: sudo dpkg --add-architecture i386; sudo apt-get update; - name: Grab server - run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./linuxgsm.sh ${{ matrix.shortname }}server + run: LGSM_GITHUBBRANCH="${LGSM_REF}" ./linuxgsm.sh ${{ matrix.shortname }}server - name: Enable developer mode - run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server developer + run: LGSM_GITHUBBRANCH="${LGSM_REF}" ./${{ matrix.shortname }}server developer - name: Insert steamuser if: matrix.shortname == 'jk2' run: echo -e "steamuser=\"${{ secrets.STEAMCMD_USER }}\"\nsteampass='${{ secrets.STEAMCMD_PASS }}'" > lgsm/config-lgsm/${{ matrix.shortname }}server/common.cfg - name: Install server - run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server auto-install + run: LGSM_GITHUBBRANCH="${LGSM_REF}" ./${{ matrix.shortname }}server auto-install - name: Check Update server - run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server check-update + run: LGSM_GITHUBBRANCH="${LGSM_REF}" ./${{ matrix.shortname }}server check-update - name: Update server - run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server update + run: LGSM_GITHUBBRANCH="${LGSM_REF}" ./${{ matrix.shortname }}server update - name: Force Update server if: matrix.shortname == 'css' - run: LGSM_GITHUBBRANCH="${GITHUB_REF#refs/heads/}" ./${{ matrix.shortname }}server force-update + run: LGSM_GITHUBBRANCH="${LGSM_REF}" ./${{ matrix.shortname }}server force-update diff --git a/.github/workflows/update-copyright-years-in-license-file.yml b/.github/workflows/update-copyright-years-in-license-file.yml index 1123b8cce..d9870a166 100644 --- a/.github/workflows/update-copyright-years-in-license-file.yml +++ b/.github/workflows/update-copyright-years-in-license-file.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 - name: Action Update License Year diff --git a/.github/workflows/version-check.yml b/.github/workflows/version-check.yml index cfa7615bd..0726295a4 100644 --- a/.github/workflows/version-check.yml +++ b/.github/workflows/version-check.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Version Check - run: chmod +x .github/workflows/version-check.sh; .github/workflows/version-check.sh + run: .github/scripts/version-check.sh diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index fb935a066..4b118cd09 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -2,131 +2,158 @@ ## Our Pledge -We as members, contributors, and leaders pledge to make participation in our -community a harassment-free experience for everyone, regardless of age, body -size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socio-economic status, -nationality, personal appearance, race, caste, color, religion, or sexual identity -and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, -diverse, inclusive, and healthy community. - -## Our Standards - -Examples of behavior that contributes to a positive environment for our -community include: - -- Demonstrating empathy and kindness toward other people -- Being respectful of differing opinions, viewpoints, and experiences -- Giving and gracefully accepting constructive feedback -- Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -- Focusing on what is best not just for us as individuals, but for the - overall community - -Examples of unacceptable behavior include: - -- The use of sexualized language or imagery, and sexual attention or - advances of any kind -- Trolling, insulting or derogatory comments, and personal or political attacks -- Public or private harassment -- Publishing others' private information, such as a physical or email - address, without their explicit permission -- Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Enforcement Responsibilities - -Community leaders are responsible for clarifying and enforcing our standards of -acceptable behavior and will take appropriate and fair corrective action in -response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. - -Community leaders have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, and will communicate reasons for moderation -decisions when appropriate. +We pledge to make our community welcoming, safe, and equitable for all. + +We are committed to fostering an environment that respects and promotes the +dignity, rights, and contributions of all individuals, regardless of characteristics +including race, ethnicity, caste, color, age, physical characteristics, +neurodiversity, disability, sex or gender, gender identity or expression, sexual +orientation, language, philosophy or religion, national or social origin, +socio-economic position, level of education, or other status. The same privileges of +participation are extended to everyone who participates in good faith and in +accordance with this Covenant. + +## Encouraged Behaviors + +While acknowledging differences in social norms, we all strive to meet our +community's expectations for positive behavior. We also understand that our words +and actions may be interpreted differently than we intend based on culture, +background, or native language. + +With these considerations in mind, we agree to behave mindfully toward each other +and act in ways that center our shared values, including: + +1. Respecting the **purpose of our community**, our activities, and our ways of gathering. +2. Engaging **kindly and honestly** with others. +3. Respecting **different viewpoints** and experiences. +4. **Taking responsibility** for our actions and contributions. +5. Gracefully giving and accepting **constructive feedback**. +6. Committing to **repairing harm** when it occurs. +7. Behaving in other ways that promote and sustain the **well-being of our community**. + +## Restricted Behaviors + +We agree to restrict the following behaviors in our community. Instances, +threats, and promotion of these behaviors are violations of this Code of Conduct. + +1. **Harassment.** Violating explicitly expressed boundaries or engaging in + unnecessary personal attention after any clear request to stop. +2. **Character attacks.** Making insulting, demeaning, or pejorative comments + directed at a community member or group of people. +3. **Stereotyping or discrimination.** Characterizing anyone's personality or + behavior on the basis of immutable identities or traits. +4. **Sexualization.** Behaving in a way that would generally be considered + inappropriately intimate in the context or purpose of the community. +5. **Violating confidentiality.** Sharing or acting on someone's personal or + private information without their permission. +6. **Endangerment.** Causing, encouraging, or threatening violence or other harm + toward any person or group. +7. Behaving in other ways that **threaten the well-being** of our community. + +### Other Restrictions + +1. **Misleading identity.** Impersonating someone else for any reason, or + pretending to be someone else to evade enforcement actions. +2. **Failing to credit sources.** Not properly crediting the sources of content + you contribute. +3. **Promotional materials.** Sharing marketing or other commercial content in a + way that is outside the norms of the community. +4. **Irresponsible communication.** Failing to responsibly present content which + includes, links or describes any other restricted behaviors. + +## Reporting an Issue + +Tensions can occur between community members even when they are trying their best +to collaborate. Not every conflict represents a code of conduct violation, and this +Code of Conduct reinforces encouraged behaviors and norms that can help avoid +conflicts and minimize harm. + +When an incident does occur, it is important to report it promptly. To report a +possible violation, please use one of the following methods: + +- **GitHub (private):** [Submit a private security advisory](https://github.com/GameServerManagers/LinuxGSM/security/advisories/new) +- **Discord:** Contact a moderator via the [LinuxGSM Discord server](https://linuxgsm.com/discord) + +Community Moderators take reports of violations seriously and will make every +effort to respond in a timely manner. They will investigate all reports of code of +conduct violations, reviewing messages, logs, and recordings, or interviewing +witnesses and other participants. Community Moderators will keep investigation and +enforcement actions as transparent as possible while prioritizing safety and +confidentiality. In order to honor these values, enforcement actions are carried out +in private with the involved parties, but communicating to the whole community may +be part of a mutually agreed upon resolution. + +## Addressing and Repairing Harm + +If an investigation by the Community Moderators finds that this Code of Conduct +has been violated, the following enforcement ladder may be used to determine how +best to repair harm, based on the incident's impact on the individuals involved +and the community as a whole. Depending on the severity of a violation, lower +rungs on the ladder may be skipped. + +1. **Warning** + 1. Event: A violation involving a single incident or series of incidents. + 2. Consequence: A private, written warning from the Community Moderators. + 3. Repair: Examples of repair include a private written apology, acknowledgement + of responsibility, and seeking clarification on expectations. + +2. **Temporarily Limited Activities** + 1. Event: A repeated incidence of a violation that previously resulted in a + warning, or the first incidence of a more serious violation. + 2. Consequence: A private, written warning with a time-limited cooldown period + designed to underscore the seriousness of the situation and give the community + members involved time to process the incident. The cooldown period may be + limited to particular communication channels or interactions with particular + community members. + 3. Repair: Examples of repair may include making an apology, using the cooldown + period to reflect on actions and impact, and being thoughtful about + re-entering community spaces after the period is over. + +3. **Temporary Suspension** + 1. Event: A pattern of repeated violation which the Community Moderators have + tried to address with warnings, or a single serious violation. + 2. Consequence: A private written warning with conditions for return from + suspension. In general, temporary suspensions give the person being suspended + time to reflect upon their behavior and possible corrective actions. + 3. Repair: Examples of repair include respecting the spirit of the suspension, + meeting the specified conditions for return, and being thoughtful about how to + reintegrate with the community when the suspension is lifted. + +4. **Permanent Ban** + 1. Event: A pattern of repeated code of conduct violations that other steps on + the ladder have failed to resolve, or a violation so serious that the Community + Moderators determine there is no way to keep the community safe with this + person as a member. + 2. Consequence: Access to all community spaces, tools, and communication channels + is removed. In general, permanent bans should be rarely used, should have + strong reasoning behind them, and should only be resorted to if working through + other remedies has failed to change the behavior. + 3. Repair: There is no possible repair in cases of this severity. + +This enforcement ladder is intended as a guideline. It does not limit the ability +of Community Moderators to use their discretion and judgment, in keeping with the +best interests of our community. ## Scope -This Code of Conduct applies within all community spaces, and also applies when -an individual is officially representing the community in public spaces. -Examples of representing our community include using an official e-mail address, +This Code of Conduct applies within all community spaces, and also applies when an +individual is officially representing the community in public or other spaces. +Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event. -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at -[INSERT CONTACT METHOD]. -All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. - -## Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining -the consequences for any action they deem in violation of this Code of Conduct: - -### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed -unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing -clarity around the nature of the violation and an explanation of why the -behavior was inappropriate. A public apology may be requested. - -### 2. Warning - -**Community Impact**: A violation through a single incident or series -of actions. - -**Consequence**: A warning with consequences for continued behavior. No -interaction with the people involved, including unsolicited interaction with -those enforcing the Code of Conduct, for a specified period of time. This -includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or -permanent ban. - -### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including -sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public -communication with the community for a specified period of time. No public or -private interaction with the people involved, including unsolicited interaction -with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an -individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within -the community. - ## Attribution -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 2.1, available at -[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. - -Community Impact Guidelines were inspired by -[Mozilla's code of conduct enforcement ladder][mozilla coc]. +This Code of Conduct is adapted from the Contributor Covenant, version 3.0, +permanently available at . -For answers to common questions about this code of conduct, see the FAQ at -[https://www.contributor-covenant.org/faq][faq]. Translations are available -at [https://www.contributor-covenant.org/translations][translations]. +Contributor Covenant is stewarded by the Organization for Ethical Source and +licensed under CC BY-SA 4.0. To view a copy of this license, visit +. -[homepage]: https://www.contributor-covenant.org -[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html -[mozilla coc]: https://github.com/mozilla/diversity -[faq]: https://www.contributor-covenant.org/faq -[translations]: https://www.contributor-covenant.org/translations +For answers to common questions about Contributor Covenant, see the FAQ at +. Translations are provided at +. Additional enforcement and +community guideline resources can be found at +. The enforcement ladder was +inspired by the work of [Mozilla's code of conduct team](https://github.com/mozilla/inclusion). diff --git a/lgsm/config-default/config-lgsm/jbep3server/_default.cfg b/lgsm/config-default/config-lgsm/jbep3server/_default.cfg new file mode 100644 index 000000000..069c423db --- /dev/null +++ b/lgsm/config-default/config-lgsm/jbep3server/_default.cfg @@ -0,0 +1,198 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! +# Copy settings from here and use them in either: +# common.cfg - applies settings to every instance. +# [instance].cfg - applies settings to a specific instance. + +#### Game Server Settings #### + +## Predefined Parameters | https://docs.linuxgsm.com/configuration/start-parameters +ip="0.0.0.0" +port="27015" +clientport="27005" +sourcetvport="27020" +defaultmap="crossfire" +maxplayers="24" + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="-game jbep3 -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers ${maxplayers}" + +#### LinuxGSM Settings #### + +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + +## Notification Alerts +# (on|off) + +# Display IP | https://docs.linuxgsm.com/alerts#display-ip +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# Alert on Start/Stop/Restart +statusalert="off" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# ntfy Alerts | https://docs.linuxgsm.com/alerts/ntfy +ntfyalert="off" +ntfytopic="LinuxGSM" +ntfyserver="https://ntfy.sh" +ntfytoken="" +ntfyusername="" +ntfypassword="" +ntfypriority="" +ntfytags="" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" +pushoveruserkey="userkey" + +# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat +rocketchatalert="off" +rocketchatwebhook="webhook" + +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +slackalert="off" +slackwebhook="webhook" + +# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram +# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help all". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +telegramthreadid="" +telegramsilentnotification="false" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors +ansi="on" + +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +sleeptime="0.5" + +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd +# Server appid +appid="869800" +steamcmdforcewindows="no" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="true" + +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: GoldSrc +# 10: Avorion +# 11: end +stopmode="3" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Console type +consoleverbose="yes" +consoleinteract="yes" + +## Game Server Details +# Do not edit +gamename="Jabroni Brawl: Episode 3" +engine="source" +glibc="2.3.6" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}/jbep3" +executabledir="${serverfiles}" +executable="./srcds_run.sh" +servercfgdir="${systemdir}/cfg" +servercfg="${selfname}.cfg" +servercfgdefault="server.sample.cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/config-default/config-lgsm/mcvserver/_default.cfg b/lgsm/config-default/config-lgsm/mcvserver/_default.cfg new file mode 100644 index 000000000..3d822892a --- /dev/null +++ b/lgsm/config-default/config-lgsm/mcvserver/_default.cfg @@ -0,0 +1,189 @@ +################################## +######## Default Settings ######## +################################## +# DO NOT EDIT, ANY CHANGES WILL BE OVERWRITTEN! +# Copy settings from here and use them in either: +# common.cfg - applies settings to every instance. +# [instance].cfg - applies settings to a specific instance. + +#### Game Server Settings #### + +game_type="0" +game_mode="0" +ip="0.0.0.0" +port="27015" +clientport="27005" +sourcetvport="27020" +steamport="26901" +defaultmap="mcv_siege" +maxplayers="32" +tickrate="64" + +## Server Parameters | https://docs.linuxgsm.com/configuration/start-parameters#additional-parameters +startparameters="-game vietnam -usercon -strictportbind -ip ${ip} -port ${port} +clientport ${clientport} +tv_port ${sourcetvport} -tickrate ${tickrate} +map ${defaultmap} +servercfgfile ${servercfg} -maxplayers_override ${maxplayers} +game_type ${game_type} +game_mode ${game_mode} -nobreakpad" + +#### LinuxGSM Settings #### + +## LinuxGSM Stats +# Send useful stats to LinuxGSM developers. +# https://docs.linuxgsm.com/configuration/linuxgsm-stats +# (on|off) +stats="off" + +## Notification Alerts +# (on|off) + +# Display IP | https://docs.linuxgsm.com/alerts#display-ip +displayip="" + +# More info | https://docs.linuxgsm.com/alerts#more-info +postalert="off" + +# Alert on Start/Stop/Restart +statusalert="off" + +# Discord Alerts | https://docs.linuxgsm.com/alerts/discord +discordalert="off" +discordwebhook="webhook" + +# Email Alerts | https://docs.linuxgsm.com/alerts/email +emailalert="off" +email="email@example.com" +emailfrom="" + +# Gotify Alerts | https://docs.linuxgsm.com/alerts/gotify +gotifyalert="off" +gotifytoken="token" +gotifywebhook="webhook" + +# IFTTT Alerts | https://docs.linuxgsm.com/alerts/ifttt +iftttalert="off" +ifttttoken="accesstoken" +iftttevent="linuxgsm_alert" + +# Pushbullet Alerts | https://docs.linuxgsm.com/alerts/pushbullet +pushbulletalert="off" +pushbullettoken="accesstoken" +channeltag="" + +# Pushover Alerts | https://docs.linuxgsm.com/alerts/pushover +pushoveralert="off" +pushovertoken="accesstoken" +pushoveruserkey="userkey" + +# Rocket.Chat Alerts | https://docs.linuxgsm.com/alerts/rocket.chat +rocketchatalert="off" +rocketchatwebhook="webhook" + +# Slack Alerts | https://docs.linuxgsm.com/alerts/slack +slackalert="off" +slackwebhook="webhook" + +# Telegram Alerts | https://docs.linuxgsm.com/alerts/telegram +# You can add a custom cURL string eg proxy (useful in Russia) in "curlcustomstring". +# For example "--socks5 ipaddr:port" for socks5 proxy see more in "curl --help". +telegramapi="api.telegram.org" +telegramalert="off" +telegramtoken="accesstoken" +telegramchatid="" +curlcustomstring="" + +## Updating | https://docs.linuxgsm.com/commands/update +updateonstart="off" + +## Backup | https://docs.linuxgsm.com/commands/backup +maxbackups="4" +maxbackupdays="30" +stoponbackup="on" + +## Logging | https://docs.linuxgsm.com/features/logging +consolelogging="on" +logdays="7" + +## Monitor | https://docs.linuxgsm.com/commands/monitor +# Query delay time +querydelay="1" + +## ANSI Colors | https://docs.linuxgsm.com/features/ansi-colors +ansi="on" + +#### Advanced Settings #### + +## Message Display Time | https://docs.linuxgsm.com/features/message-display-time +sleeptime="0.5" + +## SteamCMD Settings | https://docs.linuxgsm.com/steamcmd +# Server appid +appid="1136190" +steamcmdforcewindows="no" +# SteamCMD Branch | https://docs.linuxgsm.com/steamcmd/branch +branch="" +betapassword="" +# Master Server | https://docs.linuxgsm.com/steamcmd/steam-master-server +steammaster="false" + +## Stop Mode | https://docs.linuxgsm.com/features/stop-mode +# 1: tmux kill +# 2: CTRL+c +# 3: quit +# 4: quit 120s +# 5: stop +# 6: q +# 7: exit +# 8: 7 Days to Die +# 9: GoldSrc +# 10: Avorion +# 11: end +stopmode="3" + +## Query mode +# 1: session only +# 2: gamedig (gsquery fallback) +# 3: gamedig +# 4: gsquery +# 5: tcp +querymode="2" +querytype="protocol-valve" + +## Console type +consoleverbose="yes" +consoleinteract="yes" + +## Game Server Details +# Do not edit +gamename="Military Conflict: Vietnam" +engine="source" +glibc="2.15" + +#### Directories #### +# Edit with care + +## Game Server Directories +systemdir="${serverfiles}/vietnam" +executabledir="${serverfiles}" +executable="./srcds_run_x64" +servercfgdir="${systemdir}/cfg" +servercfg="${selfname}.cfg" +servercfgdefault="server.cfg" +servercfgfullpath="${servercfgdir}/${servercfg}" + +## Backup Directory +backupdir="${lgsmdir}/backup" + +## Logging Directories +[ -n "${LGSM_LOGDIR}" ] && logdir="${LGSM_LOGDIR}" || logdir="${rootdir}/log" +gamelogdir="${systemdir}/logs" +lgsmlogdir="${logdir}/script" +consolelogdir="${logdir}/console" +lgsmlog="${lgsmlogdir}/${selfname}-script.log" +consolelog="${consolelogdir}/${selfname}-console.log" +alertlog="${lgsmlogdir}/${selfname}-alert.log" +postdetailslog="${lgsmlogdir}/${selfname}-postdetails.log" + +## Logs Naming +lgsmlogdate="${lgsmlogdir}/${selfname}-script-$(date '+%Y-%m-%d-%H:%M:%S').log" +consolelogdate="${consolelogdir}/${selfname}-console-$(date '+%Y-%m-%d-%H:%M:%S').log" + +## Log Parameters +logtimestamp="off" +logtimestampformat="%Y-%m-%d %H:%M:%S" diff --git a/lgsm/data/almalinux-8.csv b/lgsm/data/almalinux-8.csv index 2405a4b3e..e02ca7858 100644 --- a/lgsm/data/almalinux-8.csv +++ b/lgsm/data/almalinux-8.csv @@ -58,6 +58,7 @@ hz ins inss ios +jbep3 jc2 jc3 jk2 @@ -67,6 +68,7 @@ l4d l4d2 mc,java-21-openjdk mcb,libnsl +mcv mh mohaa,compat-libstdc++-33.i686 mta,ncurses-compat-libs,libxml2 @@ -82,7 +84,6 @@ opfor pc pc2 pmc,java-21-openjdk -ps,GConf2 pvkii pvr,libcxx pw @@ -109,12 +110,14 @@ sm,telnet,expect sof2 sol squad +squad44 st,libxml2 stn sven terraria tf tf2,libcurl.i686 +tf2c,libcurl.i686 tfc ti ts diff --git a/lgsm/data/almalinux-9.csv b/lgsm/data/almalinux-9.csv index 069e8e437..5a6d996e7 100644 --- a/lgsm/data/almalinux-9.csv +++ b/lgsm/data/almalinux-9.csv @@ -58,6 +58,7 @@ hz ins inss ios +jbep3 jc2 jc3 jk2 @@ -67,6 +68,7 @@ l4d l4d2 mc,java-21-openjdk mcb,libnsl +mcv mh mohaa,compat-libstdc++-33.i686 mta,ncurses-compat-libs,libxml2 @@ -82,7 +84,6 @@ opfor pc pc2 pmc,java-21-openjdk -ps,GConf2 pvkii pvr,libcxx pw @@ -109,12 +110,14 @@ sm,telnet,expect sof2 sol squad +squad44 st,libxml2 stn sven terraria tf tf2,libcurl.i686 +tf2c,libcurl.i686 tfc ti ts diff --git a/lgsm/data/centos-7.csv b/lgsm/data/centos-7.csv index 39af5868d..c5632722e 100644 --- a/lgsm/data/centos-7.csv +++ b/lgsm/data/centos-7.csv @@ -58,6 +58,7 @@ hz ins inss ios +jbep3 jc2 jc3 jk2 @@ -67,6 +68,7 @@ l4d l4d2 mc,java-21-openjdk mcb,libnsl +mcv mh mohaa,compat-libstdc++-33.i686 mta,ncurses-libs,libxml2 @@ -82,7 +84,6 @@ opfor pc pc2 pmc,java-11-openjdk -ps,GConf2 pvkii pvr,libcxx pw @@ -109,12 +110,14 @@ sm,telnet,expect sof2 sol squad +squad44 st,libxml2 stn sven terraria tf tf2,libcurl.i686 +tf2c,libcurl.i686 tfc ti ts diff --git a/lgsm/data/centos-8.csv b/lgsm/data/centos-8.csv index bcaf1e31d..0b0b766d0 100644 --- a/lgsm/data/centos-8.csv +++ b/lgsm/data/centos-8.csv @@ -58,6 +58,7 @@ hz ins inss ios +jbep3 jc2 jc3 jk2 @@ -67,6 +68,7 @@ l4d l4d2 mc,java-21-openjdk mcb,libnsl +mcv mh mohaa,compat-libstdc++-33.i686 mta,ncurses-compat-libs,libxml2 @@ -82,7 +84,6 @@ opfor pc pc2 pmc,java-17-openjdk -ps,GConf2 pvkii pvr,libcxx pw @@ -109,12 +110,14 @@ sm,telnet,expect sof2 sol squad +squad44 st,libxml2 stn sven terraria tf tf2,libcurl.i686 +tf2c,libcurl.i686 tfc ti ts diff --git a/lgsm/data/centos-9.csv b/lgsm/data/centos-9.csv index 446a55ebb..fd9c0fa39 100644 --- a/lgsm/data/centos-9.csv +++ b/lgsm/data/centos-9.csv @@ -58,6 +58,7 @@ hz ins inss ios +jbep3 jc2 jc3 jk2 @@ -67,6 +68,7 @@ l4d l4d2 mc,java-17-openjdk mcb,libnsl +mcv mh mohaa,compat-libstdc++-33.i686 mta,ncurses-compat-libs,libxml2 @@ -82,7 +84,6 @@ opfor pc pc2 pmc,java-17-openjdk -ps,GConf2 pvkii pvr,libcxx pw @@ -109,12 +110,14 @@ sm,telnet,expect sof2 sol squad +squad44 st,libxml2 stn sven terraria tf tf2,libcurl.i686 +tf2c,libcurl.i686 tfc ti ts diff --git a/lgsm/data/debian-10.csv b/lgsm/data/debian-10.csv index e0c6ea7e4..5b8d73a06 100644 --- a/lgsm/data/debian-10.csv +++ b/lgsm/data/debian-10.csv @@ -57,6 +57,7 @@ hz ins inss ios +jbep3 jc2 jc3 jk2 @@ -66,6 +67,7 @@ l4d l4d2 mc,openjdk-11-jre mcb +mcv mh mohaa,libstdc++5:i386 mta,libncursesw5,libxml2-utils @@ -115,6 +117,7 @@ sven,zlib1g:i386 terraria tf tf2,libcurl4-gnutls-dev:i386 +tf2c,libcurl4-gnutls-dev:i386 tfc ti ts diff --git a/lgsm/data/debian-11.csv b/lgsm/data/debian-11.csv index 0d2652293..adba97d27 100644 --- a/lgsm/data/debian-11.csv +++ b/lgsm/data/debian-11.csv @@ -58,6 +58,7 @@ hz ins inss ios +jbep3 jc2 jc3 jk2 @@ -67,6 +68,7 @@ l4d l4d2 mc,openjdk-17-jre mcb +mcv mh mohaa,libstdc++5:i386 mta,libncursesw5,libxml2-utils @@ -115,6 +117,7 @@ sven,zlib1g:i386 terraria tf tf2,libcurl4-gnutls-dev:i386 +tf2c,libcurl4-gnutls-dev:i386 tfc ti ts diff --git a/lgsm/data/debian-12.csv b/lgsm/data/debian-12.csv index e67a822b7..40e325b6c 100644 --- a/lgsm/data/debian-12.csv +++ b/lgsm/data/debian-12.csv @@ -58,6 +58,7 @@ hz ins inss ios +jbep3 jc2 jc3 jk2 @@ -67,6 +68,7 @@ l4d l4d2 mc,openjdk-17-jre mcb +mcv mh mohaa,libstdc++5:i386 mta,libncursesw5,libxml2-utils @@ -115,6 +117,7 @@ sven,libssl3:i386,zlib1g:i386 terraria tf tf2,libcurl4-gnutls-dev:i386 +tf2c,libcurl4-gnutls-dev:i386 tfc ti ts @@ -127,7 +130,7 @@ ut2k4 ut3 ut99 vh,libc6-dev,libatomic1,libpulse-dev -vints,dotnet-runtime-8.0 +vints,dotnet-runtime-10.0 vpmc,openjdk-17-jre vs wet diff --git a/lgsm/data/debian-13.csv b/lgsm/data/debian-13.csv index e7a622a7e..94c6cf1ae 100644 --- a/lgsm/data/debian-13.csv +++ b/lgsm/data/debian-13.csv @@ -16,7 +16,7 @@ bfv,libncurses5:i386,libstdc++5:i386 bmdm,libncurses5:i386 bo bs -bt,libicu-dev,dos2unix,libxml2-utils +bt,libicu-dev,dos2unix,libxml2 btl cc ck,xvfb,libxi6 @@ -58,6 +58,7 @@ hz ins inss ios +jbep3 jc2 jc3 jk2 @@ -67,9 +68,10 @@ l4d l4d2 mc,openjdk-25-jre mcb +mcv mh mohaa,libstdc++5:i386 -mta,libncursesw5,libxml2-utils +mta,libncursesw6,libxml2 nd nec nmrih @@ -102,19 +104,20 @@ sb sbots scpsl,mono-complete,libicu76 scpslsm,mono-complete -sdtd,telnet,expect,libxml2-utils +sdtd,telnet,expect,libxml2 sf sfc sm,telnet,expect sof2 sol squad -st,libxml2-utils +st,libxml2 stn sven,libssl3:i386,zlib1g:i386 terraria tf tf2,libcurl4-gnutls-dev:i386 +tf2c,libcurl4-gnutls-dev:i386 tfc ti ts @@ -127,12 +130,12 @@ ut2k4 ut3 ut99 vh,libc6-dev,libatomic1,libpulse-dev -vints,dotnet-runtime-8.0 -vpmc,openjdk-21-jre +vints,dotnet-runtime-10.0 +vpmc,openjdk-25-jre vs wet wf -wmc,openjdk21-jre +wmc,openjdk-25-jre wurm,xvfb xnt zmr diff --git a/lgsm/data/debian-9.csv b/lgsm/data/debian-9.csv index a111c6800..c0e990961 100644 --- a/lgsm/data/debian-9.csv +++ b/lgsm/data/debian-9.csv @@ -58,6 +58,7 @@ hz ins inss ios +jbep3 jc2 jc3 jk2 @@ -67,6 +68,7 @@ l4d l4d2 mc,openjdk-8-jre mcb +mcv mh mohaa,libstdc++5:i386 mta,libncursesw5,libxml2-utils @@ -115,6 +117,7 @@ sven,zlib1g:i386 terraria tf tf2,libcurl4-gnutls-dev:i386 +tf2c,libcurl4-gnutls-dev:i386 tfc ti ts diff --git a/lgsm/data/gameicons/jbep3-icon.png b/lgsm/data/gameicons/jbep3-icon.png new file mode 100644 index 000000000..609a0345f Binary files /dev/null and b/lgsm/data/gameicons/jbep3-icon.png differ diff --git a/lgsm/data/gameicons/mcv-icon.png b/lgsm/data/gameicons/mcv-icon.png new file mode 100644 index 000000000..fefcc2346 Binary files /dev/null and b/lgsm/data/gameicons/mcv-icon.png differ diff --git a/lgsm/data/gameicons/ps-icon.png b/lgsm/data/gameicons/ps-icon.png deleted file mode 100644 index afe81e823..000000000 Binary files a/lgsm/data/gameicons/ps-icon.png and /dev/null differ diff --git a/lgsm/data/gameicons/squad44-icon.png b/lgsm/data/gameicons/squad44-icon.png new file mode 100644 index 000000000..0d2a6fc8e Binary files /dev/null and b/lgsm/data/gameicons/squad44-icon.png differ diff --git a/lgsm/data/gameicons/tf2c-icon.png b/lgsm/data/gameicons/tf2c-icon.png new file mode 100644 index 000000000..f466347a1 Binary files /dev/null and b/lgsm/data/gameicons/tf2c-icon.png differ diff --git a/lgsm/data/rhel-7.csv b/lgsm/data/rhel-7.csv index 26420d76f..d7801771c 100644 --- a/lgsm/data/rhel-7.csv +++ b/lgsm/data/rhel-7.csv @@ -59,6 +59,7 @@ hz ins inss ios +jbep3 jc2 jc3 jk2 @@ -68,6 +69,7 @@ l4d l4d2 mc,java-11-openjdk mcb,libnsl +mcv mh mohaa,compat-libstdc++-33.i686 mta,ncurses-libs,libxml2 @@ -83,7 +85,6 @@ opfor pc pc2 pmc,java-11-openjdk -ps,GConf2 pvkii pvr,libcxx pz,java-11-openjdk rng-tools @@ -109,12 +110,14 @@ sm,telnet,expect sof2 sol squad +squad44 st,libxml2 stn sven terraria tf tf2,libcurl.i686 +tf2c,libcurl.i686 tfc ti ts diff --git a/lgsm/data/rhel-8.csv b/lgsm/data/rhel-8.csv index 9515a12ac..d65424265 100644 --- a/lgsm/data/rhel-8.csv +++ b/lgsm/data/rhel-8.csv @@ -58,6 +58,7 @@ hz ins inss ios +jbep3 jc2 jc3 jk2 @@ -67,6 +68,7 @@ l4d l4d2 mc,java-21-openjdk mcb,libnsl +mcv mh mohaa,compat-libstdc++-33.i686 mta,ncurses-compat-libs,libxml2 @@ -82,7 +84,6 @@ opfor pc pc2 pmc,java-21-openjdk -ps,GConf2 pvkii pvr,libcxx pw @@ -109,12 +110,14 @@ sm,telnet,expect sof2 sol squad +squad44 st,libxml2 stn sven terraria tf tf2,libcurl.i686 +tf2c,libcurl.i686 tfc ti ts diff --git a/lgsm/data/rhel-9.csv b/lgsm/data/rhel-9.csv index 069e8e437..5a6d996e7 100644 --- a/lgsm/data/rhel-9.csv +++ b/lgsm/data/rhel-9.csv @@ -58,6 +58,7 @@ hz ins inss ios +jbep3 jc2 jc3 jk2 @@ -67,6 +68,7 @@ l4d l4d2 mc,java-21-openjdk mcb,libnsl +mcv mh mohaa,compat-libstdc++-33.i686 mta,ncurses-compat-libs,libxml2 @@ -82,7 +84,6 @@ opfor pc pc2 pmc,java-21-openjdk -ps,GConf2 pvkii pvr,libcxx pw @@ -109,12 +110,14 @@ sm,telnet,expect sof2 sol squad +squad44 st,libxml2 stn sven terraria tf tf2,libcurl.i686 +tf2c,libcurl.i686 tfc ti ts diff --git a/lgsm/data/rocky-8.csv b/lgsm/data/rocky-8.csv index 9515a12ac..d65424265 100644 --- a/lgsm/data/rocky-8.csv +++ b/lgsm/data/rocky-8.csv @@ -58,6 +58,7 @@ hz ins inss ios +jbep3 jc2 jc3 jk2 @@ -67,6 +68,7 @@ l4d l4d2 mc,java-21-openjdk mcb,libnsl +mcv mh mohaa,compat-libstdc++-33.i686 mta,ncurses-compat-libs,libxml2 @@ -82,7 +84,6 @@ opfor pc pc2 pmc,java-21-openjdk -ps,GConf2 pvkii pvr,libcxx pw @@ -109,12 +110,14 @@ sm,telnet,expect sof2 sol squad +squad44 st,libxml2 stn sven terraria tf tf2,libcurl.i686 +tf2c,libcurl.i686 tfc ti ts diff --git a/lgsm/data/rocky-9.csv b/lgsm/data/rocky-9.csv index 069e8e437..5a6d996e7 100644 --- a/lgsm/data/rocky-9.csv +++ b/lgsm/data/rocky-9.csv @@ -58,6 +58,7 @@ hz ins inss ios +jbep3 jc2 jc3 jk2 @@ -67,6 +68,7 @@ l4d l4d2 mc,java-21-openjdk mcb,libnsl +mcv mh mohaa,compat-libstdc++-33.i686 mta,ncurses-compat-libs,libxml2 @@ -82,7 +84,6 @@ opfor pc pc2 pmc,java-21-openjdk -ps,GConf2 pvkii pvr,libcxx pw @@ -109,12 +110,14 @@ sm,telnet,expect sof2 sol squad +squad44 st,libxml2 stn sven terraria tf tf2,libcurl.i686 +tf2c,libcurl.i686 tfc ti ts diff --git a/lgsm/data/serverlist.csv b/lgsm/data/serverlist.csv index 2f964a30d..3ddc013c3 100644 --- a/lgsm/data/serverlist.csv +++ b/lgsm/data/serverlist.csv @@ -57,6 +57,7 @@ hz,hzserver,Humanitz,ubuntu-24.04 ins,insserver,Insurgency,ubuntu-24.04 inss,inssserver,Insurgency: Sandstorm,ubuntu-24.04 ios,iosserver,IOSoccer,ubuntu-24.04 +jbep3,jbep3server,Jabroni Brawl: Episode 3,ubuntu-24.04 jc2,jc2server,Just Cause 2,ubuntu-24.04 jc3,jc3server,Just Cause 3,ubuntu-24.04 jk2,jk2server,Jedi Knight II: Jedi Outcast,ubuntu-24.04 @@ -66,6 +67,7 @@ l4d,l4dserver,Left 4 Dead,ubuntu-24.04 l4d2,l4d2server,Left 4 Dead 2,ubuntu-24.04 mc,mcserver,Minecraft,ubuntu-24.04 mcb,mcbserver,Minecraft Bedrock,ubuntu-24.04 +mcv,mcvserver,Military Conflict: Vietnam,ubuntu-24.04 mh,mhserver,MORDHAU,ubuntu-24.04 mohaa,mohaaserver,Medal of Honor: Allied Assault,ubuntu-24.04 mta,mtaserver,Multi Theft Auto,ubuntu-24.04 diff --git a/lgsm/data/ubuntu-16.04.csv b/lgsm/data/ubuntu-16.04.csv index 844903c3a..24fcf33e2 100644 --- a/lgsm/data/ubuntu-16.04.csv +++ b/lgsm/data/ubuntu-16.04.csv @@ -59,6 +59,7 @@ hz ins inss ios +jbep3 jc2 jc3 jk2 @@ -68,6 +69,7 @@ l4d l4d2 mc,openjdk-8-jre mcb +mcv mh mohaa,libstdc++5:i386 mta @@ -115,6 +117,7 @@ sven,zlib1g:i386 terraria tf tf2,libcurl4-gnutls-dev:i386 +tf2c,libcurl4-gnutls-dev:i386 tfc ti ts diff --git a/lgsm/data/ubuntu-18.04.csv b/lgsm/data/ubuntu-18.04.csv index b058c3024..b283b629a 100644 --- a/lgsm/data/ubuntu-18.04.csv +++ b/lgsm/data/ubuntu-18.04.csv @@ -59,6 +59,7 @@ hz ins inss ios +jbep3 jc2 jc3 jk2 @@ -68,6 +69,7 @@ l4d l4d2 mc,openjdk-11-jre mcb +mcv mh mohaa,libstdc++5:i386 mta,libncursesw5,libxml2-utils @@ -115,6 +117,7 @@ sven,zlib1g:i386 terraria tf tf2,libcurl4-gnutls-dev:i386 +tf2c,libcurl4-gnutls-dev:i386 tfc ti ts diff --git a/lgsm/data/ubuntu-20.04.csv b/lgsm/data/ubuntu-20.04.csv index dc54ea10f..b086d0095 100644 --- a/lgsm/data/ubuntu-20.04.csv +++ b/lgsm/data/ubuntu-20.04.csv @@ -58,6 +58,7 @@ hz ins inss ios +jbep3 jc2 jc3 jk2 @@ -67,6 +68,7 @@ l4d l4d2 mc,openjdk-21-jre mcb +mcv mh mohaa,libstdc++5:i386 mta,libncursesw5,libxml2-utils @@ -115,6 +117,7 @@ sven,zlib1g:i386 terraria tf tf2,libcurl4-gnutls-dev:i386 +tf2c,libcurl4-gnutls-dev:i386 tfc ti ts diff --git a/lgsm/data/ubuntu-22.04.csv b/lgsm/data/ubuntu-22.04.csv index 46c036e1b..93bfbd4cf 100644 --- a/lgsm/data/ubuntu-22.04.csv +++ b/lgsm/data/ubuntu-22.04.csv @@ -58,6 +58,7 @@ hz ins inss ios +jbep3 jc2 jc3 jk2 @@ -67,6 +68,7 @@ l4d l4d2 mc,openjdk-21-jre mcb +mcv mh mohaa,libstdc++5:i386 mta,libncursesw5,libxml2-utils @@ -115,6 +117,7 @@ sven,zlib1g:i386 terraria tf tf2,libcurl4-gnutls-dev:i386 +tf2c,libcurl4-gnutls-dev:i386 tfc ti ts diff --git a/lgsm/data/ubuntu-23.04.csv b/lgsm/data/ubuntu-23.04.csv index ca84edf29..cb871bde0 100644 --- a/lgsm/data/ubuntu-23.04.csv +++ b/lgsm/data/ubuntu-23.04.csv @@ -58,6 +58,7 @@ hz ins inss ios +jbep3 jc2 jc3 jk2 @@ -67,6 +68,7 @@ l4d l4d2 mc,openjdk-21-jre mcb +mcv mh mohaa,libstdc++5:i386 mta,libncursesw5,libxml2-utils @@ -115,6 +117,7 @@ sven,zlib1g:i386 terraria tf tf2,libcurl4-gnutls-dev:i386 +tf2c,libcurl4-gnutls-dev:i386 tfc ti ts diff --git a/lgsm/data/ubuntu-23.10.csv b/lgsm/data/ubuntu-23.10.csv index ca84edf29..cb871bde0 100644 --- a/lgsm/data/ubuntu-23.10.csv +++ b/lgsm/data/ubuntu-23.10.csv @@ -58,6 +58,7 @@ hz ins inss ios +jbep3 jc2 jc3 jk2 @@ -67,6 +68,7 @@ l4d l4d2 mc,openjdk-21-jre mcb +mcv mh mohaa,libstdc++5:i386 mta,libncursesw5,libxml2-utils @@ -115,6 +117,7 @@ sven,zlib1g:i386 terraria tf tf2,libcurl4-gnutls-dev:i386 +tf2c,libcurl4-gnutls-dev:i386 tfc ti ts diff --git a/lgsm/data/ubuntu-24.04.csv b/lgsm/data/ubuntu-24.04.csv index ff95bec14..0e010abd6 100644 --- a/lgsm/data/ubuntu-24.04.csv +++ b/lgsm/data/ubuntu-24.04.csv @@ -58,6 +58,7 @@ hz ins inss ios +jbep3 jc2 jc3 jk2 @@ -67,6 +68,7 @@ l4d l4d2 mc,openjdk-25-jre mcb +mcv mh mohaa,libstdc++5:i386 mta,libxml2-utils @@ -81,12 +83,11 @@ onset,libmariadb-dev opfor pc pc2 -pmc,openjdk-21-jre -ps +pmc,openjdk-25-jre pvkii pvr,libc++1 pw -pz,openjdk-21-jre,rng-tools5 +pz,openjdk-25-jre,rng-tools5 q2 q3 q4 @@ -96,7 +97,7 @@ ricochet ro rtcw rust,lib32z1 -rw,openjdk-21-jre +rw,openjdk-25-jre samp sb sbots @@ -109,12 +110,14 @@ sm,telnet,expect sof2 sol squad +squad44 st,libxml2-utils stn sven,zlib1g:i386 terraria tf tf2,libcurl4-gnutls-dev:i386 +tf2c,libcurl4-gnutls-dev:i386 tfc ti ts @@ -127,12 +130,12 @@ ut2k4 ut3 ut99 vh,libc6-dev,libatomic1,libpulse-dev -vints,dotnet-runtime-8.0 -vpmc,openjdk-21-jre +vints,dotnet-runtime-10.0 +vpmc,openjdk-25-jre vs wet wf -wmc,openjdk-21-jre +wmc,openjdk-25-jre wurm,xvfb xnt zmr diff --git a/lgsm/data/ubuntu-26.04.csv b/lgsm/data/ubuntu-26.04.csv new file mode 100644 index 000000000..0e010abd6 --- /dev/null +++ b/lgsm/data/ubuntu-26.04.csv @@ -0,0 +1,142 @@ +all,bc,binutils,bsdmainutils,bzip2,ca-certificates,cpio,curl,distro-info,file,gzip,hostname,jq,lib32gcc-s1,lib32stdc++6,netcat-openbsd,pigz,python3,tar,tmux,unzip,util-linux,uuid-runtime,wget,xz-utils +steamcmd,lib32gcc-s1,lib32stdc++6,libsdl2-2.0-0:i386,steamcmd +ac +ahl +ahl2 +ark +arma3 +armar,libcurl4t64 +ats +av +bb +bb2,libcurl4-gnutls-dev:i386 +bd +bf1942 +bfv,libstdc++5:i386 +bmdm +bo +bs +bt,libicu-dev,dos2unix,libxml2-utils +btl +cc +ck,xvfb,libxi6 +cmw +cod,libstdc++5:i386 +cod2,libstdc++5:i386 +cod4 +coduo,libstdc++5:i386 +codwaw +col +cs +cs2 +cscz +csgo +css +ct +dab +dayz +dmc +dod +dodr +dods +doi +dst,libcurl4-gnutls-dev:i386 +dys +eco,libgdiplus +em +etl +ets2 +fctr +fof +gmod +hcu +hl2dm +hldm +hldms +hw,lib32z1 +hz +ins +inss +ios +jbep3 +jc2 +jc3 +jk2 +kf +kf2 +l4d +l4d2 +mc,openjdk-25-jre +mcb +mcv +mh +mohaa,libstdc++5:i386 +mta,libxml2-utils +nd +nec +nmrih +ns +ns2,speex +ns2c,speex:i386 +ohd +onset,libmariadb-dev +opfor +pc +pc2 +pmc,openjdk-25-jre +pvkii +pvr,libc++1 +pw +pz,openjdk-25-jre,rng-tools5 +q2 +q3 +q4 +ql +qw +ricochet +ro +rtcw +rust,lib32z1 +rw,openjdk-25-jre +samp +sb +sbots +scpsl,mono-complete +scpslsm,mono-complete +sdtd,telnet,expect,libxml2-utils +sf +sfc +sm,telnet,expect +sof2 +sol +squad +squad44 +st,libxml2-utils +stn +sven,zlib1g:i386 +terraria +tf +tf2,libcurl4-gnutls-dev:i386 +tf2c,libcurl4-gnutls-dev:i386 +tfc +ti +ts +ts3 +tu +tw +unt +ut +ut2k4 +ut3 +ut99 +vh,libc6-dev,libatomic1,libpulse-dev +vints,dotnet-runtime-10.0 +vpmc,openjdk-25-jre +vs +wet +wf +wmc,openjdk-25-jre +wurm,xvfb +xnt +zmr +zps diff --git a/lgsm/modules/check_deps.sh b/lgsm/modules/check_deps.sh index 6d572fd40..b03189897 100755 --- a/lgsm/modules/check_deps.sh +++ b/lgsm/modules/check_deps.sh @@ -8,15 +8,28 @@ moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" fn_install_dotnet_repo() { + local dotnetpackage + dotnetpackage="dotnet-runtime-7.0" + + for dep in "${array_deps_missing[@]}"; do + if [[ "${dep}" == dotnet-runtime-* ]]; then + dotnetpackage="${dep}" + break + fi + done + if [ "${distroid}" == "ubuntu" ]; then - # if package dotnet-runtime-7.0 is unavailable in ubuntu repos, add the microsoft repo. - if ! apt-cache show dotnet-runtime-7.0 > /dev/null 2>&1; then + # If the required .NET package is unavailable in Ubuntu repos, add the Microsoft repo. + if ! apt-cache show "${dotnetpackage}" > /dev/null 2>&1; then fn_fetch_file "https://packages.microsoft.com/config/ubuntu/${distroversion}/packages-microsoft-prod.deb" "" "" "" "/tmp" "packages-microsoft-prod.deb" "" "" "" "" sudo dpkg -i /tmp/packages-microsoft-prod.deb fi elif [ "${distroid}" == "debian" ]; then - fn_fetch_file "https://packages.microsoft.com/config/debian/${distroversion}/packages-microsoft-prod.deb" "" "" "" "/tmp" "packages-microsoft-prod.deb" "" "" "" "" - sudo dpkg -i /tmp/packages-microsoft-prod.deb + # If the required .NET package is unavailable in Debian repos, add the Microsoft repo. + if ! apt-cache show "${dotnetpackage}" > /dev/null 2>&1; then + fn_fetch_file "https://packages.microsoft.com/config/debian/${distroversion}/packages-microsoft-prod.deb" "" "" "" "/tmp" "packages-microsoft-prod.deb" "" "" "" "" + sudo dpkg -i /tmp/packages-microsoft-prod.deb + fi fi } @@ -113,6 +126,9 @@ fn_deps_email() { array_deps_required+=(exim4) elif [ -d /etc/sendmail ]; then array_deps_required+=(sendmail) + elif [ "$(command -v apt 2> /dev/null)" ] && [ -d /etc/nullmailer ]; then + # 'mailutils' provides the 'mail' binary, 'nullmailer' is the MTA + array_deps_required+=(mailutils nullmailer) elif [ "$(command -v yum 2> /dev/null)" ] || [ "$(command -v dnf 2> /dev/null)" ]; then array_deps_required+=(s-nail postfix) elif [ "$(command -v apt 2> /dev/null)" ]; then @@ -281,10 +297,10 @@ fn_deps_detector() { depstatus=1 monoinstalled=false fi - # .NET Core: A .NET Core repo needs to be installed. - elif [ "${deptocheck}" == "dotnet-runtime-7.0" ]; then - # .NET is not installed. - if dotnet --list-runtimes | grep -q "Microsoft.NETCore.App 7.0"; then + # .NET runtime: check installed runtime version for any dotnet-runtime-X.Y package. + elif [[ "${deptocheck}" =~ ^dotnet-runtime-([0-9]+\.[0-9]+)$ ]]; then + dotnetrequired="${BASH_REMATCH[1]}" + if [ "$(command -v dotnet 2> /dev/null)" ] && dotnet --list-runtimes | grep -q "Microsoft.NETCore.App ${dotnetrequired}"; then depstatus=0 dotnetinstalled=true else @@ -362,7 +378,7 @@ if [ -n "${distrosupport}" ]; then fi # These titles are only supported up to Ubuntu 22.04 (Jammy) and Debian 12 (Bookworm). -if { [ "${distroid}" == "ubuntu" ] && dpkg --compare-versions "${distroversion}" "gt" "22.04"; } || { [ "${distroidlike}" == "debian" ] && dpkg --compare-versions "${distroversion}" "gt" "12"; }; then +if { [ "${distroid}" == "ubuntu" ] && dpkg --compare-versions "${distroversion}" "gt" "22.04"; } || { [ "${distroid}" == "debian" ] && dpkg --compare-versions "${distroversion}" "gt" "12"; }; then if [ "${shortname}" == "bf1942" ] || [ "${shortname}" == "bfv" ]; then fn_print_failure_nl "${gamename} is not supported on ${distroname} (requires Ubuntu <= 22.04 or Debian <= 12)." fn_script_log_fail "${gamename} is not supported on ${distroname}." @@ -370,8 +386,8 @@ if { [ "${distroid}" == "ubuntu" ] && dpkg --compare-versions "${distroversion}" fi fi -# These titles are only supported up to Ubuntu 20.04 and Debian 11 (and Debian-like derivatives). -if { [ "${distroid}" == "ubuntu" ] && dpkg --compare-versions "${distroversion}" "gt" "20.04"; } || { [ "${distroidlike}" == "debian" ] && dpkg --compare-versions "${distroversion}" "gt" "11"; }; then +# These titles are only supported up to Ubuntu 20.04 and Debian 11. +if { [ "${distroid}" == "ubuntu" ] && dpkg --compare-versions "${distroversion}" "gt" "20.04"; } || { [ "${distroid}" == "debian" ] && dpkg --compare-versions "${distroversion}" "gt" "11"; }; then if [ "${shortname}" == "onset" ] || [ "${shortname}" == "btl" ]; then fn_print_failure_nl "${gamename} is not supported on ${distroname} (requires Ubuntu <= 20.04 or Debian <= 11)." fn_script_log_fail "${gamename} is not supported on ${distroname}." @@ -379,6 +395,15 @@ if { [ "${distroid}" == "ubuntu" ] && dpkg --compare-versions "${distroversion}" fi fi +# Vintage Story tracks newer .NET runtimes; older distro releases may not ship required packages. +if [ "${shortname}" == "vints" ]; then + if { [ "${distroid}" == "ubuntu" ] && dpkg --compare-versions "${distroversion}" "lt" "24.04"; } || { [ "${distroid}" == "debian" ] && dpkg --compare-versions "${distroversion}" "lt" "12"; } || [ "${distroid}" == "centos" ] || [ "${distroid}" == "rhel" ] || [ "${distroid}" == "rocky" ] || [ "${distroid}" == "almalinux" ]; then + fn_print_warning_nl "${gamename} may require newer .NET runtimes than ${distroname} provides." + echo -e "If startup fails due to missing .NET runtime, upgrading to Ubuntu 24.04+ or Debian 12+ is recommended." + fn_script_log_warn "${gamename} may require newer .NET runtimes than ${distroname} provides." + fi +fi + if [ ! -f "${tmpdir}/dependency-no-check.tmp" ] && [ ! -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then # Check that the distro dependency csv file exists. fn_check_file_github "lgsm/data" "${distroid}-${distroversioncsv}.csv" diff --git a/lgsm/modules/check_permissions.sh b/lgsm/modules/check_permissions.sh index 73fba983d..3dc521da7 100755 --- a/lgsm/modules/check_permissions.sh +++ b/lgsm/modules/check_permissions.sh @@ -24,7 +24,7 @@ fn_check_ownership() { fi fi if [ -d "${serverfiles}" ]; then - if [ "$(find "${serverfiles}" -not -name '*.swp' -not -user "$(whoami)" | wc -l)" -ne "0" ]; then + if [ "$(find "${serverfiles}" -not -path "*/steamapps/compatdata/*" -not -name '*.swp' -not -user "$(whoami)" | wc -l)" -ne "0" ]; then filesownissue=1 fi fi @@ -42,7 +42,7 @@ fn_check_ownership() { find "${lgsmdir}" -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" + find "${serverfiles}" -not -path "*/steamapps/compatdata/*" -not -user "$(whoami)" -printf "%u\t%g\t%p\n" fi } | column -s $'\t' -t | tee -a "${lgsmlog}" diff --git a/lgsm/modules/command_check_update.sh b/lgsm/modules/command_check_update.sh index 6e429512a..93a770e79 100755 --- a/lgsm/modules/command_check_update.sh +++ b/lgsm/modules/command_check_update.sh @@ -30,6 +30,8 @@ elif [ "${shortname}" == "jk2" ]; then update_jk2.sh elif [ "${shortname}" == "vints" ]; then update_vints.sh +elif [ "${shortname}" == "bb" ]; then + update_bb.sh elif [ "${shortname}" == "ut99" ]; then update_ut99.sh elif [ "${shortname}" == "xnt" ]; then diff --git a/lgsm/modules/command_update.sh b/lgsm/modules/command_update.sh index 996d402a4..a7cfc1b12 100755 --- a/lgsm/modules/command_update.sh +++ b/lgsm/modules/command_update.sh @@ -31,6 +31,8 @@ elif [ "${shortname}" == "jk2" ]; then update_jk2.sh elif [ "${shortname}" == "vints" ]; then update_vints.sh +elif [ "${shortname}" == "bb" ]; then + update_bb.sh elif [ "${shortname}" == "ut99" ]; then update_ut99.sh elif [ "${shortname}" == "xnt" ]; then diff --git a/lgsm/modules/command_update_linuxgsm.sh b/lgsm/modules/command_update_linuxgsm.sh index 3fd4cc681..80ff74cfb 100755 --- a/lgsm/modules/command_update_linuxgsm.sh +++ b/lgsm/modules/command_update_linuxgsm.sh @@ -188,7 +188,7 @@ if [ -f "${datadir}/${distroid}-${distroversioncsv}.csv" ]; then fn_print_update_eol_nl fn_script_log "Checking ${remotereponame} ${distroid}-${distroversioncsv}.csv" rm -f "${datadir:?}/${distroid}-${distroversioncsv}.csv" - fn_fetch_file_github "${datadir}" "${distroid}-${distroversioncsv}.csv" "${datadir}" "nochmodx" "norun" "noforce" "nohash" + fn_fetch_file_github "lgsm/data" "${distroid}-${distroversioncsv}.csv" "${datadir}" "nochmodx" "norun" "noforce" "nohash" else fn_print_skip_eol_nl fn_script_log_pass "Checking ${remotereponame} ${distroid}-${distroversioncsv}.csv" diff --git a/lgsm/modules/core_dl.sh b/lgsm/modules/core_dl.sh index 4730c0cff..c3194a915 100755 --- a/lgsm/modules/core_dl.sh +++ b/lgsm/modules/core_dl.sh @@ -139,6 +139,12 @@ fn_dl_steamcmd() { fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" fn_script_log_fail "${commandaction} ${selfname}: ${remotelocation}: Not enough disk space to download server files" core_exit.sh + # Invalid platform for app/update request. + elif [ -n "$(grep -i "Invalid platform" "${steamcmdlog}" | tail -1)" ]; then + fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Invalid platform for AppID ${appid}" + fn_print_nl "Check steamcmdforcewindows setting and system architecture (x86_64 required for most servers)" + fn_script_log_fail "${commandaction} ${selfname}: ${remotelocation}: Invalid platform for AppID ${appid}" + core_exit.sh # Need tp purchase game. elif [ -n "$(grep "No subscription" "${steamcmdlog}" | tail -1)" ]; then fn_print_failure_nl "${commandaction} ${selfname}: ${remotelocation}: Steam account does not have a license for the required game" diff --git a/lgsm/modules/core_modules.sh b/lgsm/modules/core_modules.sh index 10d408449..ce1a6f6d4 100755 --- a/lgsm/modules/core_modules.sh +++ b/lgsm/modules/core_modules.sh @@ -710,6 +710,11 @@ update_ut99.sh() { fn_fetch_module } +update_bb.sh() { + modulefile="${FUNCNAME[0]}" + fn_fetch_module +} + update_vints.sh() { modulefile="${FUNCNAME[0]}" fn_fetch_module diff --git a/lgsm/modules/core_steamcmd.sh b/lgsm/modules/core_steamcmd.sh index d265f577d..463a1f7da 100755 --- a/lgsm/modules/core_steamcmd.sh +++ b/lgsm/modules/core_steamcmd.sh @@ -427,4 +427,21 @@ fn_check_steamcmd_appmanifest() { fn_dl_steamcmd fi fi + + # GoldSrc can occasionally report success while core HL1 files are incomplete. + if [ "${engine}" == "goldsrc" ]; then + if [ ! -f "${serverfiles}/hlds_run" ] || [ ! -f "${serverfiles}/engine_i486.so" ] || [ ! -d "${serverfiles}/valve" ]; then + fn_print_error_nl "Core HL1 files missing after GoldSrc update" + fn_script_log_error "Core HL1 files missing after GoldSrc update" + fn_print_info_nl "Forcing update to correct issue" + fn_script_log_info "Forcing update to correct issue" + fn_dl_steamcmd + + if [ ! -f "${serverfiles}/hlds_run" ] || [ ! -f "${serverfiles}/engine_i486.so" ] || [ ! -d "${serverfiles}/valve" ]; then + fn_print_fail_nl "Core HL1 files are still missing after retry" + fn_script_log_fail "Core HL1 files are still missing after retry" + core_exit.sh + fi + fi + fi } diff --git a/lgsm/modules/fix_steamcmd.sh b/lgsm/modules/fix_steamcmd.sh index 0ba5c85b2..36bc378ac 100755 --- a/lgsm/modules/fix_steamcmd.sh +++ b/lgsm/modules/fix_steamcmd.sh @@ -113,6 +113,31 @@ if [ ! -f "${steamclientsdk32}" ]; then fn_fix_msg_end fi +# Helps fix: WARNING: Failed to load 32-bit libtinfo.so.5 or libncurses.so.5. +# On distros that ship libtinfo.so.6 (e.g. Ubuntu 22.04+, Debian 12+) but not +# libtinfo.so.5, SteamCMD prints this warning and loses readline support. +# Creating a symlink from .so.5 -> .so.6 resolves the warning without root. +for libtinfo32dir in "${HOME}/.steam/steamcmd" "${steamcmddir}" "${HOME}/.local/share/Steam/steamcmd"; do + if [ -d "${libtinfo32dir}" ]; then + libtinfo32so="${libtinfo32dir}/libtinfo.so.5" + # Also repair broken symlinks (! -e catches missing target, -L catches dangling link) + if [ ! -e "${libtinfo32so}" ]; then + # Find the .so.6 in the system 32-bit lib paths + for libtinfo32so6 in /lib/i386-linux-gnu/libtinfo.so.6 /usr/lib/i386-linux-gnu/libtinfo.so.6 /lib32/libtinfo.so.6; do + if [ -f "${libtinfo32so6}" ]; then + fixname="libtinfo.so.5 32-bit symlink" + fn_fix_msg_start + mkdir -p "${libtinfo32dir}" + ln -sf "${libtinfo32so6}" "${libtinfo32so}" + exitcode=$? + fn_fix_msg_end + break + fi + done + fi + fi +done + # steamclient.so fixes if [ "${shortname}" == "bo" ]; then fn_fix_steamclient_so "32" "${serverfiles}/BODS_Data/Plugins/x86" diff --git a/lgsm/modules/fix_vh.sh b/lgsm/modules/fix_vh.sh index c6564eb19..600988be6 100755 --- a/lgsm/modules/fix_vh.sh +++ b/lgsm/modules/fix_vh.sh @@ -29,12 +29,11 @@ if [ -f "${modsinstalledlistfullpath}" ]; then fn_print_info_nl "BepInEx install detected, applying start exports" fn_script_log_info "BepInEx install detected, applying start exports" # exports for BepInEx framework from script start_server_bepinex.sh - export DOORSTOP_ENABLE=TRUE - export DOORSTOP_INVOKE_DLL_PATH=./BepInEx/core/BepInEx.Preloader.dll - export DOORSTOP_CORLIB_OVERRIDE_PATH=./unstripped_corlib + export DOORSTOP_ENABLED=1 + export DOORSTOP_TARGET_ASSEMBLY=./BepInEx/core/BepInEx.Preloader.dll export LD_LIBRARY_PATH="./doorstop_libs:${LD_LIBRARY_PATH}" - export LD_PRELOAD="libdoorstop_x64.so:${LD_PRELOAD}" + preexecutable="LD_PRELOAD=\"libdoorstop_x64.so:${LD_PRELOAD}\" ${preexecutable}" export SteamAppId=892970 fi diff --git a/lgsm/modules/install_config.sh b/lgsm/modules/install_config.sh index 4b8148ce9..e25b8de5c 100755 --- a/lgsm/modules/install_config.sh +++ b/lgsm/modules/install_config.sh @@ -530,6 +530,9 @@ elif [ "${shortname}" == "ios" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations +elif [ "${shortname}" == "jbep3" ]; then + fn_default_config_local + fn_list_config_locations elif [ "${shortname}" == "jc2" ]; then array_configs+=(config.lua) fn_default_config_remote @@ -565,6 +568,11 @@ elif [ "${shortname}" == "mcb" ]; then fn_default_config_remote fn_set_config_vars fn_list_config_locations +elif [ "${shortname}" == "mcv" ]; then + array_configs+=(server.cfg) + fn_default_config_remote + fn_set_config_vars + fn_list_config_locations elif [ "${shortname}" == "mohaa" ]; then array_configs+=(server.cfg) fn_default_config_remote diff --git a/lgsm/modules/install_server_files.sh b/lgsm/modules/install_server_files.sh index 8a993b45c..e5f10739d 100755 --- a/lgsm/modules/install_server_files.sh +++ b/lgsm/modules/install_server_files.sh @@ -32,14 +32,7 @@ fn_install_server_files() { run="norun" force="noforce" md5="e3b4962cdd9d41e23c6fed65101bccde" - elif [ "${shortname}" == "bb" ]; then - remote_fileurl="http://linuxgsm.download/BrainBread/brainbread-v1.2-linuxserver.tar.xz" - local_filedir="${tmpdir}" - local_filename="brainbread-v1.2-linuxserver.tar.xz" - chmodx="nochmodx" - run="norun" - force="noforce" - md5="55f227183b736397806d5b6db6143f15" + elif [ "${shortname}" == "cod" ]; then remote_fileurl="http://linuxgsm.download/CallOfDuty/cod-lnxded-1.5b-full.tar.xz" local_filedir="${tmpdir}" @@ -267,6 +260,8 @@ elif [ "${shortname}" == "jk2" ]; then update_jk2.sh elif [ "${shortname}" == "vints" ]; then update_vints.sh +elif [ "${shortname}" == "bb" ]; then + update_bb.sh elif [ "${shortname}" == "ut99" ]; then fn_install_server_files update_ut99.sh @@ -274,7 +269,7 @@ elif [ "${shortname}" == "xnt" ]; then update_xnt.sh elif [ "${shortname}" == "etl" ]; then update_etl.sh -elif [ -z "${appid}" ] || [ "${shortname}" == "ahl" ] || [ "${shortname}" == "bb" ] || [ "${shortname}" == "q4" ] || [ "${shortname}" == "ns" ] || [ "${shortname}" == "sfc" ] || [ "${shortname}" == "ts" ] || [ "${shortname}" == "vs" ] || [ "${shortname}" == "zmr" ]; then +elif [ -z "${appid}" ] || [ "${shortname}" == "ahl" ] || [ "${shortname}" == "q4" ] || [ "${shortname}" == "ns" ] || [ "${shortname}" == "sfc" ] || [ "${shortname}" == "ts" ] || [ "${shortname}" == "vs" ] || [ "${shortname}" == "zmr" ]; then if [ "${shortname}" == "ut" ]; then install_eula.sh fi diff --git a/lgsm/modules/mods_core.sh b/lgsm/modules/mods_core.sh index bed0f9f49..3a14fcb84 100755 --- a/lgsm/modules/mods_core.sh +++ b/lgsm/modules/mods_core.sh @@ -29,6 +29,15 @@ fn_mod_install_files() { mkdir -p "${extractdest}" fi fn_dl_extract "${modstmpdir}" "${modfilename}" "${extractdest}" + # If modsubdirs names a specific subfolder, use its contents as the install root. + if [ "${modsubdirs}" != "0" ] && [ -d "${extractdest}/${modsubdirs}" ]; then + local tmpsubdir + tmpsubdir=$(mktemp -d) + mv "${extractdest}/${modsubdirs}" "${tmpsubdir}/" + rm -rf "${extractdest}" + mv "${tmpsubdir}/${modsubdirs}" "${extractdest}" + rm -rf "${tmpsubdir}" + fi } # Convert mod files to lowercase if needed. diff --git a/lgsm/modules/mods_list.sh b/lgsm/modules/mods_list.sh index b3f9877f1..39eca5e42 100755 --- a/lgsm/modules/mods_list.sh +++ b/lgsm/modules/mods_list.sh @@ -19,40 +19,40 @@ metamodlatestfile="metamod-${metamodversion}.zip" metamoddownloadurl="https://www.amxmodx.org/release/${metamodlatestfile}" metamodurl="${metamoddownloadurl}" # AMX Mod X: Base -amxxbaseversion="1.8.2" +amxxbaseversion="1.9.0-git5303" amxxbasemod="base" amxxbaselatestfile="amxmodx-${amxxbaseversion}-${amxxbasemod}-linux.tar.gz" -amxxbasedownloadurl="https://www.amxmodx.org/release/${amxxbaselatestfile}" +amxxbasedownloadurl="https://github.com/alliedmodders/amxmodx/releases/download/1.9.0.5303/${amxxbaselatestfile}" amxxbaseurl="${amxxbasedownloadurl}" # AMX Mod X: Counter-Strike -amxxcsversion="1.8.2" +amxxcsversion="1.9.0-git5303" amxxcsmod="cstrike" amxxcslatestfile="amxmodx-${amxxbaseversion}-${amxxcsmod}-linux.tar.gz" -amxxcsdownloadurl="https://www.amxmodx.org/release/${amxxcslatestfile}" +amxxcsdownloadurl="https://github.com/alliedmodders/amxmodx/releases/download/1.9.0.5303/${amxxcslatestfile}" amxxcsurl="${amxxcsdownloadurl}" # AMX Mod X: Day of Defeat -amxxdodversion="1.8.2" +amxxdodversion="1.9.0-git5303" amxxdodmod="dod" amxxdodlatestfile="amxmodx-${amxxdodversion}-${amxxdodmod}-linux.tar.gz" -amxxdoddownloadurl="https://www.amxmodx.org/release/${amxxdodlatestfile}" +amxxdoddownloadurl="https://github.com/alliedmodders/amxmodx/releases/download/1.9.0.5303/${amxxdodlatestfile}" amxxdodurl="${amxxdoddownloadurl}" # AMX Mod X: Team Fortress Classic -amxxtfcversion="1.8.2" +amxxtfcversion="1.9.0-git5303" amxxtfcmod="tfc" amxxtfclatestfile="amxmodx-${amxxtfcversion}-${amxxtfcmod}-linux.tar.gz" -amxxtfcdownloadurl="https://www.amxmodx.org/release/${amxxtfclatestfile}" +amxxtfcdownloadurl="https://github.com/alliedmodders/amxmodx/releases/download/1.9.0.5303/${amxxtfclatestfile}" amxxtfcurl="${amxxtfcdownloadurl}" # AMX Mod X: Natural Selection -amxxnsversion="1.8.2" +amxxnsversion="1.9.0-git5303" amxxnsmod="ns" amxxnslatestfile="amxmodx-${amxxnsversion}-${amxxnsmod}-linux.tar.gz" -amxxnsdownloadurl="https://www.amxmodx.org/release/${amxxnslatestfile}" +amxxnsdownloadurl="https://github.com/alliedmodders/amxmodx/releases/download/1.9.0.5303/${amxxnslatestfile}" amxxnsurl="${amxxnsdownloadurl}" # AMX Mod X: The Specialists -amxxtsversion="1.8.2" +amxxtsversion="1.9.0-git5303" amxxtsmod="ts" amxxtslatestfile="amxmodx-${amxxtsversion}-${amxxtsmod}-linux.tar.gz" -amxxtsdownloadurl="https://www.amxmodx.org/release/${amxxtslatestfile}" +amxxtsdownloadurl="https://github.com/alliedmodders/amxmodx/releases/download/1.9.0.5303/${amxxtslatestfile}" amxxtsurl="${amxxtsdownloadurl}" # Metamod:Source metamodsourceversion="1.12" @@ -122,7 +122,7 @@ modseparator="MOD" # [2] | "Pretty Name": the common name people use to call the mod that will be displayed to the user # [3] | "URL": link to the mod archive file; can be a variable previously defined while scraping a URL # [4] | "filename": the output filename -# [5] | "modsubdirs": in how many subdirectories is the mod (none is 0) (not used at release, but could be in the future) +# [5] | "modsubdirs": name of a subfolder within the archive to extract as the install root (use "0" to extract all contents) # [6] | "LowercaseOn/Off": LowercaseOff or LowercaseOn: enable/disable converting extracted files and directories to lowercase (some games require it) # [7] | "modinstalldir": the directory in which to install the mode (use LGSM dir variables such as ${systemdir}) # [8] | "/files/to/keep;", files & directories that should not be overwritten upon update, separated and ended with a semicolon; you can also use "OVERWRITE" value to ignore the value or "NOUPDATE" to disallow updating; for files to keep upon uninstall, see fn_mod_tidy_files_list from mods_core.sh @@ -208,7 +208,7 @@ mod_info_sdtdoxide=(MOD "sdtdoxide" "Oxide for 7 Days To Die" "${oxidesdtdlatest mod_info_valheimplus=(MOD "valheimplus" "Valheim PLUS" "${valheimpluslatestlink}" "ValheimPlus.tar.gz" "0" "LowercaseOff" "${systemdir}" "OVERWRITE" "ENGINES" "Valheim;" "NOTGAMES" "https://github.com/Grantapher/ValheimPlus.git" "Mod to improve Valheim gameplay") # BepInEx Valheim -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") +mod_info_bepinexvh=(MOD "bepinexvh" "BepInEx Valheim" "${bepinexvhlatestlink}" "denikson-BepInExPack_Valheim.zip" "BepInExPack_Valheim" "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_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/update_bb.sh b/lgsm/modules/update_bb.sh new file mode 100644 index 000000000..1f2f12ce8 --- /dev/null +++ b/lgsm/modules/update_bb.sh @@ -0,0 +1,175 @@ +#!/bin/bash +# LinuxGSM update_bb.sh module +# Author: Daniel Gibbs +# Contributors: https://linuxgsm.com/contrib +# Website: https://linuxgsm.com +# Description: Handles updating of BrainBread servers. + +moduleselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")" + +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}" + echo "${remotebuild}" > "${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" 2> /dev/null) + 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() { + # Gets remote build info. + apiurl="https://api.github.com/repos/IronOak-Studios/BrainBread/releases/latest" + remotebuildresponse=$(curl -s "${apiurl}") + remotebuildfilename=$(echo "${remotebuildresponse}" | jq -r '.assets[] | select(.name | test("linuxserver\\.tar\\.gz$")) | .name' | head -n 1) + remotebuildurl=$(echo "${remotebuildresponse}" | jq -r '.assets[] | select(.name | test("linuxserver\\.tar\\.gz$")) | .browser_download_url' | head -n 1) + remotebuildhash=$(echo "${remotebuildresponse}" | jq -r '.assets[] | select(.name | test("linuxserver\\.tar\\.gz$")) | .digest' | sed 's/^sha256://g' | head -n 1) + remotebuild=$(echo "${remotebuildresponse}" | jq -r '.tag_name') + if [ -z "${remotebuildhash}" ] || [ "${remotebuildhash}" == "null" ]; then + remotebuildhash="nohash" + fi + + if [ "${firstcommandname}" != "INSTALL" ]; then + fn_print_dots "Checking remote build: ${remotelocation}" + # Checks if remotebuild variable has been set. + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ] || [ -z "${remotebuildurl}" ] || [ "${remotebuildurl}" == "null" ] || [ -z "${remotebuildfilename}" ] || [ "${remotebuildfilename}" == "null" ]; then + fn_print_fail "Checking remote build: ${remotelocation}" + fn_script_log_fail "Checking remote build" + core_exit.sh + else + fn_print_ok "Checking remote build: ${remotelocation}" + fn_script_log_pass "Checking remote build" + fi + else + # Checks if remotebuild variable has been set. + if [ -z "${remotebuild}" ] || [ "${remotebuild}" == "null" ] || [ -z "${remotebuildurl}" ] || [ "${remotebuildurl}" == "null" ] || [ -z "${remotebuildfilename}" ] || [ "${remotebuildfilename}" == "null" ]; then + fn_print_failure "Unable to get remote build" + fn_script_log_fail "Unable to get remote build" + core_exit.sh + fi + fi +} + +fn_update_compare() { + fn_print_dots "Checking for update: ${remotelocation}" + # Update has been found or force update. + if [ "${localbuild}" != "${remotebuild}" ] || [ "${forceupdate}" == "1" ]; then + # Create update lockfile. + date '+%s' > "${lockdir:?}/update.lock" + fn_print_ok_nl "Checking for update: ${remotelocation}" + fn_print "\n" + fn_print_nl "${bold}${underline}Update${default} available" + fn_print_nl "* Local build: ${red}${localbuild}${default}" + fn_print_nl "* Remote build: ${green}${remotebuild}${default}" + if [ -n "${branch}" ]; then + fn_print_nl "* Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + fn_print_nl "Remote build info" + fn_print_nl "* apiurl: ${apiurl}" + fn_print_nl "* remotebuildfilename: ${remotebuildfilename}" + fn_print_nl "* remotebuildurl: ${remotebuildurl}" + fn_print_nl "* remotebuildhash: ${remotebuildhash}" + fn_print_nl "* remotebuild: ${remotebuild}" + fi + fn_print "\n" + fn_script_log_info "Update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuild}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + fn_script_log_info "${localbuild} > ${remotebuild}" + + if [ "${commandname}" == "UPDATE" ]; then + date +%s > "${lockdir:?}/last-updated.lock" + 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 + fn_sleep_time_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 + alert="update" + elif [ "${commandname}" == "CHECK-UPDATE" ]; then + alert="check-update" + fi + alert.sh + else + fn_print_ok_nl "Checking for update: ${remotelocation}" + fn_print "\n" + fn_print_nl "${bold}${underline}No update${default} available" + fn_print_nl "* Local build: ${green}${localbuild}${default}" + fn_print_nl "* Remote build: ${green}${remotebuild}${default}" + if [ -n "${branch}" ]; then + fn_print_nl "* Branch: ${branch}" + fi + fn_print "\n" + fn_script_log_info "No update available" + fn_script_log_info "Local build: ${localbuild}" + fn_script_log_info "Remote build: ${remotebuild}" + if [ -n "${branch}" ]; then + fn_script_log_info "Branch: ${branch}" + fi + if [ -f "${rootdir}/.dev-debug" ]; then + fn_print_nl "Remote build info" + fn_print_nl "* apiurl: ${apiurl}" + fn_print_nl "* remotebuildfilename: ${remotebuildfilename}" + fn_print_nl "* remotebuildurl: ${remotebuildurl}" + fn_print_nl "* remotebuildhash: ${remotebuildhash}" + fn_print_nl "* remotebuild: ${remotebuild}" + 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 + # BrainBread requires both Steam app updates and GitHub package updates. + 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_localbuild + fn_update_remotebuild + fn_update_compare +fi