From b7008e8144a455fa1eb34e24238dc3dc33a7215f Mon Sep 17 00:00:00 2001 From: ttionya Date: Fri, 6 Sep 2024 23:08:07 +0800 Subject: [PATCH] fix: fix PING test --- scripts/entrypoint.sh | 2 +- scripts/includes.sh | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index cf36582..e755e13 100644 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -33,7 +33,7 @@ if [[ "$1" == "ping" ]]; then PING_DEBUG="TRUE" - send_mail "vaultwarden Backup Test" "Your PING configuration looks correct." + send_ping "$2" "vaultwarden Backup Test" "Your PING configuration looks correct." exit 0 fi diff --git a/scripts/includes.sh b/scripts/includes.sh index 12c4fba..172dc9f 100644 --- a/scripts/includes.sh +++ b/scripts/includes.sh @@ -158,24 +158,24 @@ function send_notification() { case "$1" in start) - // ping + # ping send_ping "start" "${SUBJECT_START}" "$2" ;; success) - // mail + # mail if [[ "${MAIL_SMTP_ENABLE}" == "TRUE" && "${MAIL_WHEN_SUCCESS}" == "TRUE" ]]; then send_mail "${SUBJECT_SUCCESS}" "$2" fi - // ping + # ping send_ping "success" "${SUBJECT_SUCCESS}" "$2" send_ping "completion" "${SUBJECT_SUCCESS}" "$2" ;; failure) - // mail + # mail if [[ "${MAIL_SMTP_ENABLE}" == "TRUE" && "${MAIL_WHEN_FAILURE}" == "TRUE" ]]; then send_mail "${SUBJECT_FAILURE}" "$2" fi - // ping + # ping send_ping "failure" "${SUBJECT_FAILURE}" "$2" send_ping "completion" "${SUBJECT_FAILURE}" "$2" ;;