backup: add emoji tag to ntfy message
This commit is contained in:
parent
cf3a7df57e
commit
04dcdc2003
1 changed files with 7 additions and 0 deletions
|
@ -110,8 +110,15 @@ in
|
||||||
title="${hostname}: backup completed with exit code: $exitStatus"
|
title="${hostname}: backup completed with exit code: $exitStatus"
|
||||||
msg=$(journalctl -o cat _SYSTEMD_INVOCATION_ID=$invocationId)
|
msg=$(journalctl -o cat _SYSTEMD_INVOCATION_ID=$invocationId)
|
||||||
|
|
||||||
|
if [ "$exitStatus" -eq 0 ]; then
|
||||||
|
tag="v"
|
||||||
|
else
|
||||||
|
tag="rotating_light"
|
||||||
|
fi
|
||||||
|
|
||||||
${pkgs.curl}/bin/curl -sL -u $(cat ${config.sops.secrets."services/ntfy".path}) \
|
${pkgs.curl}/bin/curl -sL -u $(cat ${config.sops.secrets."services/ntfy".path}) \
|
||||||
-H "Title: $title" \
|
-H "Title: $title" \
|
||||||
|
-H "Tags: $tag" \
|
||||||
-d "$msg" \
|
-d "$msg" \
|
||||||
https://ntfy.cything.io/backups > /dev/null
|
https://ntfy.cything.io/backups > /dev/null
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Add table
Reference in a new issue