point to wiki docs
[freeside.git] / FS / FS / part_export / domain_shellcommands.pm
index 0ba5617..582e292 100644 (file)
@@ -26,7 +26,7 @@ tie my %options, 'Tie::IxHash',
   'options' => \%options,
   'notes'   => <<'END'
 Run remote commands via SSH, for domains.  You will need to
-<a href="../docs/ssh.html">setup SSH for unattended operation</a>.
+<a href="http://www.freeside.biz/mediawiki/index.php/Freeside:1.9:Documentation:Administration:SSH_Keys">setup SSH for unattended operation</a>.
 <BR><BR>Use these buttons for some useful presets:
 <UL>
   <LI>
@@ -70,6 +70,7 @@ sub _export_delete {
 sub _export_command {
   my ( $self, $action, $svc_domain) = (shift, shift, shift);
   my $command = $self->option($action);
+  return '' if $command =~ /^\s*$/;
 
   #set variable for the command
   no strict 'vars';
@@ -111,19 +112,22 @@ sub _export_replace {
   ( $old_qdomain = $old_domain ) =~ s/\./:/g; #see dot-qmail(5): EXTENSION ADDRESSES
   ( $new_qdomain = $new_domain ) =~ s/\./:/g; #see dot-qmail(5): EXTENSION ADDRESSES
 
-  if ( $old->catchall ) {
+  { 
     no strict 'refs';
-    my $svc_acct = $old->catchall_svc_acct;
-    ${"old_$_"} = $svc_acct->getfield($_) foreach qw(uid gid dir);
-  } else {
-    ${"old_$_"} = '' foreach qw(uid gid dir);
-  }
-  if ( $new->catchall ) {
-    no strict 'refs';
-    my $svc_acct = $new->catchall_svc_acct;
-    ${"new_$_"} = $svc_acct->getfield($_) foreach qw(uid gid dir);
-  } else {
-    ${"new_$_"} = '' foreach qw(uid gid dir);
+
+    if ( $old->catchall ) {
+      my $svc_acct = $old->catchall_svc_acct;
+      ${"old_$_"} = $svc_acct->getfield($_) foreach qw(uid gid dir);
+    } else {
+      ${"old_$_"} = '' foreach qw(uid gid dir);
+    }
+    if ( $new->catchall ) {
+      my $svc_acct = $new->catchall_svc_acct;
+      ${"new_$_"} = $svc_acct->getfield($_) foreach qw(uid gid dir);
+    } else {
+      ${"new_$_"} = '' foreach qw(uid gid dir);
+    }
+
   }
 
   #done setting variables for the command