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

View file

@ -60,6 +60,9 @@ PYTHONPATH=$PYTHONPATH:/var/rhizomatica/rccn
#Restart osmo-nitb every 6 hours (This wasn't working anyway. If it is needed, do something more elegant!)
# 0 */6 * * * root /usr/bin/sv restart osmo-nitb 2>&1 > /dev/null
# It's a new day....
30 5 * * * root /home/rhizomatica/bin/check_broken.sh
# Check if FS or NTIB needs restart
30 3 * * * root /home/rhizomatica/bin/check_dirty.sh