]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/monitoring/send_mails
Add e-mail checks monitoring
[perso/Immae/Config/Nix.git] / modules / private / monitoring / send_mails
diff --git a/modules/private/monitoring/send_mails b/modules/private/monitoring/send_mails
new file mode 100755 (executable)
index 0000000..105c505
--- /dev/null
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+
+CHECK_DIR=$1
+shift
+RETURN_PATH=$1
+shift
+
+for mail in "$@"; do
+  echo "Test Mail" | MAILRC=/dev/null mail -n -r "$RETURN_PATH" -s "TestMailImmae " "$mail"
+done
+
+if [ -d "$CHECK_DIR" ]; then
+  cd $CHECK_DIR
+  stat -c '%n;%y' *
+fi