From 8e8be549592ca2bde0610367532fb73b031cd830 Mon Sep 17 00:00:00 2001 From: Jim Hague Date: Thu, 22 Aug 2024 15:19:23 +0100 Subject: [PATCH] Run DMARC report update every day. --- states/dmarc_reports/init.sls | 10 ++++++++++ states/dmarc_reports/run-dmarcts | 4 ++++ 2 files changed, 14 insertions(+) create mode 100644 states/dmarc_reports/run-dmarcts diff --git a/states/dmarc_reports/init.sls b/states/dmarc_reports/init.sls index 24c6475..fe88b4f 100644 --- a/states/dmarc_reports/init.sls +++ b/states/dmarc_reports/init.sls @@ -29,3 +29,13 @@ dmarcts: - user: dmarc - group: dmarc - mode: 600 + +/home/dmarc/run-dmarcts: + file.managed: + - source: salt://dmarc_reports/run-dmarcts + - user: dmarc + - group: dmarc + - mode: 0755 + cron.present: + - user: dmarc + - special: '@hourly' diff --git a/states/dmarc_reports/run-dmarcts b/states/dmarc_reports/run-dmarcts new file mode 100644 index 0000000..67c32b6 --- /dev/null +++ b/states/dmarc_reports/run-dmarcts @@ -0,0 +1,4 @@ +#!/bin/sh + +cd /home/dmarc +exec dmarcts-report-parser -i