The commit renames the file `detals-check-generate-matrix.sh` to `details-check-generate-matrix.sh`. This change ensures consistency and improves clarity in the codebase.
This commit adds branch filtering to the "Details Check" and "Update Check" workflows. Now, these workflows will only be triggered on the "develop" branch. This change ensures that the workflows are executed in a controlled environment and reduces unnecessary executions on other branches.
the most prominent case being update-copyright-years-in-license-file altering commit history in forks depending on configuration (sometimes these type of PRs just auto-merge on forks, creating a merge conflict when they sync their fork for preparing a PR)
additionally, some actions require secrets so they would fail anyway
Co-authored-by: Daniel Gibbs <me@danielgibbs.co.uk>
* cs2
* config
* fix: remove lo code
* config
* params
* source2
* game info
* messages
* config changes
* dirs
* config
* refactor: refactor info message functions in alert.sh, command_details.sh, command_dev_query_raw.sh, and command_postdetails.sh
- Refactored the info message functions in multiple files to have consistent naming conventions.
- Renamed fn_info_message_* functions to fn_info_messages_* for clarity and consistency.
- Updated function calls accordingly.
* refactor: remove unnecessary code duplication in info_game.sh
The commit removes duplicated code for retrieving server information from the game configuration file. Specifically, it removes redundant lines related to rconpassword, rconport, and serverpassword. This improves code readability and maintainability.
* cs2
* cs2
* cs2 icon
* remove lo
* remove file
* remove lo
* update url
* ignore games with no configs
* remove configs from games that have non
* details check fix
* details check
* details check
* ignore systemdir check if running github actions
* fix name
* feat(alert): add new alert types
- Added new alert types for different scenarios such as stopped, started, restarted, monitor session failure, monitor query failure, wipe, and info.
- Updated the `alert.sh` script to include functions for each new alert type.
- Modified the `command_monitor.sh` script to use the appropriate alert type based on the monitoring results.
* feat: remove more info if not enabled
* refactor: refactor alert functions and add color codes
This commit refactors the alert functions in the `alert.sh` module. It adds color codes for different types of alerts, such as green for started/restarted alerts, red for stopped/monitor session/query/permissions alerts, and blue for update/config/wipe/info alerts. The commit also updates the alert emoji to better represent each type of alert.
* feat: add colour to discord alert
* refactor: improve Pushbullet alert sending
The code in the `alert_pushbullet.sh` file has been refactored to improve the way Pushbullet alerts are sent. The curl command now includes the access token as a header instead of in the URL, resulting in more secure communication with the Pushbullet API. This change enhances the reliability and security of sending Pushbullet alerts.
* feat: add alert icon and footer to Discord alerts
- Added a new variable `alerticon` to store the URL of the alert icon image.
- Included the `alerticon` in the JSON payload for both short info and no info alerts.
- Added a footer with text "Sent by LinuxGSM v23.5.3" to the JSON payload for both short info and no info alerts.
This commit enhances the appearance of Discord alerts by adding an icon, a footer, and additional information about the sender.
* refactor(alert): refactor alert functions
- Refactored the alert functions to improve code readability and maintainability.
- Renamed variables for better clarity and consistency.
- Updated function names to be more descriptive of their purpose.
- Reorganized the order of function definitions for better organization.
* feat: add first batch of icons
* refactor: improve serverlist validation script
The commit refactors the serverlist validation script to include a new check. It now compares all game servers listed in `serverlist.csv` to `$shortname-icon.png` files in `lgsm/data/gameicons`. If a game server is listed in `serverlist.csv`, it should have a corresponding `$shortname-icon.png` file. The commit adds a loop that checks for the existence of these files and outputs an error message if any are missing.
* another batch of icons
* more icons
* updated icons
a
* feat: add serverlist game icon validation
This commit adds a new script `serverlist-validate-game-icons.sh` that checks if all the game servers listed in `serverlist.csv` have a corresponding `shortname-icon.png` file. It also verifies that the number of game icons matches the number of servers in `serverlist.csv`. The script is executed as part of the workflow defined in `serverlist-validate.yml`.
Co-authored-by: [co-author-name]
* refactor: improve game icon validation script
The commit refactors the game icon validation script to improve its functionality. It adds a check for unexpected game icons and ensures that the number of game icons matches the number of servers in serverlist.csv. The commit also updates error messages for better clarity and readability.
* refactor: remove unused mumble-icon.png game icon
The code changes involve removing the unused mumble-icon.png game icon. This change helps to clean up the codebase by removing unnecessary files.
* feat: update game icons
Updated the game icons for bf1942, pmc, vints, vpmc, and wmc. Changed resolution to 32px
* feat(alert): add alert action and information to Discord message
- Added a new variable `alertaction` to store the action performed in the alert
- Modified the Discord message template to include the alert action and information
- Updated the author name in the Discord message template to "LinuxGSM Alert"
The changes allow for more informative and descriptive alerts in Discord messages.
* feat(alert.sh): add alertaction variable
This commit adds the `alertaction` variable to the `fn_alert_*` functions in the `alert.sh` module. The `alertaction` variable is used to specify the action that triggered the alert, such as "Started", "Stopped", "Restarted", etc. This allows for more informative and descriptive alerts.
* refactor: rework email alert
* feat: add environment detail
* refactor: simplify Discord and Pushbullet alert message handling
The code changes in this commit refactor the way Discord and Pushbullet alert messages are handled. The previous implementation used separate variables for short information and no information scenarios, but now it uses a single variable for both cases. Additionally, the code now checks if the "alerturl" is empty instead of comparing it to a specific value.
These changes improve code readability and maintainability by reducing redundancy and simplifying conditional logic.
* title
* fix: update Pushover alert message formatting
The commit fixes the formatting of the Pushover alert message by removing unnecessary information and adding a conditional check for the presence of an alert URL.
* refactor: improve formatting of server IP value in Discord alert
The code changes in this commit refactor the formatting of the server IP value in the Discord alert. The value is now enclosed in single quotes for better readability.
* refactor: improve alert message formatting and remove unnecessary code
The commit refactors the alert message formatting in the `alert_pushbullet.sh`, `alert_slack.sh`, and `alert_telegram.sh` files. It improves the structure and readability of the messages by using proper markdown syntax. Additionally, it removes unnecessary code from the files to simplify their implementation.
* more changes
* feat: add server name and information fields to Discord alert
The code changes in the `alert_discord.sh` file include adding new fields for server name and information to the JSON payload sent in a Discord alert. This allows for more detailed information about the server to be included in the alert message.
refactor: improve conditional logic for Gotify alerts
In the `alert_gotify.sh` file, the code changes involve improving the conditional logic for determining which JSON payload to use when sending a Gotify alert. The updated logic checks if an alert URL is provided and selects the appropriate JSON payload accordingly.
chore: update field names in IFTTT alerts
The changes made in `alert_ifttt.sh` involve updating field names in the JSON payloads used for IFTTT alerts. The field names have been modified to match a consistent format across all fields.
fix: correct body formatting in Pushbullet alerts
The code changes made in `alert_pushbullet.sh` address an issue with incorrect body formatting in Pushbullet alerts. The body of the alert now includes separate lines for each piece of information, such as server name, information, game, server IP, hostname, and more info.
refactor: improve attachment structure in RocketChat alerts
In `alert_rocketchat.sh`, the code changes involve improving the attachment structure of RocketChat alerts. The updated structure includes separate sections for server name, information, game, server IP, hostname, and more info.
feat: add additional sections to Slack alerts
The changes made in `alert_slack.sh` include adding additional sections to Slack alerts. These sections provide separate blocks of text for server name and information within each message.
feat: add HTML formatting to Telegram alerts
In `alert_telegram.sh`, HTML formatting has been added to Telegram alerts. This allows for bold text styling and clickable links within each message sent via Telegram.
* bug
* bug
* refactor: improve alert message formatting
- Refactored the code in `alert_pushover.sh` and `alert_telegram.sh` to improve the formatting of the alert messages.
- Updated the message structure to include the server name before other information.
- Added line breaks for better readability.
- Made sure that all variables are properly interpolated within the messages.
* bug
* remove rocketchattoken
* feat: add alert types for server start, stop, restart, and wipe
- Added new alert types for server start, stop, restart, and wipe.
- Updated the `alert.sh` module to include functions for handling these new alert types.
- Modified the `command_start.sh`, `command_stop.sh`, and `command_wipe.sh` modules to trigger the corresponding alerts when appropriate.
- Updated the `alert_rocketchat.sh` module to display the relevant information for each alert type in Rocket.Chat notifications.
* refactor: update alert messages in lgsm/modules/alert.sh
- Updated the alert messages for when the game server is stopped, started, restarted, and when an LinuxGSM update is received.
- Changed the wording to use "has been" instead of "has" for consistency.
- Added a mention that the server has been restarted after receiving an LinuxGSM update.
* bug
* refactor: update alert emojis and add server time
- Updated the alert emojis in the `alert.sh` module.
- Added the server time to the alert messages in various modules (`alert_discord.sh`, `alert_gotify.sh`, `alert_ifttt.sh`, `alert_pushbullet.sh`, `alert_pushover.sh`, `alert_rocketchat.sh`, and `alert_slack.sh`).
* refactor: remove date from alert messages
The commit refactors the code in `alert_discord.sh` and `alert_slack.sh` to remove the date from the alert messages sent by LinuxGSM. This change simplifies the message content while still indicating that it was sent by LinuxGSM and includes the version number.
* feat: add statusalert option to server configs
This commit adds the "statusalert" option to the default configuration files for various game servers. The "statusalert" option allows users to enable or disable alerts on server start, stop, and restart events. This feature provides more flexibility in managing server notifications.
* feat: add alert for update and restart if necessary
The code change adds an alert for updates and restarts the service if necessary. This ensures that the service is restarted after an update to prevent any issues.
* feat: add backup alert functionality
This commit adds a new function `fn_alert_backup` to the `alert.sh` module. This function sends an alert when the system has been backed up. The alert includes a message, action, emoji, sound, and color.
In addition, this commit modifies the `command_backup.sh` module to trigger the backup alert by setting the variable `alert` to "backup" and calling `alert.sh`.
The purpose of these changes is to provide notifications when backups are created.
Co-authored-by: AI Assistant <assistant@example.com>
* refactor: change alert color to green
The code in the `alert.sh` file has been refactored to change the alert color from blue to green. This change updates the `alertcolourhex` and `alertcolourdec` variables accordingly.
---------
Co-authored-by: AI Assistant <assistant@example.com>
* refactor: simplify sleep time functions
The `fn_sleep_time` function has been refactored to remove unnecessary conditions and set a default sleep time of 0.5 seconds. Additionally, four new functions (`fn_sleep_time_1`, `fn_sleep_time_5`, `fn_sleep_time_10`) have been added to provide different sleep times of 1, 5, and 10 seconds respectively. This improves code readability and allows for more flexibility in setting sleep times.
* change sleep to fn_sleep_time
* refactor: optimize sleep time functions
- Refactored the code to optimize the sleep time functions.
- Updated the `fn_sleep_time` function calls to `fn_sleep_time_1` in multiple files.
- Removed unnecessary sleep time calls in some files.
* refactor: simplify sleep time function call
The code changes refactor the sleep time function call in the check_deps.sh file. Instead of calling fn_sleep_time_1, it now calls fn_sleep_time. This change simplifies the code and improves readability.
* feat: add sleep time before checking session
Add a sleep time of 1 second before checking the session in the command_monitor.sh file. This allows for better synchronization and improves the accuracy of the session check.
* changes
* refactor: optimize sleep time function
The code changes refactor the sleep time function in multiple files to improve efficiency. The fn_sleep_time function is replaced with fn_sleep_time_1. This change reduces unnecessary delays during execution.
* refactor: update sleep time function names
The sleep time functions in the core_messages.sh file have been updated to use more descriptive names. The fn_sleep_time function has been renamed to fn_sleep_time_1 for clarity and consistency. This change improves code readability and maintainability.
* refactor: optimize sleep time in core_messages.sh
The commit optimizes the sleep time in the core_messages.sh file. The fn_sleep_time and fn_print_dots functions now use a shorter sleep time of 0.5 seconds instead of 1 second, resulting in faster execution.
* refactor: improve readability and consistency in code
- Refactored the log messages to use consistent capitalization and wording.
- Updated log messages in check_glibc.sh, check_permissions.sh, command_backup.sh, command_update_linuxgsm.sh, command_wipe.sh, fix_samp.sh, install_config.sh, and set_dst_config_vars() functions.
feat: add more descriptive log messages
- Added more descriptive log messages to provide clearer information about the actions being performed.
- Updated log messages in check_glibc.sh, check_permissions.sh, command_backup.sh, command_update_linuxgsm.sh, command_wipe.sh, fix_samp.sh, install_config.sh.
fix: correct spelling errors in log messages
- Corrected spelling errors in some of the log messages for better clarity.
- Updated log messages in check_glibc.sh and fix_samp.sh.
* refactor: remove unnecessary print statements
This commit refactors the code by removing unnecessary print statements in multiple files. The removed print statements were used for displaying dots and warnings, but they are not needed anymore. This improves the readability and cleanliness of the code.
* refactor: improve commit messages for code changes
- Refactored check_glibc.sh to improve readability and clarity of error messages.
- Refactored check_permissions.sh to provide more informative error messages when checking /sys permissions.
- Refactored check_system_requirements.sh to provide clearer warning message when checking RAM requirements.
- Refactored command_backup.sh to provide more descriptive messages when starting a backup.
* remove legacy code
* fix: remove \t
* fix: run check_root
check root was never running because of logic in linuxgsm.sh
* fix: update warning message for missing sudo access
The warning message for users without sudo access has been updated to provide clearer instructions. Instead of just suggesting manual installation, it now also suggests running the script as root using `./${selfname} install`. This change improves user experience and helps them resolve dependency installation issues more effectively.
* tidy
* refactor: shorten module update function names
The commit renames the update functions for several game modules to shorter names. The new names are more concise and easier to remember, which should improve code readability and maintainability.
* feat: Add Update Check workflow
This commit adds a new GitHub Actions workflow that checks if LinuxGSM is picking up game server config and parameter variables. The workflow runs on push and manual triggers, with concurrency settings to cancel in-progress jobs. It downloads linuxgsm.sh, installs dependencies, grabs the server, enables developer mode, installs the server, and updates it.
* feat: Add concurrency group names to workflows
The `details-check.yml` and `update-check.yml` workflows now have a concurrency group name that includes the branch or tag name. This will allow for better management of concurrent workflow runs.
* refactor: Update script names for Minecraft, Factorio, Jedi Knight 2 and Vintage Story
This commit updates the script names for Minecraft, Factorio, Jedi Knight 2 and Vintage Story. The update includes changes to command_check_update.sh, command_update.sh, core_functions.sh and install_server_files.sh. The new script names are update_mc.sh (formerly update_minecraft.sh), update_fctr.sh (formerly update_factorio.sh), update_jk2.sh (formerly update_jediknight2.sh) and update_vints.sh (formerly update_vintagestory.sh).
* feat: Add support for 32-bit architecture
This commit adds support for 32-bit architecture by running the command "sudo dpkg --add-architecture i386" instead of installing libxml2-utils and jq.
* feat: Add i386 architecture and install libstdc++6
This commit adds the installation of libstdc++6:i386 package to support 32-bit applications. It also includes adding the i386 architecture to dpkg.
* feat: Update dependencies for LinuxGSM
Changed the dependency from libstdc++6:i386 to libgcc-s1:i386 in the update-check.yml file. This change was made to ensure compatibility with newer versions of LinuxGSM.
* feat: Add update and force-update server functionality
This commit adds the ability to check for updates and force updates on a server. The update-check.yml file has been modified to include new jobs that run the LGSM_GITHUBBRANCH command with specific arguments.
* feat: Add dependencies for server installation
This commit adds the necessary dependencies to install a game server. The `update-check.yml` file has been updated to include the installation of `bsdmainutils`, `libsdl2-2.0-0:i386`, `libtinfo5:i386`, and `steamcmd`.
* steamcmd only
* steamcmd
* test
* test
* refactor: improve random password generation in install_config.sh
The code change refactors the random password generation in the `install_config.sh` file. Instead of using `tr -dc A-Za-z0-9_ < /dev/urandom | head -c 8 | xargs`, it now uses `tr -dc 'A-Za-z0-9_' < /dev/urandom 2>/dev/null | head -c 8 | xargs`. This change improves the reliability and security of generating random passwords.
* refactor: remove redundant code and set default branch
The commit refactors the code by removing redundant code that sets the branch to "public" if no custom branch is specified. This change simplifies the logic and improves readability.
* test
* fix: fix steamcmd build version retrieval
The code changes in this commit fix an issue with retrieving the build version from SteamCMD. The previous implementation was not correctly capturing the buildid. This has been resolved by adding additional echo statements for debugging purposes.
* test
fix: remove unnecessary app_info_print command
The commit removes the unnecessary `app_info_print` command from the code. This command was not needed to check the buildid.
* fix: GitHub Actions test failure
The code change fixes a failing GitHub Actions test by running SteamCMD twice. The first run is to update the app info, and the second run retrieves the build ID for the specified branch.
* Add steam user and password secret for jk2
* refactor: update steamuser and steampass paths in jk2server config
The code changes refactor the paths for `steamuser` and `steampass` in the configuration file of the `jk2server`. The previous paths were incorrect, so they have been updated to point to the correct location.
* refactor: update steamuser and steampass insertion in LGSM configuration
The code changes refactor the way steamuser and steampass are inserted into the LGSM configuration file. Instead of hardcoding the values, they are now dynamically inserted using environment variables. This improves flexibility and security when setting up the server.
* refactor: simplify steamuser and steampass insertion in update-check.yml
The code changes remove unnecessary sed commands and replace them with a single echo command to insert the values of STEAMCMD_USER and STEAMCMD_PASS into the common.cfg file. This simplifies the code and improves readability.
* feat: update steamuser and steampass in common.cfg
The commit updates the code to properly insert the `steamuser` and `steampass` values in the `common.cfg` file. The previous code was not correctly formatting the values, which caused issues with server installation. This change ensures that the values are properly formatted using double quotes for `steamuser` and single quotes for `steampass`.
Added triggers to the workflow file `trigger-docker-build.yml` to build Docker images for LinuxGSM and GameServer. The trigger for GameServer is dependent on the completion of the LinuxGSM build.
This commit updates the name of several GitHub workflows to use proper capitalization and adds more descriptive names. The changes include:
- Add to project workflow: updated name from "Add game server requests to project" to "Add to Project"
- Details check workflow: updated name from "Details Check" to "Check LinuxGSM game server config and parameter variables"
- Git sync workflow: updated name from "Github to Bitbucket sync" to "Sync GitHub repo with backup Bitbucket repo"
- Issue labeler workflow: updated name from "Issue Labeler" to "Automatically label issues based on configuration file"
- Lock threads workflow: updated name from "Lock Threads" to "Automatically lock inactive threads after one week"
- Potential duplicates workflow: updated name from "Potential Duplicates" to "Detect potential duplicate issues and apply a label"
- Server list validation workflow: updated name from "Server list Validation" to Validate LinuxGSM serverlist.json format
- Trigger docker build workflow: added more descriptive names for each job
- Update copyright years in license file workflow: removed unnecessary dashes at the beginning, added a more concise description
- Version check workflow: added a more concise description
The code changes update the details-check.yml file to use the main branch instead of the rename branch for Game-Server-Configs. This ensures that the correct config file is downloaded for game servers.
* feat: add header to serverlist.csv
added header to serverlistto help ansible and other tools better work with the csv file
* feat: update serverlist menu
The script now skips the first line of the serverlist file when generating the list for 'list' and 'install' commands. This ensures that the header is not included in the output.
* fix: check details
* fix serverlist validate test
This commit adds a new feature to the details-check workflow by including concurrency. The group is set to the branch name and cancel-in-progress is enabled.
* feat(btl): rename bt1944 to btl (#4124)
* fix(bt1944): update binary file
* feat(btl): rename bt1944 to btl
* rename gameworld to worldname
* rename autosaveinverval to saveinterval
* rust seed
* add exit code to details
* update some variables
* comment
* update random
* current refactor
* modules
* json
* xml
* add core modules to functions dir
* functions
* fix
* use xmllint for parsing xml
* check root
* check logs
* sdtd
* quakec
* changes
* remove dev null
* arma3
* add detect details
* config origin
* fix: cmw mkdir bug
* ini improvements
* further ini improvements
* dst ini
* revert
* httpport
* max players
* source engine
* fix: cannot iterate over null
* fix quakec
* fix(nec): no query port
* more updates
* more updated
* more
* more
* telnet ip
* first test of details checking
* more details updates
* more standardizing
* comment out steamport in not set
* kf2 master server true
* update roserver
* fix bug
* looks for file called config and uses that
* test
test
test
test
test
* download correct configs
* test
test
test
test
test
test
test
test
test
test
test
test
test
test
test
test
test
test
test
* remove blank lines
* update var names
* fail
* continue on error
* install xmllint
* adjust quakec
* fix dst
* fix java
* re order mcb
* fix query port mc
* fix mom
* fix pc
* pc add http port
* add api and http port
* change naming to http from web admin
* api port
* http
* pc2
* add query raw
* list cluster config
* servercfgparse
* update avserver
* tidy up steam ports
* more servers completed
* fix sb
* no config file
* no config file
* add emserver config install
* codacy
* add legacy vars
* add more legacy
* add xmllint
* mta xmllint
* codacy
* codacy