X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Facct_plesk.pm;h=50b6faebfedf6e23282e7c2facaa7b78187806c0;hb=2aa7cfda6c3936e1850d845e25ed88cf0a09330f;hp=e295a01c5271b3f551f6cfe94e3bcacf7e9c117e;hpb=55ba66c693dcd0f37123476bb4383491514bf41c;p=freeside.git
diff --git a/FS/FS/part_export/acct_plesk.pm b/FS/FS/part_export/acct_plesk.pm
index e295a01c5..50b6faebf 100644
--- a/FS/FS/part_export/acct_plesk.pm
+++ b/FS/FS/part_export/acct_plesk.pm
@@ -15,15 +15,17 @@ tie my %options, 'Tie::IxHash',
;
%info = (
- 'svc' => 'svc_acct',
- 'desc' => 'Real-time export to Plesk managed mail service',
- 'options'=> \%options,
+ 'svc' => 'svc_acct',
+ 'desc' => 'Real-time export to Plesk managed mail service',
+ 'options' => \%options,
+ 'no_machine' => 1,
+ 'default_svc_class' => 'Email',
'notes' => <<'END'
Real-time export to
Plesk managed server.
Requires installation of
Net::Plesk
-from CPAN.
+from CPAN and proper configuration.
END
);
@@ -46,6 +48,9 @@ sub _export_insert {
sub _plesk_command {
my( $self, $method, $domain, @args ) = @_;
+
+ eval "use Net::Plesk;";
+ return $@ if $@;
local($Net::Plesk::DEBUG) = 1
if $self->option('debug');
@@ -57,7 +62,7 @@ sub _plesk_command {
);
my $dresponse = $plesk->domain_get( $domain );
- return $dresponse->error unless $dresponse->is_success;
+ return $dresponse->errortext unless $dresponse->is_success;
my $domainID = $dresponse->id;
my $response = $plesk->$method($dresponse->id, @args);