Update script
This commit is contained in:
parent
cc1b58f90f
commit
cc98edab6c
1 changed files with 3 additions and 3 deletions
|
@ -220,7 +220,7 @@
|
|||
end
|
||||
|
||||
# --- Read Piped Input ---
|
||||
set -l message_body "Command completed"
|
||||
set -l message_body "$(date)\n Command completed"
|
||||
|
||||
# --- Manual JSON Escaping ---
|
||||
set -l escaped_subject (string replace -a '\\' '\\\\' "$subject" | string replace -a '"' '\\"')
|
||||
|
@ -231,11 +231,11 @@
|
|||
"$escaped_subject" "$escaped_message" $priority)
|
||||
|
||||
# --- Execute curl (Verbose, Foreground) ---
|
||||
echo $json_payload | curl -v -X POST \
|
||||
echo $json_payload | curl -X POST \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "X-Gotify-Key: $gotify_token" \
|
||||
--data @- \
|
||||
"$gotify_url/message"
|
||||
"$gotify_url/message" > /dev/null
|
||||
|
||||
# --- Check curl Status ---
|
||||
set curl_status $status
|
||||
|
|
Loading…
Add table
Reference in a new issue