package FS::part_export::shellcommands_withdomain;
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 sha512)],
default => 'sha512',
},
'fail_on_output' => {
label => 'Treat any output from the command as an error',
type => 'checkbox',
},
'ignore_all_errors' => {
label => 'Ignore all errors from the command',
type => 'checkbox',
},
'ignored_errors' => { label => 'Regexes of specific errors to ignore, separated by newlines',
type => 'textarea'
},
;
%info = (
'svc' => 'svc_acct',
'desc' => 'Real-time export via remote SSH (vpopmail, ISPMan, MagicMail)',
'options' => \%options,
'svc_machine' => 1,
'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:
new_
or old_
for replace operations):
$username
$domain
$_password
$quoted_password
- unencrypted password, already quoted for the shell (do not add additional quotes)
$crypt_password
- encrypted password, already quoted for the shell (do not add additional quotes)
$uid
$gid
$finger
- GECOS, already quoted for the shell (do not add additional quotes)
$first
- First name of GECOS, already quoted for the shell (do not add additional quotes)
$last
- Last name of GECOS, already quoted for the shell (do not add additional quotes)
$dir
- home directory
$shell
$quota
@radius_groups
$reasonnum (when suspending)
$reasontext (when suspending)
$reasontypenum (when suspending)
$reasontypetext (when suspending)
$pkgnum
$custnum