#!/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"