[freeside-commits] freeside/bin apache.export,1.12,1.13

Mark Wells mark at wavetail.420.am
Fri May 27 14:46:20 PDT 2011


Update of /home/cvs/cvsroot/freeside/bin
In directory wavetail.420.am:/tmp/cvs-serv12014/bin

Modified Files:
	apache.export 
Log Message:
apache.export suspension, #1822

Index: apache.export
===================================================================
RCS file: /home/cvs/cvsroot/freeside/bin/apache.export,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -w -d -r1.12 -r1.13
--- apache.export	11 Jun 2010 04:44:32 -0000	1.12
+++ apache.export	27 May 2011 21:46:18 -0000	1.13
@@ -39,14 +39,19 @@
 
   open(HTTPD_CONF,">$file") or die "can't open $file: $!";
 
-  my $template = $export->option('template');
-
   my @svc_www = $export->svc_x;
 
   foreach my $svc_www ( @svc_www ) {
     use vars qw($zone $username $dir $email $config);
     $zone = $svc_www->domain_record->zone;
     $config = $svc_www->config;
+    my $template = $export->option('template');
+    my $cust_pkg = $svc_www->cust_svc->cust_pkg;
+    if ( $cust_pkg->getfield('susp') or $cust_pkg->getfield('cancel') ) {
+      $template = $export->option('template_inactive') 
+                  || $export->option('template');
+      # Fall back to the regular template if template_inactive doesn't exist
+    }
     if ( $svc_www->svc_acct ) {
       $username = $svc_www->svc_acct->username;
       $dir = $svc_www->svc_acct->dir;



More information about the freeside-commits mailing list