aboutsummaryrefslogtreecommitdiffstats
path: root/check-certificates
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2018-10-09 15:52:08 +0200
committerGravatar Christian Hesse <mail@eworm.de>2018-10-09 15:57:53 +0200
commite89779ff9f11e0a48f3b0cd480c0410d40c1a77e (patch)
tree36330d3baf665ef8bcecdd30572c69b8789f3a36 /check-certificates
parentf262ff99a83d1c588b9eb275e9b17bb076ab3c8b (diff)
check-certificates: use function for notification
Diffstat (limited to 'check-certificates')
-rw-r--r--check-certificates7
1 files 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" . \