summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2002-10-20 08:27:50 +0000
committerivan <ivan>2002-10-20 08:27:50 +0000
commit54542b1412c71fa39d8016a78da20b9f659e456b (patch)
tree84773232b1bbd92c800a65f749f0c7966333cab4
parent4a8e138775525f9695d15fdbc3b0a34d79b9e14f (diff)
enable shellcommands suspension/unsuspension hooks
: ----------------------------------------------------------------------
-rw-r--r--FS/FS/part_export.pm24
-rw-r--r--FS/FS/part_export/shellcommands.pm10
2 files changed, 34 insertions, 0 deletions
diff --git a/FS/FS/part_export.pm b/FS/FS/part_export.pm
index 3058f4d64..a88eb4ea5 100644
--- a/FS/FS/part_export.pm
+++ b/FS/FS/part_export.pm
@@ -552,6 +552,18 @@ tie my %shellcommands_options, 'Tie::IxHash',
type =>'textarea',
default=>'',
},
+ 'suspend' => { label=>'Suspension command',
+ default=>'',
+ },
+ 'suspend_stdin' => { label=>'Suspension command STDIN',
+ default=>'',
+ },
+ 'unsuspend' => { label=>'Unsuspension command',
+ default=>'',
+ },
+ 'unsuspend_stdin' => { label=>'Unsuspension command STDIN',
+ default=>'',
+ },
;
tie my %shellcommands_withdomain_options, 'Tie::IxHash',
@@ -577,6 +589,18 @@ tie my %shellcommands_withdomain_options, 'Tie::IxHash',
type =>'textarea',
#default=>"$_password\n$_password\n",
},
+ 'suspend' => { label=>'Suspension command',
+ default=>'',
+ },
+ 'suspend_stdin' => { label=>'Suspension command STDIN',
+ default=>'',
+ },
+ 'unsuspend' => { label=>'Unsuspension command',
+ default=>'',
+ },
+ 'unsuspend_stdin' => { label=>'Unsuspension command STDIN',
+ default=>'',
+ },
;
tie my %www_shellcommands_options, 'Tie::IxHash',
diff --git a/FS/FS/part_export/shellcommands.pm b/FS/FS/part_export/shellcommands.pm
index a514f9375..da6f4c46c 100644
--- a/FS/FS/part_export/shellcommands.pm
+++ b/FS/FS/part_export/shellcommands.pm
@@ -20,6 +20,16 @@ sub _export_delete {
$self->_export_command('userdel', @_);
}
+sub _export_suspend {
+ my($self) = shift;
+ $self->_export_command('suspend', @_);
+}
+
+sub _export_unsuspend {
+ my($self) = shift;
+ $self->_export_command('unsuspend', @_);
+}
+
sub _export_command {
my ( $self, $action, $svc_acct) = (shift, shift, shift);
my $command = $self->option($action);