Add smartmontools gotify notify script
This commit is contained in:
parent
721f9596b0
commit
db644edfd6
1 changed files with 11 additions and 0 deletions
11
helios/smartmontools-notify-gotify.sh
Normal file
11
helios/smartmontools-notify-gotify.sh
Normal 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"
|
Loading…
Reference in a new issue