2022-01-10 12:33:06 +00:00
|
|
|
#!/bin/sh
|
2022-01-10 12:51:50 +00:00
|
|
|
set -e
|
2022-01-10 12:33:06 +00:00
|
|
|
# TODO: Verify that variables are set properly
|
2022-01-10 12:46:24 +00:00
|
|
|
|
2022-01-10 12:51:50 +00:00
|
|
|
if [ -z ${PLUGIN_GOTIFY_URL} ]; then
|
|
|
|
echo "PLUGIN_GOTIFY_URL is not set";
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z ${PLUGIN_GOTIFY_TOKEN} ]; then
|
|
|
|
echo "PLUGIN_GOTIFY_TOKEN is not set";
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2022-01-10 12:46:24 +00:00
|
|
|
curl "${PLUGIN_GOTIFY_URL}/message?token=${PLUGIN_GOTIFY_TOKEN}" -F "title=${PLUGIN_TITLE}" -F "message=${PLUGIN_MESSAGE}" -F "priority=5"
|