Files
bin/kuma-watchtower-ran

17 lines
532 B
Bash
Executable File

#!/bin/bash
now="$(date +%s)"
# check to see if docker tried to update images last night
lastUpdate="$(stat -c %Y /srv/docker/log/update-docker.log)"
let diff_in_days="(${now}-${lastUpdate})/(3600*24)"
if [ $diff_in_days -gt 1 ]; then
echo ": watchtower did not run"
curl 'http://mara.ddp.net:3001/api/push/20N8YGGEiP?status=down&msg=OK'
else
# okay watchtower ran last night, lets just tell mon.depaoli.id.au so we dont get an alert
curl 'http://mara.ddp.net:3001/api/push/20N8YGGEiP?status=up&msg=OK'
fi
exit 0