-
|
Hi! I'd like to had a ntfy curl command to get a notification, but I don't really want to manually tweak dietpi-backup script... (And even if I wanted to, I wouldn't know where to start 😅 ) |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
|
There is this But I would not implement an own notification system for Sending E-Mails should be just one option, a banner notice, webhook, and custom command to call would be good additions. |
Beta Was this translation helpful? Give feedback.
-
|
That's great. I'll workaround that file, thanks! |
Beta Was this translation helpful? Give feedback.
-
|
here's what I wrote. I need to test it when it fails. And maybe I'll attach the logfile, but for the moment it works: #!/bin/bash
LOG_FILE="/location/of/the/backup/dietpi-backup/.dietpi-backup_stats"
PATTERN="Backup completed"
LAST_LINE=$(tail -n 1 "$LOG_FILE")
if echo "$LAST_LINE" | grep -q "$PATTERN"; then
curl \
-u :tk_xxx \
-H "Title: Dietpi-backup completed successfully" \
-H "Tags: minidisc, heavy_check_mark" \
-d "The last dietpi-backup completed successfully" \
https://ntfy.sh/lalalala
else
curl \
-u :tk_xxx \
-H "Title: Dietpi-backup failed" \
-H "Tags: minidisc, rotating_light" \
-d "The last dietpi-backup failed! Go check log!" \
https://ntfy.sh/lalalala
fi |
Beta Was this translation helpful? Give feedback.

There is this
.dietpi-backup_statsfile inside the target directory which shows a "Backup completed" in the last line in case of success. So that could be checked for.But I would not implement an own notification system for
dietpi-backuponly. Instead, a general notification system for certain configurable events or failing checks would be great: #2663Sending E-Mails should be just one option, a banner notice, webhook, and custom command to call would be good additions.