diff --git a/kuma-watchtower-ran b/kuma-watchtower-ran new file mode 100755 index 0000000..48e9748 --- /dev/null +++ b/kuma-watchtower-ran @@ -0,0 +1,16 @@ +#!/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