From: Michael Tremer Date: Sun, 31 Aug 2025 15:23:58 +0000 (+0000) Subject: cron: Send reports in the system's default language X-Git-Tag: 0.1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28896ecadaf761e83be890adb4e4d9941c68b06b;p=suricata-reporter.git cron: Send reports in the system's default language Signed-off-by: Michael Tremer --- diff --git a/src/suricata-report-cron b/src/suricata-report-cron index 3aa4cc8..c0cc2c7 100644 --- a/src/suricata-report-cron +++ b/src/suricata-report-cron @@ -22,6 +22,9 @@ . /etc/sysconfig/rc . "${rc_functions}" +# Read the main settings +readhash MAIN "/var/ipfire/main/settings" + # Read the IPS settings readhash CONFIG "/var/ipfire/suricata/settings" @@ -29,6 +32,11 @@ send_report() { local args=( "$@" ) local address + # Choose the language + if [ -n "${MAIN[LANGUAGE]}" ]; then + args+=( "--locale=${MAIN[LANGUAGE]}" ) + fi + # Add the email sender if [ -n "${CONFIG[EMAIL_SENDER]}" ]; then args+=( "--email-sender=${CONFIG[EMAIL_SENDER]}" )