Added get_account_balance.sh template
This commit is contained in:
parent
c7b02a3d41
commit
f99df6fd2f
2 changed files with 14 additions and 0 deletions
|
@ -160,6 +160,13 @@ class rhizo_base {
|
|||
Exec['restart-rapi'] ],
|
||||
}
|
||||
|
||||
file { '/var/rhizomatica/bin/get_account_balance.sh':
|
||||
ensure => present,
|
||||
content => template('rhizo_base/get_account_balance.sh.erb'),
|
||||
require => Vcsrepo['/var/rhizomatica'],
|
||||
}
|
||||
|
||||
|
||||
file { '/var/rhizomatica/rccn/config_values.py':
|
||||
ensure => present,
|
||||
content => template('rhizo_base/config_values.py.erb'),
|
||||
|
|
7
modules/rhizo_base/templates/get_account_balance.sh.erb
Normal file
7
modules/rhizo_base/templates/get_account_balance.sh.erb
Normal file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
# Write here the script to return the current balance for the voip account
|
||||
|
||||
USERNAME="<%= @voip_username %>"
|
||||
PIN="<%= @voip_password %>"
|
||||
|
||||
#/usr/bin/curl -c /tmp/cookie.txt -L --data "p_sa=$USERNAME&p_pin=$PIN&p_nic=200&p_appname=reseller&p_formlang=english&dest=/account/reseller/english/splash.asp" "https://www.myaccountcenter.net/account/lookup.asp?WCI=login" 2>/dev/null | grep 'Funds Remaining' | awk -F'$' '{print $2}' | tr '</b>' ' '
|
Loading…
Add table
Add a link
Reference in a new issue