sh.zio.backup: prototyping
parent
e1fbcd5eda
commit
dcded5d1b8
|
@ -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```' \
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue