backuprunner/scripts/notify.sh
2025-01-13 21:57:34 +00:00

15 lines
339 B
Bash
Executable file

#!/usr/bin/env bash
file="$1"
dir="${2:-/opt/backuprunner/dates}"
date="$(stat -c%y "$dir/$file" | cut -d'.' -f1) (UTC)"
title="$file backup is out of date!"
description="Last successful backup: $date"
. /opt/backuprunner/scripts/ntfy-url.sh
curl -H "Title: $title" \
-H "Priority: high" \
-d "$description" \
$NTFY_URL