diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b95b2b..9e22370 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ [Back to main](README.md#changelog) +## 2024-02-25 + +- Added new mechanic for customization of webhook content-titles (#223) + ## 2024-02-24 - Added new mechanic for auto-restart, where the player count will be checked, 15 minutes grace-period (for dungeons, boss-fights, etc.) will only used if a player is online, if not the restart will be initiated (#230) diff --git a/Dockerfile b/Dockerfile index c325577..7706394 100644 --- a/Dockerfile +++ b/Dockerfile @@ -78,6 +78,7 @@ ENV DEBIAN_FRONTEND=noninteractive \ WEBHOOK_ENABLED=false \ WEBHOOK_DEBUG_ENABLED=false \ WEBHOOK_URL= \ + WEBHOOK_CONTENT_TITLE="Status update" \ WEBHOOK_INFO_TITLE="Info" \ WEBHOOK_INFO_DESCRIPTION="This is an info from the server" \ WEBHOOK_INFO_COLOR="2849520" \ diff --git a/default.env b/default.env index 0f797e8..931503d 100644 --- a/default.env +++ b/default.env @@ -22,6 +22,7 @@ RCON_PLAYER_DETECTION_CHECK_INTERVAL=15 WEBHOOK_ENABLED=false WEBHOOK_DEBUG_ENABLED=false WEBHOOK_URL="YOUR-URL-IN-HERE" +WEBHOOK_CONTENT_TITLE="Status update" WEBHOOK_INFO_TITLE="Info" WEBHOOK_INFO_DESCRIPTION="This is an info from the server" WEBHOOK_INFO_COLOR="2849520" diff --git a/docs/ENV_VARS.md b/docs/ENV_VARS.md index de0c9b8..bd6b6c9 100644 --- a/docs/ENV_VARS.md +++ b/docs/ENV_VARS.md @@ -22,7 +22,7 @@ These settings control the behavior of the Docker container: | BACKUP_RETENTION_POLICY | Set to enabled, will cleanup old backups | true | Boolean | | BACKUP_RETENTION_AMOUNT_TO_KEEP | Defines how many backups in numbers to keep | 72 | Integer | | RESTART_ENABLED | Automatic restarts the server | false | Boolean | -| RESTART_DEBUG_OVERRIDE | Automatic restarts down to 15 seconds instead of 15 minutes | false | Boolean | +| RESTART_DEBUG_OVERRIDE | Automatic restarts down to 15 seconds instead of 15 minutes | false | Boolean | | RESTART_CRON_EXPRESSION | Needs a Cron-Expression - See [Cron expression](#cron-expression) | 0 3,15 * * * | Cron-Expression | | RCON_PLAYER_DETECTION | Set to enabled will send player join and leaves to console, rcon and webhooks, NEEDS `RCON_ENABLED` | true | Boolean | | RCON_PLAYER_DETECTION_STARTUP_DELAY | Initial delay for start checking for players, consider steam-updates and server start up in seconds | 60 | Integer | @@ -30,6 +30,7 @@ These settings control the behavior of the Docker container: | WEBHOOK_ENABLED | Set to enabled will send webhook notifications, NEEDS `WEBHOOK_URL` | false | Boolean | | WEBHOOK_DEBUG_ENABLED | Set to enabled will enable feedback of curl and not use --silent | false | Boolean | | WEBHOOK_URL | Defines the url the webhook to send data to | | Url | +| WEBHOOK_CONTENT_TITLE | If set to a value this will add the "content" segment for the webhook, set to empty removes it | Status update | String | | WEBHOOK_* | See below the table "Webhook environment variables" | | String | | SERVER_SETTINGS_MODE | Determines whether settings can be modified via environment variables or via file, except `COMMUNITY_SERVER` and `MULTITHREAD_ENABLED`! | `auto` | Enum | diff --git a/includes/webhook.sh b/includes/webhook.sh index 618500c..389fa2a 100644 --- a/includes/webhook.sh +++ b/includes/webhook.sh @@ -4,9 +4,10 @@ # IMPORTANT: Don't use Hex-Colors! Go to the page, search for the Hex-Color, # after that add the DECIMAL-Representation to the color field or it will break for Discord! generate_post_data() { - cat <