2
0
Fork 0

sh.zio.backup: prototyping

main
Ducky 2024-04-01 23:51:33 +01:00
parent e1fbcd5eda
commit dcded5d1b8
2 changed files with 4 additions and 3 deletions

View File

@ -167,7 +167,7 @@ function trigger_notify() {
"$notify_prog" \ "$notify_prog" \
--file "$log_path" \ --file "$log_path" \
--level "$level" \ --level "$level" \
--message '```'"$message"'```' \ --message '\\`\\`\\`\\n'"$message"'\\n\\`\\`\\`' \
--title "$title" --title "$title"
#--message '```\\n'"${message//$'\n'/'\\n'}"'\\n```' \ #--message '```\\n'"${message//$'\n'/'\\n'}"'\\n```' \

View File

@ -80,6 +80,8 @@ function main() {
curl_command+=" -T \"$full_file\"" curl_command+=" -T \"$full_file\""
curl_command+=" -H \"Filename: $(basename "$full_file")\"" curl_command+=" -H \"Filename: $(basename "$full_file")\""
else else
curl_command+=" -X POST"
# HACK: Attachments don't work if you use "Cache: no" # HACK: Attachments don't work if you use "Cache: no"
if [[ "$topic" == "zio_test" ]]; then if [[ "$topic" == "zio_test" ]]; then
curl_command+=" -H \"Cache: no\"" curl_command+=" -H \"Cache: no\""
@ -87,8 +89,7 @@ function main() {
fi fi
curl_command+=" https://ntfy.zio.sh/$topic" curl_command+=" https://ntfy.zio.sh/$topic"
eval $curl_command
echo "$curl_command" | bash
} }
if [[ $_PLUG_INVOKED != "true" ]]; then if [[ $_PLUG_INVOKED != "true" ]]; then