46 lines
990 B
Text
46 lines
990 B
Text
#!/bin/sh
|
|
RHIZO_SCRIPT="/home/rhizomatica/bin"
|
|
|
|
function logc() {
|
|
txt=$1
|
|
echo "[`date '+%d-%m-%Y %H:%M:%S'`] $txt" >> $LOGFILE
|
|
}
|
|
|
|
SITE="<%= @site_name %>"
|
|
|
|
<% @dids.each_with_index do |did, index| -%>
|
|
DID[<%= index %>]=<%= did %>
|
|
<% end -%>
|
|
|
|
#BTSs IP addresses (for amps etc)
|
|
declare -a BTS
|
|
declare -a LAC
|
|
declare -a BTS_MASTER
|
|
|
|
<% @bts.each_with_index do |bts, index| -%>
|
|
BTS[<%= index %>]=<%= bts["ip"] %>
|
|
LAC[<%= index %>]=<%= bts["lac"] %>
|
|
MODEL[<%= index %>]=<%= bts["model"] %>
|
|
<% if bts ["model"] == '2050M' -%>
|
|
BTS_MASTER[<%= index %>]=<%= bts["ip"] %>
|
|
<% end -%>
|
|
<% end -%>
|
|
|
|
BTSPASS=<%= @bts_pass %>
|
|
OPKG_CREDS=<%= @opkg_creds %>
|
|
|
|
LATENCY_HOST=<%= @latency_check_address %>
|
|
LATENCY_TINC=<%= @latency_check_vpn %>
|
|
STAT_DISK=<%= @stats_disk %>
|
|
STAT_IF=<%= @stats_if %>
|
|
_PUB_IF=<%= @stats_if %>
|
|
|
|
RECIPIENTS="<%= @mail_admins -%>"
|
|
|
|
function bname {
|
|
case $1 in
|
|
<% @bts.each_with_index do |bts, index| -%>
|
|
<%= index %>) echo -n "<%= bts["name"] %>" ;;
|
|
<% end -%>
|
|
esac
|
|
}
|