mirror of
https://github.com/mag37/dockcheck.git
synced 2026-02-14 15:28:22 +01:00
Fix text insertion formatting for dockcheck script and container updates.
This commit is contained in:
parent
dac955544b
commit
f7e92d8a4f
1 changed files with 7 additions and 3 deletions
|
|
@ -209,12 +209,16 @@ format_output() {
|
|||
if [[ -z "${UpdToString}" ]]; then
|
||||
FormattedOutput="None"
|
||||
else
|
||||
if [[ "${UpdateType}" == "dockcheck_update" ]]; then
|
||||
if [[ "${UpdateType}" == "container_update" ]]; then
|
||||
FormattedOutput="${FormattedTextTemplate/<insert_text_cu>/${UpdToString}}"
|
||||
elif [[ "${UpdateType}" == "notify_update" ]]; then
|
||||
FormattedOutput="${FormattedTextTemplate/<insert_text_nu>/${UpdToString}}"
|
||||
elif [[ "${UpdateType}" == "dockcheck_update" ]]; then
|
||||
FormattedOutput="${FormattedTextTemplate/<insert_text_iv>/$4}"
|
||||
FormattedOutput="${FormattedTextTemplate/<insert_text_lv>/$5}"
|
||||
FormattedOutput="${FormattedTextTemplate/<insert_text_rn>/$6}"
|
||||
else
|
||||
FormattedOutput="${FormattedTextTemplate/<insert_text>/${UpdToString}}"
|
||||
FormattedOutput="Invalid input"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
@ -333,7 +337,7 @@ notify_update_notification() {
|
|||
local template=$(get_channel_template "${channel}")
|
||||
|
||||
# Formats UpdToString variable per channel settings
|
||||
format_output "notify_update" "$(output_format "${channel}")" "Notify templates on $FromHost with updates available:\n<insert_text>\n"
|
||||
format_output "notify_update" "$(output_format "${channel}")" "Notify templates on $FromHost with updates available:\n<insert_text_nu>\n"
|
||||
|
||||
# Setting the MessageBody variable here.
|
||||
printf -v MessageBody "${FormattedOutput}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue