From f0caa13e62ddd3808ed4a504876eaa27c2524308 Mon Sep 17 00:00:00 2001 From: Keith Whyte Date: Wed, 15 Sep 2021 22:20:37 +0200 Subject: [PATCH] Add shell function to set sms-queue max-pending --- modules/rhizo_base/templates/rccn-functions.sh.erb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/rhizo_base/templates/rccn-functions.sh.erb b/modules/rhizo_base/templates/rccn-functions.sh.erb index 85633c8..ba6c68c 100644 --- a/modules/rhizo_base/templates/rccn-functions.sh.erb +++ b/modules/rhizo_base/templates/rccn-functions.sh.erb @@ -183,3 +183,13 @@ red () send "network\r"; expect "#"; send "bts $bts\r"; expect "#"; send "trx 0\r"; expect "#"; send "max_power_red $red\r"; expect "#"; send "exit\r"; expect "#"; send "exit\r"; expect "#"; send "exit\r"; expect "#"; send "exit\r"; expect "#"' } + +smsq-max() +{ + if [ "$1" == "" ]; then + echo "Set max-pending to what?"; + return; + fi; + expect -c 'set queue '$1'; set port <% if @osmo_stack != "split" -%>4242<% else -%>4254<% end -%>; spawn telnet localhost $port; expect ">"; send "enable\r"; expect "#"; send "sms-queue max-pending $queue\r"; expect "#"; + send "sms-queue trigger\r"; expect "#";' +}