X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fwww_plesk.pm;h=ccf9b3e17e8046e1b301bcc532bffc718bc148b2;hp=627f072ec27b185daa0f2de7a2092f0a33a5808f;hb=ea3ce8d7f076e7fecff4be7ae63bc413adb0adf5;hpb=c8cccb4a92adceb943c635fe62dad0d034462ce0 diff --git a/FS/FS/part_export/www_plesk.pm b/FS/FS/part_export/www_plesk.pm index 627f072ec..ccf9b3e17 100644 --- a/FS/FS/part_export/www_plesk.pm +++ b/FS/FS/part_export/www_plesk.pm @@ -10,6 +10,9 @@ 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' }, ; @@ -23,7 +26,7 @@ Real-time export to Plesk managed server. Requires installation of Net::Plesk -from CPAN. +from CPAN and proper configuration. END ); @@ -71,11 +74,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 {