[freeside-commits] branch master updated. 5cb528685e2222dfd1740a5c3b5134d00ab254ae

Christopher Burger burgerc at freeside.biz
Fri May 3 10:07:23 PDT 2019


The branch, master has been updated
       via  5cb528685e2222dfd1740a5c3b5134d00ab254ae (commit)
      from  af2e0f2bcb710bbd288523071d2dd630e6cf401f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5cb528685e2222dfd1740a5c3b5134d00ab254ae
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Fri May 3 13:06:58 2019 -0400

    RT# 83251 - added documentation

diff --git a/bin/svc_broadband_update_speeds b/bin/svc_broadband_update_speeds
index 373ee2f4e..2dfb0c88e 100755
--- a/bin/svc_broadband_update_speeds
+++ b/bin/svc_broadband_update_speeds
@@ -34,16 +34,16 @@ unless ($opt_d && $opt_s) { die &usage(); }
 if ($opt_h) { die &usage(); }
 unless ($opt_p || $opt_c || $opt_r) { die &usage(); }
 
-my $extra_sql;
-$extra_sql = " WHERE cust_svc.svcpart = $opt_s" if $opt_s;
-
 ### get list of all provisioned services
+my $extra_sql = " WHERE cust_svc.svcpart = $opt_s";
 my @services = qsearch({
     'select'    => 'svc_broadband.*, cust_svc.svcpart, cust_svc.pkgnum, cust_pkg.pkgpart',
     'table'     => 'svc_broadband',
     'addl_from' => 'LEFT JOIN cust_svc USING ( svcnum ) LEFT JOIN cust_pkg USING (pkgnum)',
     'extra_sql' => $extra_sql,
 });
+
+### get list of all unprovisioned services
 my $ups_extra_sql = "where cust_pkg.cancel is null and pkg_svc.quantity > 0 and  pkg_svc.quantity > (select count(1) from cust_svc where  cust_svc.pkgnum = cust_pkg.pkgnum and  cust_svc.svcpart = pkg_svc.svcpart)  and pkg_svc.svcpart = $opt_s";
 my @unprovisioned_services = qsearchs({
     'table'     => 'cust_pkg',
@@ -117,3 +117,20 @@ sub _update_service {
 }
 
 exit;
+
+=head2 svc_broadband_update_speeds
+
+This script allows for the mas update of up and down speeds for a svc_broadband service.
+
+the script will obtain the new speed from option p (package fcc rates) first if set, 
+if no rates found then checks for option c (rate of sibling service) if set, 
+if still no rates found checks for rate in option r if set.  
+If no rates found service will be placed in exception file. 
+
+Script must be run as user freeside.
+Options -s, -d and freeside user are required.
+
+example:
+sudo -u freeside ./svc_broadband_update_speeds -v -s 4 -c 2 -r 148000,248000 -p -d /home/freeside/ freesideuser
+
+=cut
\ No newline at end of file

-----------------------------------------------------------------------

Summary of changes:
 bin/svc_broadband_update_speeds | 23 ++++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)




More information about the freeside-commits mailing list