From e58c094a31f5ef0b516bfc03dec7280df7ca27c5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Josef=20N=C4=9Bmec?= <josef.nemec@cesnet.cz>
Date: Wed, 25 Oct 2023 10:30:06 +0200
Subject: [PATCH] Cron jobs are configurable from env

---
 CHANGELOG.md  | 4 ++++
 entrypoint.sh | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 24d8433..f1458df 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 ## [Unreleased]
 
+## [1.3.3] - 2023-10-25
+### Fixed
+- Env (vars) are made accessible to cronjobs
+
 ## [1.3.2] - 2023-09-05
 ### Fixed
 - diskmon: change metric format
diff --git a/entrypoint.sh b/entrypoint.sh
index 867bcd0..ca8ff51 100755
--- a/entrypoint.sh
+++ b/entrypoint.sh
@@ -44,5 +44,8 @@ awk '{$1=" ";print}' "${CMG_BASE_DIR}/custom-metrics-generator.conf.env"
 tail -F --max-unchanged-stats=10 ${CMG_STDOUT_LOG} &
 tail -F --max-unchanged-stats=10 ${CMG_STDERR_LOG} 1>&2 &
 
+# Make env accessible to cron jobs (enables cron job config)
+env >> /etc/environment
+
 # schedule periodic actions with cron
 exec crond -n
-- 
GitLab