45 lines
1.2 KiB
Bash
Executable File
45 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# check for Presence videos being sync'd // convert to eufy when I get time
|
|
#cnt=`sudo find /export/backup/Presence/ -name '*.mp4' -mtime -2 | wc -l`
|
|
#if [ $cnt = 0 ]; then
|
|
# echo "No Presence videos in the last 24 hours have been synced"
|
|
# exit -1
|
|
#fi
|
|
|
|
now="$(date +%s)"
|
|
|
|
# see if backup was 1 day or more ago (just in case we rsync broken data)
|
|
lastUpdate="$(stat -c %Y /home/ddp/tmp/bw-bkup.log)"
|
|
let diff_in_days="(${now}-${lastUpdate})/(3600*24)"
|
|
|
|
if [ $diff_in_days -gt 1 ]; then
|
|
echo "bitwarden not backed up to DU in last 24 hours!"
|
|
exit -1
|
|
fi
|
|
|
|
# see if backup was 1 day or more ago (just in case we rsync broken data)
|
|
lastUpdate="$(stat -c %Y /home/ddp/tmp/last_mara_bkup)"
|
|
let diff_in_days="(${now}-${lastUpdate})/(3600*24)"
|
|
|
|
if [ $diff_in_days -gt 3 ]; then
|
|
echo "mara not backed up to borric in last 3 days!"
|
|
exit -1
|
|
fi
|
|
|
|
# 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 in last 24 hours!"
|
|
exit -1
|
|
fi
|
|
|
|
ret=`/home/ddp/bin/restic-success`
|
|
if [ $? -ne 0 ]; then
|
|
echo "restic backups failed?"
|
|
exit -1
|
|
fi
|
|
|
|
exit 0
|