Thanks. This is what I have been working on. It runs and seems to work without any traffic on my server. Basically, it counts your masternodes every 2 minutes. If the count of enabled masternodes with your IPs is how many you set, it prints ok. If one is missing or it doesn't get a response it prints not ok, sends you an email, and quits. There is a lot more elegant way to do this(maybe replace true with the if[...], but I know this works.
#install with: sudo apt-get install screen ssmtp
#Set mail server settings: sudo nano /etc/ssmtp/ssmtp.conf
#edit following lines with your email login and server settings.
#mailhub=server.com:587
#hostname=DASH.net
#AuthUser=
[email protected]
#AuthPass=password
#UserSTARTTLS=YES
#change the $count -eq 2 to $count -eq (number of masternodes)
#m.txt is a file that says masternode down
#this file is saved as mnemail.sh
#run with: screen -dm ./mnemail.sh
#
while true; do
count=$(/home/dash/dash-cli masternodelist full | grep -E '22.11.22.22|11.11.111.22' | grep -c ENABLED)
if [ $count -eq 2 ]
then
echo "ok"
sleep 120
else
echo "not ok"
ssmtp
[email protected] < /home/dash/m.txt
exit
fi
done