Justin Blancher's ACFST project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

19 lines
771 B

#!/bin/bash
[[ -z "${@}" ]] && >&2 echo "Must supply email address list!" && exit 1
date=$(date -d '-1 day' +%F)
while [[ ! -z "${@}" ]]; do
addr=${1}
shift
mail -r acf.shiptracker@gmail.com \
-s "ACF ShipTracker Log" \
-a /var/log/acfst/ACFshipdata_${date}.csv \
${addr} << EOF
This is an automated ACF ShipTracker email. Attached is the log from yesterday (${date}). It contains all of the vessels coming through Mobile Bay that meet the thresholds (currently traveling over 10.0 knots and at least 15.0 meters wide). The format of the file is Comma Separated Values (CSV).
Please do not respond to this email. For assistance, please contact Justin Blancher (jeblancher@gmail.com) for any troubleshooting.
EOF
done