master
Bel LaPointe 2024-09-04 16:42:36 -06:00
parent 318592fd4d
commit 572b46b3d0
1 changed files with 7 additions and 3 deletions

View File

@ -1,5 +1,11 @@
#! /bin/bash
set -euo pipefail
if test -f /volume1/homes/squeaky2x3/services/moonfire-nvr.d/moonfire-nvr.sh; then
bash /volume1/homes/squeaky2x3/services/moonfire-nvr.d/moonfire-nvr.sh
fi
main() {
local nonrecent_unix="$(($(_date +%s) - 4 * 60 * 60))" # 4h ago
local nonrecent_ts="$(_date -d @$nonrecent_unix -u +%Y-%m-%dT%H:%M:%SZ)"
@ -93,6 +99,4 @@ _date() {
fi
}
if [ "$0" == "$BASH_SOURCE" ]; then
main "$@"
fi
main "$@"