Added basic monitoring

This commit is contained in:
Ubergeek
2019-02-07 00:42:50 +00:00
parent ddbe0ba4ee
commit 4f769e8f4c
6 changed files with 25 additions and 2 deletions

10
checks/imap Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
export SITE=$1
timeout 2 bash -c "</dev/tcp/${SITE}/143" > /dev/null
if [ $? -ne "0" ]
then
exit 1
else
exit 0
fi

10
checks/smtp Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
export SITE=$1
timeout 2 bash -c "</dev/tcp/${SITE}/25" > /dev/null
if [ $? -ne "0" ]
then
exit 1
else
exit 0
fi