Restart BTS nightly and nicely when thee are borken channels
This commit is contained in:
parent
51873284d4
commit
22b392bbc7
2 changed files with 19 additions and 0 deletions
16
modules/rhizo_base/files/bin/check_broken.sh
Executable file
16
modules/rhizo_base/files/bin/check_broken.sh
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue