From e89779ff9f11e0a48f3b0cd480c0410d40c1a77e Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 9 Oct 2018 15:52:08 +0200 Subject: [PATCH] check-certificates: use function for notification --- check-certificates | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/check-certificates b/check-certificates index 240dd8b..e584462 100644 --- a/check-certificates +++ b/check-certificates @@ -8,6 +8,8 @@ :global "email-general-to"; :global "email-general-cc"; +:global SendNotification; + :local months ("jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"); :local currentdate [ / system clock get date ]; @@ -36,9 +38,8 @@ :local fingerprint [ / certificate get $cert fingerprint ]; :local invalidbefore [ / certificate get $cert invalid-before ]; :local invalidafter [ / certificate get $cert invalid-after ]; - / tool e-mail send to=$"email-general-to" cc=$"email-general-cc" \ - subject=("[" . $identity . "] Certificate warning!") \ - body=("A certificate on " . $identity . " is about to expire.\n\n" . \ + $SendNotification ("[" . $identity . "] Certificate warning!") \ + ("A certificate on " . $identity . " is about to expire.\n\n" . \ "Certificate Name: " . $certname . "\n" . \ "Common Name: " . $commonname . "\n" . \ "Fingerprint: " . $fingerprint . "\n" . \