LiteCel: Add scripts to reset boards, (toggle power)

This commit is contained in:
Keith Whyte 2021-05-29 09:20:43 +02:00
parent 47d64c02f2
commit d7187daadf
3 changed files with 18 additions and 2 deletions

View file

@ -50,7 +50,8 @@ for bts in "${!BTS[@]}" ; do
echo "BTS is a 2050 Master" echo "BTS is a 2050 Master"
scp $SSH_OPTS mgr root@${BTS[$bts]}:/bin/ scp $SSH_OPTS mgr root@${BTS[$bts]}:/bin/
scp $SSH_OPTS pwr root@${BTS[$bts]}:/bin/ scp $SSH_OPTS pwr root@${BTS[$bts]}:/bin/
ssh $SSH_OPTS root@${BTS[$bts]} "chmod 750 /bin/mgr /bin/pwr" scp $SSH_OPTS tgl-s root@${BTS[$bts]}:/bin/tgl
ssh $SSH_OPTS root@${BTS[$bts]} "chmod 750 /bin/mgr /bin/pwr /bin/tgl"
gunzip -c sysmobts-mgr-arm.gz > sysmobts-mgr gunzip -c sysmobts-mgr-arm.gz > sysmobts-mgr
ssh $SSH_OPTS root@${BTS[$bts]} "systemctl stop sysmobts-mgr" ssh $SSH_OPTS root@${BTS[$bts]} "systemctl stop sysmobts-mgr"
scp $SSH_OPTS sysmobts-mgr root@${BTS[$bts]}:/usr/bin/ scp $SSH_OPTS sysmobts-mgr root@${BTS[$bts]}:/usr/bin/
@ -64,7 +65,8 @@ for bts in "${!BTS[@]}" ; do
# Slave Verified. # Slave Verified.
echo "BTS is a 2050 Slave" echo "BTS is a 2050 Slave"
scp $SSH_OPTS pwr root@${BTS[$bts]}:/bin/ scp $SSH_OPTS pwr root@${BTS[$bts]}:/bin/
ssh $SSH_OPTS root@${BTS[$bts]} "chmod 750 /bin/pwr" scp $SSH_OPTS tgl-m root@${BTS[$bts]}:/bin/tgl
ssh $SSH_OPTS root@${BTS[$bts]} "chmod 750 /bin/pwr /bin/tgl"
# Nothing to do. # Nothing to do.
fi fi

View file

@ -0,0 +1,7 @@
#!/bin/sh
# Toggle the power on the Master (reset)
sbts2050-util sbts2050-pwr-enable 0 1 1
sleep 1
sbts2050-util sbts2050-pwr-enable 1 1 1

View file

@ -0,0 +1,7 @@
#!/bin/sh
# Toggle the power on the Slave (reset)
sbts2050-util sbts2050-pwr-enable 1 0 1
sleep 1
sbts2050-util sbts2050-pwr-enable 1 1 1