summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2012-02-09 10:44:22 +0000
committerivan <ivan>2012-02-09 10:44:22 +0000
commit7d89300a76d37f18d081598a8ada4f1b4dc66d8b (patch)
treedac5eb93148a4cb33be1f2d990d6d9bd6744e7a9
parent1daea3b56a2a47dd74bc83ab61ab93edbc7dd847 (diff)
spam settings, RT#15987
-rw-r--r--FS/FS/part_export/status_shellcommands.pm28
1 files changed, 25 insertions, 3 deletions
diff --git a/FS/FS/part_export/status_shellcommands.pm b/FS/FS/part_export/status_shellcommands.pm
index 88ddad7f5..6b189097b 100644
--- a/FS/FS/part_export/status_shellcommands.pm
+++ b/FS/FS/part_export/status_shellcommands.pm
@@ -3,6 +3,7 @@ use base qw( FS::part_export::shellcommands );
use vars qw( %info );
use Tie::IxHash;
+use String::ShellQuote;
tie my %options, 'Tie::IxHash',
'user' => { label=>'Remote username', default=>'root' },
@@ -38,10 +39,31 @@ sub _export_unsuspend {}
sub export_setstatus {
my($self, $svc_acct, $hashref) = @_;
- $self->_export_command('spam_enable', $svc_acct->email);
+ my @shellargs = (
+ $svc_acct->svcnum,
+ user => $self->option('user') || 'root',
+ host => $self->machine,
+ #stdin_string => $stdin_string,
+ ignore_all_output => $self->option('ignore_all_output'),
+ #ignored_errors => $self->option('ignored_errors') || '',
+ );
- $self->_export_command('spam_tag2_level', $svc_acct->email, $hashref->{'spam_tag2_level'} );
- $self->_export_command('spam_kill_level', $svc_acct->email, $hashref->{'spam_kill_level'} );
+ $self->shellcommands_queue( @shallargs, 'command' =>
+ $self->option('spam_enable'). ' '.
+ shell_quote($svc_acct->email)
+ );
+
+ $self->shellcommands_queue( @shallargs, 'command' =>
+ $self->option('spam_tag2_level'). ' '.
+ shell_quote($svc_acct->email). ' '.
+ $hashref->{'spam_tag2_level'}
+ );
+
+ $self->shellcommands_queue( @shallargs, 'command' =>
+ $self->option('spam_kill_level'). ' '.
+ shell_quote($svc_acct->email). ' '.
+ $hashref->{'spam_kill_level'}
+ );
}