- mysql 4.1 is available; update documentation
[freeside.git] / FS / FS / part_export.pm
index 4471d6e..f99dc63 100644 (file)
@@ -815,6 +815,18 @@ tie my %ldap_options, 'Tie::IxHash',
   'radius'     => { label=>'Export RADIUS attributes', type=>'checkbox', },
 ;
 
+tie my %forward_shellcommands_options, 'Tie::IxHash',
+  'user' => { lable=>'Remote username', default=>'root' },
+  'useradd' => { label=>'Insert command',
+                 default=>'',
+               },
+  'userdel'  => { label=>'Delete command',
+                  default=>'',
+                },
+  'usermod'  => { label=>'Modify command',
+                  default=>'',
+                },
+;
 
 #export names cannot have dashes...
 %exports = (
@@ -935,7 +947,7 @@ tie my %ldap_options, 'Tie::IxHash',
     'domain_shellcommands' => {
       'desc' => 'Run remote commands via SSH, for domains.',
       'options' => \%domain_shellcommands_options,
-      'notes'    => 'Run remote commands via SSH, for domains.  You will need to <a href="../docs/ssh.html">setup SSH for unattended operation</a>.',
+      'notes'    => 'Run remote commands via SSH, for domains.  You will need to <a href="../docs/ssh.html">setup SSH for unattended operation</a>.<BR><BR>Use these buttons for some useful presets:<UL><LI><INPUT TYPE="button" VALUE="qmail catchall .qmail-domain-default maintenance" onClick=\'this.form.useradd.value = "[ \"$uid\" -a \"$gid\" -a \"$dir\" -a \"$qdomain\" ] && [ -e $dir/.qmail-$qdomain-default ] || { touch $dir/.qmail-$qdomain-default; chown $uid:$gid $dir/.qmail-$qdomain-default; }"; this.form.userdel.value = ""; this.form.usermod.value = "";\'></UL>',
     },
 
 
@@ -948,6 +960,12 @@ tie my %ldap_options, 'Tie::IxHash',
       #'nodomain' => 'Y',
       'notes' => 'Database schema can be made to work with Courier IMAP and Exim.  Others could work but are untested. (...extended description from pc-intouch?...)',
     },
+
+    'forward_shellcommands' => {
+      'desc' => 'Run remote commands via SSH, for forwards',
+      'options' => \%forward_shellcommands_options,
+      'notes' => 'Run remote commands via SSH, for forwards.  You will need to <a href="../docs/ssh.html">setup SSH for unattended operation</a>.<BR><BR>Use these buttons for some useful presets:<UL><LI><INPUT TYPE="button" VALUE="text vpopmail maintenance" onClick=\'this.form.useradd.value = "[ -d /home/vpopmail/domains/$domain/$username ] && { echo \"$destination\" > /home/vpopmail/domains/$domain/$username/.qmail; chown vpopmail:vchkpw /home/vpopmail/domains/$domain/$username/.qmail; }"; this.form.userdel.value = "rm /home/vpopmail/domains/$domain/$username/.qmail"; this.form.usermod.value = "mv /home/vpopmail/domains/$old_domain/$old_username/.qmail /home/vpopmail/domains/$new_domain/$new_username; [ \"$old_destination\" != \"$new_destination\" ] && { echo \"$new_destination\" > /home/vpopmail/domains/$new_domain/$new_username/.qmail; chown vpopmail:vchkpw /home/vpopmail/domains/$new_domain/$new_username/.qmail; }";\'></UL>',
+    },
   },
 
   'svc_www' => {