|
Server : Apache/2.4.62 System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64 User : www ( 80) PHP Version : 8.3.8 Disable Function : NONE Directory : /domains/highlandlabs/cqi-bin/ALFA_DATA/alfasymlink/root/usr/local/sbin/ |
Upload File : |
#!/bin/sh
##
## Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
##
## opendmarc-importstats -- import opendmarc output to MySQL
##
## This is intended to be used via a crontab. If import is successful,
## this code exits quietly so there's no output. If it fails, it does
## "ls -l" on the temporary file, so that cron generates mail to whever
## ran the job.
## setup
statsdb="/var/tmp/dmarc.dat"
# OPENDMARC_PASSWORD="password"; export OPENDMARC_PASSWORD
if [ -s $statsdb ]
then
mv $statsdb ${statsdb}.OLD.$$
if opendmarc-import < ${statsdb}.OLD.$$
then
rm ${statsdb}.OLD.$$
else
ls -l ${statsdb}.OLD.$$
fi
fi