#!/bin/bash
if [ -f /var/lib/asterisk/brb/pressed ]; then
/usr/local/bin/allstar-restart
/usr/bin/ssmtp -t <<EOM
From: Asterisk <root@megalink.network>
To: zabbix@megalink.network
Subject: Big Red Button Pushed - $(hostname)
This is the allstar-brb program on $(hostname)
Asterisk was cycled at:
$(date)
due to someone pushing the big red button!
Be will, John Spartan
EOM
fi