Add notify hook 'ntfy' for smartd
This commit is contained in:
parent
61735e1812
commit
9a0c3bb30b
1 changed files with 10 additions and 0 deletions
10
smartd-exec-ntfy.sh
Normal file
10
smartd-exec-ntfy.sh
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
# smartd ntfy notification script, placed in /etc/smartmontools/run.d/99ntfy (for Debian)
|
||||||
|
# See: https://manpages.debian.org/testing/smartmontools/smartd.conf.5.en.html for available ENV vars
|
||||||
|
|
||||||
|
if ! [ -x /usr/bin/curl ]; then
|
||||||
|
echo "Your system does not have /usr/bin/curl. Install the curl package"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
curl -fsS -m 10 --retry 5 -o /dev/null "https://push.rafe.li/helios-smartd" -H "Title: [$(hostname)] smartd $SMARTD_FAILTYPE ($SMARTD_DEVICESTRING)" -H "Priority: high" -d "$SMARTD_MESSAGE"
|
Loading…
Reference in a new issue