diff --git a/modules/rhizo_base/files/var/SysmoBTS/scp-all.sh b/modules/rhizo_base/files/var/SysmoBTS/scp-all.sh new file mode 100644 index 0000000..33231f8 --- /dev/null +++ b/modules/rhizo_base/files/var/SysmoBTS/scp-all.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# This script will copy a file into /tmp on all the BTS +# No overwrite checking will take place. + +if [ "$PWD" != "/var/SysmoBTS" ]; then + OLDPWD=$PWD + cd /var/SysmoBTS +fi +SSH_OPTS="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/tmp/known-$RANDOM" +. /home/rhizomatica/bin/vars.sh + +for bts in "${!BTS[@]}" ; do + + scp $SSH_OPTS $1 root@${BTS[$bts]}:/tmp + +done + +if [ "$OLDPWD" != "" ]; then + cd $OLDPWD +fi diff --git a/modules/rhizo_base/files/var/SysmoBTS/ssh-all.sh b/modules/rhizo_base/files/var/SysmoBTS/ssh-all.sh new file mode 100644 index 0000000..44d5edf --- /dev/null +++ b/modules/rhizo_base/files/var/SysmoBTS/ssh-all.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# This script will exec cmd on all the BTS + +if [ "$PWD" != "/var/SysmoBTS" ]; then + OLDPWD=$PWD + cd /var/SysmoBTS +fi +SSH_OPTS="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/tmp/known-$RANDOM" +. /home/rhizomatica/bin/vars.sh + +for bts in "${!BTS[@]}" ; do + + ssh -t $SSH_OPTS root@${BTS[$bts]} $* + +done + +if [ "$OLDPWD" != "" ]; then + cd $OLDPWD +fi