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"
|