Restart BTS nightly and nicely when thee are borken channels

This commit is contained in:
Wile E. Coyote 2017-06-14 07:37:21 +00:00
parent 51873284d4
commit 22b392bbc7
2 changed files with 19 additions and 0 deletions

View file

@ -0,0 +1,16 @@
#!/bin/bash
RHIZO_SCRIPT="/home/rhizomatica/bin"
. $RHIZO_SCRIPT/vars.sh
. $RHIZO_SCRIPT/rccn-functions
NACK=`echo "show lchan" | nc -q1 localhost 4242 | grep "BROKEN UNUSABLE Error reason: NACK on activation" | wc -l`
if [ $NACK -gt 0 ]; then
waitfor0calls
_bts=0
for bts in $BTS1 $BTS2 $BTS3; do
echo "Dropping BTS connection $_bts due to $NACK broken (NACK) Channels"
echo -e "enable\n drop bts connection $_bts oml" | nc -q1 localhost 4242
done
((_bts+=2))
fi