X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fshellcommands_withdomain.pm;h=d5a618733af1cca47346d944dc7ca480c7fe4776;hp=a15c24d88573576630f2272a01cff46a56e07146;hb=74e058c8a010ef6feb539248a550d0bb169c1e94;hpb=0ebeec96313dd7edfca340f01f8fbbbac1f4aa1d diff --git a/FS/FS/part_export/shellcommands_withdomain.pm b/FS/FS/part_export/shellcommands_withdomain.pm index a15c24d88..d5a618733 100644 --- a/FS/FS/part_export/shellcommands_withdomain.pm +++ b/FS/FS/part_export/shellcommands_withdomain.pm @@ -1,7 +1,138 @@ package FS::part_export::shellcommands_withdomain; -use vars qw(@ISA); +use vars qw(@ISA %info); +use Tie::IxHash; use FS::part_export::shellcommands; @ISA = qw(FS::part_export::shellcommands); +tie my %options, 'Tie::IxHash', + 'user' => { label=>'Remote username', default=>'root' }, + 'useradd' => { label=>'Insert command', + #default=>'' + }, + 'useradd_stdin' => { label=>'Insert command STDIN', + type =>'textarea', + #default=>"$_password\n$_password\n", + }, + 'useradd_no_queue' => { label => 'Run immediately', + type => 'checkbox', + }, + 'userdel' => { label=>'Delete command', + #default=>'', + }, + 'userdel_stdin' => { label=>'Delete command STDIN', + type =>'textarea', + #default=>'', + }, + 'userdel_no_queue' => { label => 'Run immediately', + type => 'checkbox', + }, + 'usermod' => { label=>'Modify command', + default=>'', + }, + 'usermod_stdin' => { label=>'Modify command STDIN', + type =>'textarea', + #default=>"$_password\n$_password\n", + }, + 'usermod_no_queue' => { label => 'Run immediately', + type => 'checkbox', + }, + 'usermod_pwonly' => { label=>'Disallow username, domain, uid, dir and RADIUS group changes', + type =>'checkbox', + }, + 'usermod_nousername' => { label=>'Disallow just username changes', + type =>'checkbox', + }, + 'suspend' => { label=>'Suspension command', + default=>'', + }, + 'suspend_stdin' => { label=>'Suspension command STDIN', + default=>'', + }, + 'suspend_no_queue' => { label => 'Run immediately', + type => 'checkbox', + }, + 'unsuspend' => { label=>'Unsuspension command', + default=>'', + }, + 'unsuspend_stdin' => { label=>'Unsuspension command STDIN', + default=>'', + }, + 'unsuspend_no_queue' => { label => 'Run immediately', + type => 'checkbox', + }, + 'crypt' => { label => 'Default password encryption', + type=>'select', options=>[qw(crypt md5)], + default => 'crypt', + }, +; + +%info = ( + 'svc' => 'svc_acct', + 'desc' => 'Real-time export via remote SSH (vpopmail, ISPMan)', + 'options' => \%options, + 'notes' => <<'END' +Run remote commands via SSH. username@domain (rather than just usernames) are +considered unique (also see shellcommands). You probably want this if the +commands you are running will accept a domain as a parameter, and will allow +the same username with different domains. You will need to +setup SSH for unattended operation. + +

Use these buttons for some useful presets: + + +The following variables are available for interpolation (prefixed with +new_ or old_ for replace operations): + +END +); + +1; +