sh.zio.backup: fix notify not handling messages right
parent
a0c489b0c7
commit
991a21a5be
|
@ -166,13 +166,18 @@ function trigger_notify() {
|
||||||
if [[ ! -f "$notify_prog" ]]; then
|
if [[ ! -f "$notify_prog" ]]; then
|
||||||
say warning "'$notify_prog' does not exist. Not sending notification"
|
say warning "'$notify_prog' does not exist. Not sending notification"
|
||||||
else
|
else
|
||||||
notify_command="$notify_prog"
|
if [[ -n "$message" ]]; then
|
||||||
[[ -n "$log_path" ]] && notify_command+=" --file \"$log_path\""
|
"$notify_prog" \
|
||||||
[[ -n "$message" ]] && notify_command+=" --message '\\`\\`\\`\\n'\"${message//$'\n'/'\\n'}\"'\\n\\`\\`\\`'"
|
--file "$log_path" \
|
||||||
notify_command+=" --level $level"
|
--level "$level" \
|
||||||
notify_command+=" --title \"$title\""
|
--title "$title"
|
||||||
|
else
|
||||||
eval $notify_command
|
"$notify_prog" \
|
||||||
|
--file "$log_path" \
|
||||||
|
--level "$level" \
|
||||||
|
--message '\\`\\`\\`\\n'"${message//$'\n'/'\\n'}"'\\n\\`\\`\\`' \
|
||||||
|
--title "$title"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue