Added get_account_balance.sh template

This commit is contained in:
Ciaby 2015-07-24 17:26:13 +02:00
parent c7b02a3d41
commit f99df6fd2f
2 changed files with 14 additions and 0 deletions

View file

@ -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'),

View 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>' ' '