mirror of
https://github.com/mag37/dockcheck.git
synced 2026-02-18 17:28:15 +01:00
Notify_v2.sh bug fixes (#188)
* Notify_v2.sh bug fixes * Clarify notify_v2.sh usage in README.md * Fix JSON newline handling in Discord and Telegram channels * Additional error messages when notification templates fail to be sourced * Additional variable for self-hosted ntfy.sh domain * Notify_v2.sh additional fixes * Clarify usage in README.md and notify template comments * Support sourcing template files from project root * Add days old message to notification title * Handle JSON with jq in Discord and Telegram templates * Tweak notify_v2.sh usage docs and comments * Remove extra newline from notification body * replaced jq with jqbin, reodered setting of jqbin, changed source for hostname var * moved the setting of jqbin a bit further up after further testing --------- Co-authored-by: Matthew Oleksowicz <matt@everyoneneeds.it> Co-authored-by: mag37 <robin.ivehult@gmail.com>
This commit is contained in:
parent
22871442db
commit
57650f1673
16 changed files with 109 additions and 38 deletions
|
|
@ -332,6 +332,9 @@ dependency_check() {
|
|||
${!AppVar} "$VerFlag" &> /dev/null || { printf "%s\n" "$AppName is not working - try to remove it and re-download it, exiting."; exit 1; }
|
||||
}
|
||||
|
||||
dependency_check "regctl" "regbin" "https://github.com/regclient/regclient/releases/latest/download/regctl-linux-TEMP"
|
||||
dependency_check "jq" "jqbin" "https://github.com/jqlang/jq/releases/latest/download/jq-linux-TEMP"
|
||||
|
||||
# Numbered List function
|
||||
# if urls.list exists add release note url per line
|
||||
list_options() {
|
||||
|
|
@ -357,9 +360,6 @@ fi
|
|||
# Version check for notify templates
|
||||
[[ "$Notify" == true ]] && [[ ! -s "${ScriptWorkDir}/notify.sh" ]] && { exec_if_exists_or_fail notify_update_notification || printf "Could not source notify notification function.\n"; }
|
||||
|
||||
dependency_check "regctl" "regbin" "https://github.com/regclient/regclient/releases/latest/download/regctl-linux-TEMP"
|
||||
dependency_check "jq" "jqbin" "https://github.com/jqlang/jq/releases/latest/download/jq-linux-TEMP"
|
||||
|
||||
# Check docker compose binary
|
||||
docker info &>/dev/null || { printf "\n%bYour current user does not have permissions to the docker socket - may require root / docker group. Exiting.%b\n" "$c_red" "$c_reset"; exit 1; }
|
||||
if docker compose version &>/dev/null; then DockerBin="docker compose" ;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue