Add pwr watch script to BTS

Tired of typing sbts2050-util......
This commit is contained in:
Keith Whyte 2021-05-28 22:14:19 +02:00
parent e26b71b912
commit b3c7a99f77

View file

@ -15,7 +15,7 @@ SSH_OPTS="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/tmp/known-$RANDOM"
for bts in "${!BTS[@]}" ; do
scp $SSH_OPTS authorized_keys root@${BTS[$bts]}:/home/root/.ssh/
#scp $SSH_OPTS authorized_keys root@${BTS[$bts]}:/home/root/.ssh/
if [ "$?" != "0" ] ; then
echo "No ssh access to BTS?"
continue
@ -49,7 +49,8 @@ for bts in "${!BTS[@]}" ; do
# Master Verified.
echo "BTS is a 2050 Master"
scp $SSH_OPTS mgr root@${BTS[$bts]}:/bin/
ssh $SSH_OPTS root@${BTS[$bts]} "chmod 750 /bin/mgr"
scp $SSH_OPTS pwr root@${BTS[$bts]}:/bin/
ssh $SSH_OPTS root@${BTS[$bts]} "chmod 750 /bin/mgr /bin/pwr"
gunzip -c sysmobts-mgr-arm.gz > sysmobts-mgr
ssh $SSH_OPTS root@${BTS[$bts]} "systemctl stop sysmobts-mgr"
scp $SSH_OPTS sysmobts-mgr root@${BTS[$bts]}:/usr/bin/
@ -62,6 +63,8 @@ for bts in "${!BTS[@]}" ; do
if [ "$_trxNR" == "1" ] ; then
# Slave Verified.
echo "BTS is a 2050 Slave"
scp $SSH_OPTS pwr root@${BTS[$bts]}:/bin/
ssh $SSH_OPTS root@${BTS[$bts]} "chmod 750 /bin/pwr"
# Nothing to do.
fi