X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fshellcommands.pm;h=418ff14ac15d247d7de440add0b0681526a6d42a;hp=ca04e3869c1a2715f52e54ed456d07792e18b9fa;hb=09df4e8790fe3ed8e233d2c198ea524465c0096e;hpb=30ceabb9d40844452fae8e7c5535fd6a6738b0cd diff --git a/FS/FS/part_export/shellcommands.pm b/FS/FS/part_export/shellcommands.pm index ca04e3869..418ff14ac 100644 --- a/FS/FS/part_export/shellcommands.pm +++ b/FS/FS/part_export/shellcommands.pm @@ -4,6 +4,7 @@ use vars qw(@ISA %info); use Tie::IxHash; use String::ShellQuote; use FS::part_export; +use FS::Record qw( qsearch qsearchs ); @ISA = qw(FS::part_export); @@ -13,6 +14,9 @@ tie my %options, 'Tie::IxHash', default=>'useradd -c $finger -d $dir -m -s $shell -u $uid -p $crypt_password $username' #default=>'cp -pr /etc/skel $dir; chown -R $uid.$gid $dir' }, + 'useradd_no_queue' => { label=>'Run immediately', + type => 'checkbox', + }, 'useradd_stdin' => { label=>'Insert command STDIN', type =>'textarea', default=>'', @@ -21,6 +25,9 @@ tie my %options, 'Tie::IxHash', default=>'userdel -r $username', #default=>'rm -rf $dir', }, + 'userdel_no_queue' => { label=>'Run immediately', + type =>'checkbox', + }, 'userdel_stdin' => { label=>'Delete command STDIN', type =>'textarea', default=>'', @@ -34,11 +41,14 @@ tie my %options, 'Tie::IxHash', # 'rm -rf $old_dir'. #')' }, + 'usermod_no_queue' => { label=>'Run immediately', + type =>'checkbox', + }, 'usermod_stdin' => { label=>'Modify command STDIN', type =>'textarea', default=>'', }, - 'usermod_pwonly' => { label=>'Disallow username, domain, uid, gid, dir and RADIUS group changes', + 'usermod_pwonly' => { label=>'Disallow username, domain, uid, gid, and dir changes', #and RADIUS group changes', type =>'checkbox', }, 'usermod_nousername' => { label=>'Disallow just username changes', @@ -47,12 +57,18 @@ tie my %options, 'Tie::IxHash', 'suspend' => { label=>'Suspension command', default=>'usermod -L $username', }, + 'suspend_no_queue' => { label=>'Run immediately', + type =>'checkbox', + }, 'suspend_stdin' => { label=>'Suspension command STDIN', default=>'', }, 'unsuspend' => { label=>'Unsuspension command', default=>'usermod -U $username', }, + 'unsuspend_no_queue' => { label=>'Run immediately', + type =>'checkbox', + }, 'unsuspend_stdin' => { label=>'Unsuspension command STDIN', default=>'', }, @@ -60,6 +76,20 @@ tie my %options, 'Tie::IxHash', type=>'select', options=>[qw(crypt md5)], default => 'crypt', }, + 'groups_susp_reason' => { label => + 'Radius group mapping to reason (via template user)', + type => 'textarea', + }, + 'ignore_all_output' => { + label => 'Ignore all output and errors from the command', + type => 'checkbox', + }, + 'ignored_errors' => { label => 'Regexes of specific errors to ignore, separated by newlines', + type => 'textarea' + }, +# 'no_queue' => { label => 'Run command immediately', +# type => 'checkbox', +# }, ; %info = ( @@ -72,7 +102,7 @@ tie my %options, 'Tie::IxHash', 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. +setup SSH for unattended operation.

Use these buttons for some useful presets: