parent
74a2fc4513
commit
12f12efb9b
|
@ -2,6 +2,13 @@
|
||||||
|
|
||||||
#set -eux
|
#set -eux
|
||||||
|
|
||||||
|
LOG_FILE="/media/workshop/Projects/openmedianetwork/.omn_watchdog.log"
|
||||||
|
touch ${LOG_FILE}
|
||||||
|
|
||||||
|
# Redirect all output to LOG_FILE but preserve a link to stdout should we
|
||||||
|
# still want to use it
|
||||||
|
exec 3>&1 1>>${LOG_FILE} 2>&1
|
||||||
|
|
||||||
RECIPIENTS=(
|
RECIPIENTS=(
|
||||||
saunders@openworlds.info
|
saunders@openworlds.info
|
||||||
witchescauldron@openworlds.info
|
witchescauldron@openworlds.info
|
||||||
|
@ -41,11 +48,13 @@ send_mail() {
|
||||||
|
|
||||||
cat mail_template \
|
cat mail_template \
|
||||||
| sed "s/{ERR_LIST}/${error_string}/g" \
|
| sed "s/{ERR_LIST}/${error_string}/g" \
|
||||||
| msmtp -a omn_server_watch ${RECIPIENTS[@]} 2>/dev/null
|
| msmtp -a omn_server_watch ${RECIPIENTS[@]} 2>/dev/null \
|
||||||
|
|| echo "[ERROR] Failed to send mail!"
|
||||||
}
|
}
|
||||||
|
|
||||||
declare -A FLAGGED
|
declare -A FLAGGED
|
||||||
|
|
||||||
|
echo "== $(date)"
|
||||||
echo "== Checking:"
|
echo "== Checking:"
|
||||||
|
|
||||||
for uri in "${URLS[@]}"; do \
|
for uri in "${URLS[@]}"; do \
|
||||||
|
|
Loading…
Reference in New Issue