This commit is contained in:
parent
afdf818fe3
commit
d85767bdb1
@ -1,5 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
|
||||||
# TODO: Verify that variables are set properly
|
# TODO: Verify that variables are set properly
|
||||||
|
|
||||||
if [ -z ${PLUGIN_GOTIFY_URL} ]; then
|
if [ -z ${PLUGIN_GOTIFY_URL} ]; then
|
||||||
@ -12,4 +11,11 @@ if [ -z ${PLUGIN_GOTIFY_TOKEN} ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
curl "${PLUGIN_GOTIFY_URL}/message?token=${PLUGIN_GOTIFY_TOKEN}" -F "title=${PLUGIN_TITLE}" -F "message=${PLUGIN_MESSAGE}" -F "priority=5"
|
res=$(curl -s "${PLUGIN_GOTIFY_URL}/message?token=${PLUGIN_GOTIFY_TOKEN}" -F "title=${PLUGIN_TITLE}" -F "message=${PLUGIN_MESSAGE}" -F "priority=5")
|
||||||
|
if [ "$?" -ne "0" ]; then
|
||||||
|
echo "Failed to send message"
|
||||||
|
exit "$?"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Sent message with title ${PLUGIN_TITLE}:"
|
||||||
|
echo "${PLUGIN_MESSAGE}"
|
Loading…
Reference in New Issue
Block a user