10 lines
No EOL
532 B
Bash
10 lines
No EOL
532 B
Bash
#!/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" |