$ICON is now optional
This commit is contained in:
@@ -112,15 +112,15 @@ if should_notify "$DUPLICATI__PARSED_RESULT"; then
|
||||
CURL_CMD="curl -s -X POST \"$NTFY_URL\" \
|
||||
-H \"Authorization: Bearer $AUTH_TOKEN\" \
|
||||
-H \"Priority: $PRIORITY\" \
|
||||
-H \"Tags: $TAGS\" \
|
||||
-H \"Icon: $ICON\" \
|
||||
-H \"Content-Type: application/json\" \
|
||||
-d '{\"topic\": \"Duplicati\", \"title\": \"$TITLE\", \"message\": \"$MESSAGE\\n\\nServer: $SERVER_NAME\\nJobname: $DUPLICATI__backup_name\\nStatus: $DUPLICATI__PARSED_RESULT\", \"click\": \"\", \"actions\": [{ \"action\": \"view\", \"label\": \"Duplicati öffnen\", \"url\": \"$DUPLICATI_URL\" }]}'
|
||||
"
|
||||
-H \"Tags: $TAGS\""
|
||||
if [ -n "$ICON" ]; then
|
||||
CURL_CMD="$CURL_CMD -H \"Icon: $ICON\""
|
||||
fi
|
||||
CURL_CMD="$CURL_CMD -H \"Content-Type: application/json\" \
|
||||
-d '{\"topic\": \"Duplicati\", \"title\": \"$TITLE\", \"message\": \"$MESSAGE\\n\\nServer: $SERVER_NAME\\nJobname: $DUPLICATI__backup_name\\nStatus: $DUPLICATI__PARSED_RESULT\", \"click\": \"\", \"actions\": [{ \"action\": \"view\", \"label\": \"Duplicati öffnen\", \"url\": \"$DUPLICATI_URL\" }]}'"
|
||||
|
||||
|
||||
# Log den curl-Befehl
|
||||
|
||||
|
||||
if [[ "$LOGGING" == "debug" ]]; then
|
||||
log_message "curl Befehl: $CURL_CMD"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user