sh.zio.backup: prototyping
parent
e1fbcd5eda
commit
dcded5d1b8
|
@ -167,7 +167,7 @@ function trigger_notify() {
|
|||
"$notify_prog" \
|
||||
--file "$log_path" \
|
||||
--level "$level" \
|
||||
--message '```'"$message"'```' \
|
||||
--message '\\`\\`\\`\\n'"$message"'\\n\\`\\`\\`' \
|
||||
--title "$title"
|
||||
|
||||
#--message '```\\n'"${message//$'\n'/'\\n'}"'\\n```' \
|
||||
|
|
|
@ -80,6 +80,8 @@ function main() {
|
|||
curl_command+=" -T \"$full_file\""
|
||||
curl_command+=" -H \"Filename: $(basename "$full_file")\""
|
||||
else
|
||||
curl_command+=" -X POST"
|
||||
|
||||
# HACK: Attachments don't work if you use "Cache: no"
|
||||
if [[ "$topic" == "zio_test" ]]; then
|
||||
curl_command+=" -H \"Cache: no\""
|
||||
|
@ -87,8 +89,7 @@ function main() {
|
|||
fi
|
||||
|
||||
curl_command+=" https://ntfy.zio.sh/$topic"
|
||||
|
||||
echo "$curl_command" | bash
|
||||
eval $curl_command
|
||||
}
|
||||
|
||||
if [[ $_PLUG_INVOKED != "true" ]]; then
|
||||
|
|
Loading…
Reference in New Issue