From 72568990a034273519c6c1cc6c9a60ce57d25816 Mon Sep 17 00:00:00 2001 From: Keith Whyte Date: Wed, 29 Apr 2020 04:02:03 +0200 Subject: [PATCH] shortcut functions for ssh to bts --- modules/rhizo_base/templates/rccn-functions.sh.erb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/rhizo_base/templates/rccn-functions.sh.erb b/modules/rhizo_base/templates/rccn-functions.sh.erb index 255ecf8..73df8f1 100644 --- a/modules/rhizo_base/templates/rccn-functions.sh.erb +++ b/modules/rhizo_base/templates/rccn-functions.sh.erb @@ -80,3 +80,9 @@ rk_imsi() { check_trx() { echo "show trx" | nc -q1 localhost 4242 | awk 'BEGIN { RS="TRX"; } /OK/ { print "BTS"$4" TRX"$1": OK"; }' } + +<% @bts.each_with_index do |bts, index| -%> +lc<%= index %>() { + ssh root@<%= bts["ip"] %> +} +<% end -%>