X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fwww_plesk.pm;h=a247f054eba67efbe91c232de3318edb365a5d6c;hb=9d818957e724dc5ea2673163855fd84c274cd460;hp=627f072ec27b185daa0f2de7a2092f0a33a5808f;hpb=c8cccb4a92adceb943c635fe62dad0d034462ce0;p=freeside.git
diff --git a/FS/FS/part_export/www_plesk.pm b/FS/FS/part_export/www_plesk.pm
index 627f072ec..a247f054e 100644
--- a/FS/FS/part_export/www_plesk.pm
+++ b/FS/FS/part_export/www_plesk.pm
@@ -10,20 +10,24 @@ tie my %options, 'Tie::IxHash',
'URL' => { label=>'URL' },
'login' => { label=>'Login' },
'password' => { label=>'Password' },
+ 'template' => { label=>'Domain Template' },
+ 'web' => { label=>'Host Website',
+ type=>'checkbox' },
'debug' => { label=>'Enable debugging',
type=>'checkbox' },
;
%info = (
- 'svc' => 'svc_www',
- 'desc' => 'Real-time export to Plesk managed hosting service',
- 'options'=> \%options,
- 'notes' => <<'END'
+ 'svc' => 'svc_www',
+ 'desc' => 'Real-time export to Plesk managed hosting service',
+ 'options' => \%options,
+ 'no_machine' => 1,
+ 'notes' => <<'END'
Real-time export to
Plesk managed server.
Requires installation of
Net::Plesk
-from CPAN.
+from CPAN and proper configuration.
END
);
@@ -71,11 +75,23 @@ sub _export_insert {
$www->domain_record->recdata,
);
- $self->_plesk_command( 'domain_add',
- $www->domain_record->svc_domain->domain,
- $gcresp->id,
- $www->domain_record->recdata,
- );
+ if ($self->option('web')) {
+ $self->_plesk_command( 'domain_add',
+ $www->domain_record->svc_domain->domain,
+ $gcresp->id,
+ $www->domain_record->recdata,
+ $self->option('template')?$self->option('template'):'',
+ $www->svc_acct->username,
+ $www->svc_acct->_password,
+ );
+ }else{
+ $self->_plesk_command( 'domain_add',
+ $www->domain_record->svc_domain->domain,
+ $gcresp->id,
+ $www->domain_record->recdata,
+ $self->option('template')?$self->option('template'):'',
+ );
+ }
}
sub _plesk_command {