Add smartmontools gotify notify script

This commit is contained in:
Tobias Strobel 2021-08-12 18:56:42 +02:00
parent 721f9596b0
commit db644edfd6

View file

@ -0,0 +1,11 @@
#!/bin/bash -e
# smartd Gotify Notification script, placed in /etc/smartmontools/run.d/99gotify
# See: https://manpages.debian.org/testing/smartmontools/smartd.conf.5.en.html for available ENV vars
# Send gotify noticication /usr/bin/curl exists
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.strobeto.de/message?token=AR12Hu7_7XDZ4Hf" -F "title=[$(hostname)] smartd $SMARTD_FAILTYPE ($SMARTD_DEVICESTRING)" -F "message=$SMARTD_MESSAGE" -F "priority=8"