Build BTS defs in vars.sh from array

and, Number the BTS from 0 in environment
This commit is contained in:
Keith Whyte 2020-04-29 00:30:41 +02:00
parent e2e8c76b70
commit 0e360b2194
6 changed files with 10 additions and 19 deletions

View file

@ -2,7 +2,7 @@
# Check for AMP status on each BTS, from BTS1 up to BTS3
RHIZO_SCRIPT="/home/rhizomatica/bin"
. $RHIZO_SCRIPT/vars.sh
for bts in $BTS1 $BTS2 $BTS3; do
for bts in $BTS0 $BTS1 $BTS2; do
echo "BTS $bts:";
ssh root@$bts sbts2050-util sbts2050-pwr-status | grep Amp;
done

View file

@ -8,7 +8,7 @@ NACK=`echo "show lchan" | nc -q1 localhost 4242 | grep "BROKEN UNUSABLE Error re
if [ $NACK -gt 0 ]; then
waitfor0calls
_bts=0
for bts in $BTS1 $BTS2 $BTS3; do
for bts in $BTS0 $BTS1 $BTS2; 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

View file

@ -3,7 +3,7 @@
RHIZO_SCRIPT="/home/rhizomatica/bin"
. $RHIZO_SCRIPT/vars.sh
n=0
for bts in $BTS1 $BTS2 $BTS3; do
for bts in $BTS0 $BTS1 $BTS2; do
echo "BTS $bts:";
let "n++"
#ssh root@$bts "/etc/init.d/gpsd stop ; sleep 1 ;/etc/init.d/gpsd start; sleep 1"

View file

@ -4,7 +4,7 @@ RHIZO_SCRIPT="/home/rhizomatica/bin"
. $RHIZO_SCRIPT/vars.sh
LOGFILE="/var/log/monitor_amp.log"
for bts in $BTS1 $BTS2 $BTS3; do
for bts in $BTS0 $BTS1 $BTS2; do
logc "Turning off AMP on BTS $bts:";
ssh root@$bts "sbts2050-util sbts2050-pwr-enable 1 1 0";
done

View file

@ -4,7 +4,7 @@ RHIZO_SCRIPT="/home/rhizomatica/bin"
. $RHIZO_SCRIPT/vars.sh
LOGFILE="/var/log/monitor_amp.log"
for bts in $BTS1 $BTS2 $BTS3; do
for bts in $BTS0 $BTS1 $BTS2; do
logc "Turning on AMP on BTS $bts:";
ssh root@$bts "sbts2050-util sbts2050-pwr-enable 1 1 1";
done