X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export.pm;h=64d21d72304af077e3f7e9fbeab98408ff5ddd58;hb=6414c4c23d3fac2012d1524f17c0aae5e5012935;hp=072074b96e7102fb4b2f4da4c08bc53e00ae1fbe;hpb=7308f9eeb141bab0f550cce772a42f18a5cc7319;p=freeside.git
diff --git a/FS/FS/part_export.pm b/FS/FS/part_export.pm
index 072074b96..64d21d723 100644
--- a/FS/FS/part_export.pm
+++ b/FS/FS/part_export.pm
@@ -526,15 +526,15 @@ tie my %shellcommands_options, 'Tie::IxHash',
#'machine' => { label=>'Remote machine' },
'user' => { label=>'Remote username', default=>'root' },
'useradd' => { label=>'Insert command',
- default=>'useradd -d $dir -m -s $shell -u $uid $username; passwd $username'
+ default=>'useradd -d $dir -m -s $shell -u $uid -p $crypt_password $username'
#default=>'cp -pr /etc/skel $dir; chown -R $uid.$gid $dir'
},
'useradd_stdin' => { label=>'Insert command STDIN',
type =>'textarea',
- default=>"\$_password\n\$_password\n",
+ default=>'',
},
'userdel' => { label=>'Delete command',
- default=>'userdel $username',
+ default=>'userdel -r $username',
#default=>'rm -rf $dir',
},
'userdel_stdin' => { label=>'Delete command STDIN',
@@ -542,7 +542,7 @@ tie my %shellcommands_options, 'Tie::IxHash',
default=>'',
},
'usermod' => { label=>'Modify command',
- default=>'usermod -d $new_dir -l $new_username -s $new_shell -u $new_uid $old_username; passwd $new_username',
+ default=>'usermod -d $new_dir -m -l $new_username -s $new_shell -u $new_uid -p $new_crypt_password $old_username',
#default=>'[ -d $old_dir ] && mv $old_dir $new_dir || ( '.
# 'chmod u+t $old_dir; mkdir $new_dir; cd $old_dir; '.
# 'find . -depth -print | cpio -pdm $new_dir; '.
@@ -552,7 +552,7 @@ tie my %shellcommands_options, 'Tie::IxHash',
},
'usermod_stdin' => { label=>'Modify command STDIN',
type =>'textarea',
- default=>"\$_password\n\$_password\n",
+ default=>'',
},
;
@@ -581,6 +581,19 @@ tie my %shellcommands_withdomain_options, 'Tie::IxHash',
},
;
+tie my %www_shellcommands_options, 'Tie::IxHash',
+ 'user' => { lable=>'Remote username', default=>'root' },
+ 'useradd' => { label=>'Insert command',
+ default=>'mkdir /var/www/$zone; chown $username /var/www/$zone; ln -s /var/www/$zone $homedir/$zone',
+ },
+ 'userdel' => { label=>'Delete command',
+ default=>'[ -n "$zone" ] && rm -rf /var/www/$zone; rm $homedir/$zone',
+ },
+ 'usermod' => { label=>'Modify command',
+ default=>'[ -n "$old_zone" ] && rm $old_homedir/$old_zone; [ "$old_zone" != "$new_zone" -a -n "$new_zone" ] && mv /var/www/$old_zone /var/www/$new_zone; [ "$old_username" != "$new_username" ] && chown -R $new_username /var/www/$new_zone; ln -s /var/www/$new_zone $new_homedir/$new_zone',
+ },
+;
+
tie my %textradius_options, 'Tie::IxHash',
'user' => { label=>'Remote username', default=>'root' },
'users' => { label=>'users file location', default=>'/etc/raddb/users' },
@@ -636,6 +649,37 @@ tie my %bind_slave_options, 'Tie::IxHash',
default => '/etc/bind/named.conf' },
;
+tie my %http_options, 'Tie::IxHash',
+ 'method' => { label =>'Method',
+ type =>'select',
+ #options =>[qw(POST GET)],
+ options =>[qw(POST)],
+ default =>'POST' },
+ 'url' => { label => 'URL', default => 'http://', },
+ 'insert_data' => {
+ label => 'Insert data',
+ type => 'textarea',
+ default => join("\n",
+ 'DomainName $svc_x->domain',
+ 'Email ( grep { $_ ne "POST" } $svc_x->cust_svc->cust_pkg->cust_main->invoicing_list)[0]',
+ 'test 1',
+ 'reseller $svc_x->cust_svc->cust_pkg->part_pkg->pkg =~ /reseller/i',
+ ),
+ },
+ 'delete_data' => {
+ label => 'Delete data',
+ type => 'textarea',
+ default => join("\n",
+ ),
+ },
+ 'replace_data' => {
+ label => 'Replace data',
+ type => 'textarea',
+ default => join("\n",
+ ),
+ },
+;
+
tie my %sqlmail_options, 'Tie::IxHash',
'datasrc' => { label=>'DBI data source' },
'username' => { label=>'Database username' },
@@ -675,7 +719,7 @@ tie my %sqlmail_options, 'Tie::IxHash',
'desc' => 'Real-time export via remote SSH (i.e. useradd, userdel, etc.)',
'options' => \%shellcommands_options,
'nodomain' => 'Y',
- 'notes' => 'Run remote commands via SSH. Usernames are considered unique (also see shellcommands_withdomain). You probably want this if the commands you are running will not accept a domain as a parameter. You will need to setup SSH for unattended operation.
Use these buttons for some useful presets: