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:
16
kuma-watchtower-ran
Executable file
16
kuma-watchtower-ran
Executable 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
|
||||
Reference in New Issue
Block a user