Remove Support for osmo-nitb

This commit is contained in:
Keith Whyte 2022-12-06 23:06:29 +01:00
parent fe03832b59
commit 1cd5263e40
14 changed files with 11 additions and 968 deletions

View file

@ -2,7 +2,7 @@
# Shell Functions for Rhizomatica Community Celular Network
#
OSMO_STACK="<%= @osmo_stack %>"
OSMO_STACK="split"
OSMO_HLR_OLD="/var/lib/osmocom/hlr.sqlite3"
OSMO_HLR="<%= @hlr_db %>"
OSMO_SMS="<%= @sms_db %>"
@ -45,11 +45,7 @@ topcalls () {
sleep $1
done
}
<% if @osmo_stack != "split" %>
nitb() {
/usr/bin/expect -c 'spawn telnet localhost 4242;send "enable\r";send "logging enable\r";send "logging level all everything\r";send "logging print category 1\r";send "logging level smpp fatal\r"; send "logging filter all 1\r"; interact'
}
<% end %>
hlr() {
sudo /usr/bin/sqlite3 -column -header $OSMO_HLR
}
@ -288,19 +284,8 @@ smsq-max()
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 "#";
expect -c 'set queue '$1'; set port 4254; spawn telnet localhost $port; expect ">"; send "enable\r"; expect "#"; send "sms-queue max-pending $queue\r"; expect "#";
send "sms-queue trigger\r"; expect "#";'
}
<% if @osmo_stack != "split" %>
close-net () {
expect -c 'spawn -noecho telnet 0 4242; expect >; send enable\r; expect #; send "configure terminal\r"; expect #; send network\r; expect #; send "auth policy closed\r"; expect #; send \r' ; echo -e " \r Closed Network"
}
open-net () {
expect -c 'spawn -noecho telnet 0 4242; expect >; send enable\r; expect #; send "configure terminal\r"; expect #; send network\r; expect #; send "auth policy accept-all \r";expect #; send \r' ; echo -e " \r Opened Network"
}
p-net (){
echo "show network" | nc -q1 localhost 4242 | grep "policy" | awk -F "," '{print $1 }'
}
<% end %>