Logc monitor_freesswitch output
This commit is contained in:
parent
63475eebe9
commit
18fcac5e99
1 changed files with 7 additions and 2 deletions
|
@ -2,14 +2,19 @@
|
|||
#Check status of FreeSWITCH SIP interfaces
|
||||
#Doesn't restart FreeSWITCH if WAN or VPN interfaces are down
|
||||
|
||||
RHIZO_SCRIPT="/home/rhizomatica/bin"
|
||||
. $RHIZO_SCRIPT/vars.sh
|
||||
|
||||
LOGFILE="/var/log/monitor_fs.log"
|
||||
|
||||
FS_STATUS=`fs_cli -x "sofia status"`
|
||||
|
||||
if !(echo $FS_STATUS | grep -q "external::provider") && (ping -qc 5 8.8.8.8 > /dev/null); then
|
||||
echo "Missing external provider! Restarting FreeSWITCH";
|
||||
logc "Missing external provider! Restarting FreeSWITCH";
|
||||
sv restart freeswitch;
|
||||
fi
|
||||
|
||||
if !(echo $FS_STATUS | grep -q "internalvpn") && (ping -qc 5 10.23.0.2); then
|
||||
echo "Missing internal VPN! Restarting FreeSWITCH";
|
||||
logc "Missing internal VPN! Restarting FreeSWITCH";
|
||||
sv restart freeswitch;
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue