From e11671629ab9738a106c92d291c4a1e1b084f0fb Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 9 Feb 2012 08:39:24 +0000 Subject: [PATCH] add status_shellcommands export, RT#15987 --- FS/FS/part_export/status_shellcommands.pm | 48 +++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 FS/FS/part_export/status_shellcommands.pm diff --git a/FS/FS/part_export/status_shellcommands.pm b/FS/FS/part_export/status_shellcommands.pm new file mode 100644 index 000000000..88ddad7f5 --- /dev/null +++ b/FS/FS/part_export/status_shellcommands.pm @@ -0,0 +1,48 @@ +package FS::part_export::status_shellcommands; +use base qw( FS::part_export::shellcommands ); + +use vars qw( %info ); +use Tie::IxHash; + +tie my %options, 'Tie::IxHash', + 'user' => { label=>'Remote username', default=>'root' }, + + 'spam_enable' => { label=>'Spam filtering enable command', }, + 'spam_disable' => { label=>'Spam filtering disable command', }, + 'spam_tag2_level' => { label=>'Spam set tag2 level command', }, + 'spam_kill_level' => { label=>'Spam set kill level command', }, + + 'ignore_all_output' => { + label => 'Ignore all output and errors from the command', + type => 'checkbox', + }, +; + +%info = ( + 'svc' => 'svc_acct', + 'desc' => 'Set mailbox status via shell commands', + 'options' => \%options, + 'nodomain' => '', + 'notes' => <_export_command('spam_enable', $svc_acct->email); + + $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'} ); + +} + +1; -- 2.11.0