- mysql 4.1 is available; update documentation
[freeside.git] / FS / FS / part_export / domain_shellcommands.pm
index d2f55e5..5b100e8 100644 (file)
@@ -23,21 +23,20 @@ sub _export_command {
   my $command = $self->option($action);
 
   #set variable for the command
+  no strict 'vars';
   {
     no strict 'refs';
     ${$_} = $svc_domain->getfield($_) foreach $svc_domain->fields;
   }
+  ( $qdomain = $domain ) =~ s/\./:/g; #see dot-qmail(5): EXTENSION ADDRESSES
 
-#  my $domain_record = $svc_www->domain_record; # or die ?
-#  my $zone = $domain_record->reczone; # or die ?
-#  unless ( $zone =~ /\.$/ ) {
-#    my $svc_domain = $domain_record->svc_domain; # or die ?
-#    $zone .= '.'. $svc_domain->domain;
-#  }
-
-#  my $svc_acct = $svc_www->svc_acct; # or die ?
-#  my $username = $svc_acct->username;
-#  my $homedir = $svc_acct->dir; # or die ?
+  if ( $svc_domain->catchall ) {
+    no strict 'refs';
+    my $svc_acct = $svc_domain->catchall_svc_acct;
+    ${$_} = $svc_acct->getfield($_) foreach qw(uid gid dir);
+  } else {
+    ${$_} = '' foreach qw(uid gid dir);
+  }
 
   #done setting variables for the command
 
@@ -53,6 +52,7 @@ sub _export_replace {
   my $command = $self->option('usermod');
   
   #set variable for the command
+  no strict 'vars';
   {
     no strict 'refs';
     ${"old_$_"} = $old->getfield($_) foreach $old->fields;
@@ -100,7 +100,7 @@ sub shellcommands_queue {
 }
 
 sub ssh_cmd { #subroutine, not method
-  use Net::SSH '0.06';
+  use Net::SSH '0.07';
   &Net::SSH::ssh_cmd( { @_ } );
 }