File: dmarcts-report-parser.cronjob

package info (click to toggle)
dmarcts-report-parser 1.0%2Bgit20230715.9dd92cf-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 312 kB
  • sloc: perl: 2,544; sh: 62; makefile: 8
file content (23 lines) | stat: -rwxr-xr-x 729 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

DMARCTS_USER="_dmarcts"
DMARCTS_PARSER_OPTIONS=""

if [ -e "/etc/default/dmarcts-report-parser" ]; then
	. /etc/default/dmarcts-report-parser
else
	echo "$(basename $0): /etc/default/dmarcts-report-parser, report parser probably not configured?" 1>&2
	exit 1
fi

if [ "$IS_CONFIGURED" != "1" ]; then
	echo "$(basename $0): /etc/default/dmarcts-report-parser found, but IS_CONFIGURED not set to '1'. Not configured, yet?" 1>&2
	exit 1
fi

if ! getent passwd "$DMARCTS_USER" 1>/dev/null; then
	echo "$(basename $0): /etc/default/dmarcts-report-parser found, but DMARCTS_USER not found. Not configured, yet?" 1>&2
	exit 1
fi

su -s /bin/sh - "$DMARCTS_USER" -c "/usr/sbin/dmarcts-report-parser $DMARCTS_PARSER_OPTIONS"