X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=bin%2Fapache.export;h=82eb6d6b023cb4146cea71a79de1720d2a00c655;hb=7bc780834a604a2e678d028f875fd4b546412cfb;hp=d1ee9e78c2cf3d63be957dcd738310f8b6f9c5c1;hpb=9071929765c4b63a600c95bb2c2a2c7851a41377;p=freeside.git diff --git a/bin/apache.export b/bin/apache.export index d1ee9e78c..82eb6d6b0 100755 --- a/bin/apache.export +++ b/bin/apache.export @@ -30,8 +30,9 @@ my $rsync = File::Rsync->new({ foreach my $export ( @exports ) { - my $machine = $export->machine; - my $file = "$spooldir/$machine.conf"; + my $machine = $export->machine; + my $exportnum = $export->exportnum; + my $file = "$spooldir/$machine.exportnum$exportnum.conf"; warn "exporting apache configuration for $machine to $file\n" if $opt{d}; @@ -45,10 +46,16 @@ foreach my $export ( @exports ) { foreach my $svc_www ( @svc_www ) { use vars qw($zone $username $dir $email $config); $zone = $svc_www->domain_record->zone; - $username = $svc_www->svc_acct->username; - $dir = $svc_www->svc_acct->dir; - $email = $svc_www->svc_acct->email; $config = $svc_www->config; + if ( $svc_www->svc_acct ) { + $username = $svc_www->svc_acct->username; + $dir = $svc_www->svc_acct->dir; + $email = $svc_www->svc_acct->email; + } else { + $username = ''; + $dir = ''; + $email = ''; + } warn " adding configuration section for $zone\n" if $opt{d};