mirror of
https://github.com/mag37/dockcheck.git
synced 2026-02-15 15:58:13 +01:00
all template rewritten, some guesswork
This commit is contained in:
parent
e5a7a715c6
commit
ac10a96cc8
10 changed files with 28 additions and 36 deletions
|
|
@ -18,8 +18,8 @@ else
|
|||
fi
|
||||
|
||||
send_notification() {
|
||||
Updates=("$@")
|
||||
[ -s "$ScriptWorkDir"/urls.list ] && UpdToString=$( releasenotes ) || UpdToString=$( printf "%s\n" "${Updates[@]}" )
|
||||
[ -s "$ScriptWorkDir"/urls.list ] && releasenotes || Updates=("$@")
|
||||
UpdToString=$( printf '%s\\n' "${Updates[@]}" )
|
||||
FromHost=$(hostname)
|
||||
CfgFile="/usr/syno/etc/synosmtp.conf"
|
||||
|
||||
|
|
|
|||
|
|
@ -5,20 +5,15 @@
|
|||
# Modify to fit your setup - if API, set AppriseURL to your Apprise ip/domain.
|
||||
|
||||
send_notification() {
|
||||
Updates=("$@")
|
||||
[ -s "$ScriptWorkDir"/urls.list ] && UpdToString=$( releasenotes ) || UpdToString=$( printf "%s\n" "${Updates[@]}" )
|
||||
[ -s "$ScriptWorkDir"/urls.list ] && releasenotes || Updates=("$@")
|
||||
UpdToString=$( printf '%s\\n' "${Updates[@]}" )
|
||||
FromHost=$(hostname)
|
||||
|
||||
printf "\nSending Apprise notification\n"
|
||||
|
||||
MessageTitle="$FromHost - updates available."
|
||||
# Setting the MessageBody variable here.
|
||||
read -d '\n' MessageBody << __EOF
|
||||
Containers on $FromHost with updates available:
|
||||
|
||||
$UpdToString
|
||||
|
||||
__EOF
|
||||
MessageBody=$(printf "🐋 Containers on $FromHost with updates available: \n$UpdToString")
|
||||
|
||||
# Modify to fit your setup:
|
||||
apprise -vv -t "$MessageTitle" -b "$MessageBody" \
|
||||
|
|
|
|||
|
|
@ -4,11 +4,13 @@
|
|||
# generic sample, the "Hello World" of notification addons
|
||||
|
||||
send_notification() {
|
||||
Updates=("$@")
|
||||
[ -s "$ScriptWorkDir"/urls.list ] && UpdToString=$( releasenotes ) || UpdToString=$( printf "%s\n" "${Updates[@]}" )
|
||||
[ -s "$ScriptWorkDir"/urls.list ] && releasenotes || Updates=("$@")
|
||||
UpdToString=$( printf '%s\\n' "${Updates[@]}" )
|
||||
|
||||
FromHost=$(hostname)
|
||||
|
||||
# platform specific notification code would go here
|
||||
printf "\n%bGeneric notification addon:%b" "$c_green" "$c_reset"
|
||||
printf "\nThe following docker containers on %s need to be updated:\n%s\n" "$FromHost" "$UpdToString"
|
||||
printf "\nThe following docker containers on %s need to be updated:\n" "$FromHost"
|
||||
printf "$UpdToString"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
# Modify to fit your setup - set GotifyUrl and GotifyToken.
|
||||
|
||||
send_notification() {
|
||||
Updates=("$@")
|
||||
[ -s "$ScriptWorkDir"/urls.list ] && UpdToString=$( releasenotes ) || UpdToString=$( printf "%s\n" "${Updates[@]}" )
|
||||
[ -s "$ScriptWorkDir"/urls.list ] && releasenotes || Updates=("$@")
|
||||
UpdToString=$( printf '%s\\n' "${Updates[@]}" )
|
||||
FromHost=$(hostname)
|
||||
|
||||
# platform specific notification code would go here
|
||||
|
|
@ -14,7 +14,7 @@ send_notification() {
|
|||
|
||||
# Setting the MessageTitle and MessageBody variable here.
|
||||
MessageTitle="${FromHost} - updates available."
|
||||
MessageBody="Containers on ${FromHost} with updates available: ${UpdToString}"
|
||||
MessageBody=$(printf "🐋 Containers on $FromHost with updates available: \n$UpdToString")
|
||||
|
||||
# Modify to fit your setup:
|
||||
GotifyToken="Your Gotify token here"
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
# Modify to fit your setup - set MatrixServer, Room_id and AccessToken
|
||||
|
||||
send_notification() {
|
||||
Updates=("$@")
|
||||
[ -s "$ScriptWorkDir"/urls.list ] && UpdToString=$( releasenotes ) || UpdToString=$( printf "%s\n" "${Updates[@]}" )
|
||||
[ -s "$ScriptWorkDir"/urls.list ] && releasenotes || Updates=("$@")
|
||||
UpdToString=$( printf '%s\\n' "${Updates[@]}" )
|
||||
FromHost=$(hostname)
|
||||
|
||||
# platform specific notification code would go here
|
||||
|
|
|
|||
|
|
@ -5,20 +5,15 @@
|
|||
# Use your unique Topic Name in the URL below.
|
||||
|
||||
send_notification() {
|
||||
Updates=("$@")
|
||||
[ -s "$ScriptWorkDir"/urls.list ] && UpdToString=$( releasenotes ) || UpdToString=$( printf "%s\n" "${Updates[@]}" )
|
||||
[ -s "$ScriptWorkDir"/urls.list ] && releasenotes || Updates=("$@")
|
||||
UpdToString=$( printf '%s\\n' "${Updates[@]}" )
|
||||
FromHost=$(hostname)
|
||||
|
||||
printf "\nSending ntfy.sh notification\n"
|
||||
|
||||
MessageTitle="$FromHost - updates available."
|
||||
# Setting the MessageBody variable here.
|
||||
read -d '\n' MessageBody << __EOF
|
||||
Containers on $FromHost with updates available:
|
||||
|
||||
$UpdToString
|
||||
|
||||
__EOF
|
||||
MessageBody=$(printf "🐋 Containers on $FromHost with updates available: \n$UpdToString")
|
||||
|
||||
# Modify to fit your setup:
|
||||
NtfyUrl="ntfy.sh/YourUniqueTopicName"
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
# Modify to fit your setup - set Url and Token.
|
||||
|
||||
send_notification() {
|
||||
Updates=("$@")
|
||||
[ -s "$ScriptWorkDir"/urls.list ] && UpdToString=$( releasenotes ) || UpdToString=$( printf "%s\n" "${Updates[@]}" )
|
||||
[ -s "$ScriptWorkDir"/urls.list ] && releasenotes || Updates=("$@")
|
||||
UpdToString=$( printf '%s\\n' "${Updates[@]}" )
|
||||
FromHost=$(hostname)
|
||||
|
||||
# platform specific notification code would go here
|
||||
|
|
@ -15,7 +15,7 @@ printf "\nSending pushbullet notification\n"
|
|||
|
||||
MessageTitle="$FromHost - updates available."
|
||||
# Setting the MessageBody variable here.
|
||||
MessageBody="Containers on $FromHost with updates available: $UpdToString"
|
||||
MessageBody=$(printf "🐋 Containers on $FromHost with updates available: \n$UpdToString")
|
||||
|
||||
# Modify to fit your setup:
|
||||
PushUrl="https://api.pushbullet.com/v2/pushes"
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
# Modify to fit your setup - set Url and Token.
|
||||
|
||||
send_notification() {
|
||||
Updates=("$@")
|
||||
[ -s "$ScriptWorkDir"/urls.list ] && UpdToString=$( releasenotes ) || UpdToString=$( printf "%s\n" "${Updates[@]}" )
|
||||
[ -s "$ScriptWorkDir"/urls.list ] && releasenotes || Updates=("$@")
|
||||
UpdToString=$( printf '%s\\n' "${Updates[@]}" )
|
||||
FromHost=$(hostname)
|
||||
|
||||
# platform specific notification code would go here
|
||||
|
|
@ -15,7 +15,7 @@ send_notification() {
|
|||
|
||||
MessageTitle="$FromHost - updates available."
|
||||
# Setting the MessageBody variable here.
|
||||
MessageBody="Containers on $FromHost with updates available: $UpdToString"
|
||||
MessageBody=$(printf "🐋 Containers on $FromHost with updates available: \n$UpdToString")
|
||||
|
||||
# Modify to fit your setup:
|
||||
PushoverUrl="https://api.pushover.net/1/messages.json"
|
||||
|
|
|
|||
|
|
@ -17,8 +17,8 @@ else
|
|||
fi
|
||||
|
||||
send_notification() {
|
||||
Updates=("$@")
|
||||
[ -s "$ScriptWorkDir"/urls.list ] && UpdToString=$( releasenotes ) || UpdToString=$( printf "%s\n" "${Updates[@]}" )
|
||||
[ -s "$ScriptWorkDir"/urls.list ] && releasenotes || Updates=("$@")
|
||||
UpdToString=$( printf '%s\\n' "${Updates[@]}" )
|
||||
FromHost=$(hostname)
|
||||
|
||||
# User variables:
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@
|
|||
# Modify to fit your setup - set TelegramChatId and TelegramToken.
|
||||
|
||||
send_notification() {
|
||||
Updates=("$@")
|
||||
[ -s "$ScriptWorkDir"/urls.list ] && UpdToString=$( releasenotes ) || UpdToString=$( printf "%s\n" "${Updates[@]}" )
|
||||
[ -s "$ScriptWorkDir"/urls.list ] && releasenotes || Updates=("$@")
|
||||
UpdToString=$( printf '%s\\n' "${Updates[@]}" )
|
||||
FromHost=$(hostname)
|
||||
|
||||
# platform specific notification code would go here
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue