this tells kuma whether watchtower ran and worked, its runs on the host O/S to see all the logs of all containers changed

This commit is contained in:
2025-08-16 10:49:24 +10:00
parent 236eb84750
commit 15f2a80d10

16
kuma-watchtower-ran Executable file
View File

@@ -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