]> git.ipfire.org Git - suricata-reporter.git/commitdiff
cron: Send reports in the system's default language 0.1
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 31 Aug 2025 15:23:58 +0000 (15:23 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 31 Aug 2025 15:23:58 +0000 (15:23 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/suricata-report-cron

index 3aa4cc8f89896df17f82755dc7cbde8b6a921509..c0cc2c71b50f5f55109872d9845f22b1712cba4b 100644 (file)
@@ -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]}" )