diff --git a/smartd-exec-ntfy.sh b/smartd-exec-ntfy.sh new file mode 100644 index 0000000..ae72de3 --- /dev/null +++ b/smartd-exec-ntfy.sh @@ -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" \ No newline at end of file