X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export.pm;h=8423da299a7f238077c2a35c9fe0445e05b59699;hb=92fa788fb842baab8fa185e159d8effde739bd74;hp=16f91eb6eea27f232da70d7751d308c5d637547e;hpb=aecf44ec9118946eebe551fc7144a1d0dcff8de5;p=freeside.git diff --git a/FS/FS/part_export.pm b/FS/FS/part_export.pm index 16f91eb6e..8423da299 100644 --- a/FS/FS/part_export.pm +++ b/FS/FS/part_export.pm @@ -468,18 +468,22 @@ sub _export_delete { return "_export_delete: unknown export type ". $self->exporttype; } -#fallbacks providing null operations +#call svcdb-specific fallbacks sub _export_suspend { my $self = shift; #warn "warning: _export_suspened unimplemented for". ref($self); - ''; + my $svc_x = shift; + my $new = $svc_x->clone_suspended; + $self->_export_replace( $new, $svc_x ); } sub _export_unsuspend { my $self = shift; #warn "warning: _export_unsuspend unimplemented for ". ref($self); - ''; + my $svc_x = shift; + my $old = $svc_x->clone_kludge_unsuspend; + $self->_export_replace( $svc_x, $old ); } =back @@ -903,6 +907,13 @@ tie my %forward_shellcommands_options, 'Tie::IxHash', }, ; +tie my %postfix_options, 'Tie::IxHash', + 'user' => { label=>'Remote username', default=>'root' }, + 'aliases' => { label=>'aliases file location', default=>'/etc/aliases' }, + 'virtual' => { label=>'virtual file location', default=>'/etc/postfix/virtual' }, + 'mydomain' => { label=>'local domain', default=>'' }, +; + #export names cannot have dashes... %exports = ( 'svc_acct' => { @@ -935,7 +946,7 @@ tie my %forward_shellcommands_options, 'Tie::IxHash', 'desc' => 'Real-time export via remote SSH (i.e. useradd, userdel, etc.)', 'options' => \%shellcommands_options, 'nodomain' => 'Y', - 'notes' => '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.

Use these buttons for some useful presets:The following variables are available for interpolation (prefixed with new_ or old_ for replace operations): ', + 'notes' => '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.

Use these buttons for some useful presets:The following variables are available for interpolation (prefixed with new_ or old_ for replace operations): ', }, 'shellcommands_withdomain' => { @@ -1053,7 +1064,7 @@ tie my %forward_shellcommands_options, 'Tie::IxHash', 'desc' => 'Real-time export to SQL-backed mail server', 'options' => \%sqlmail_options, #'nodomain' => 'Y', - 'notes' => 'Database schema can be made to work with Courier IMAP and Exim. Others could work but are untested. (...extended description from pc-intouch?...)', + 'notes' => 'Database schema can be made to work with Courier IMAP and Exim. Others could work but are untested. (...extended description from fire2wire?...)', }, 'forward_shellcommands' => { @@ -1061,6 +1072,14 @@ tie my %forward_shellcommands_options, 'Tie::IxHash', 'options' => \%forward_shellcommands_options, 'notes' => 'Run remote commands via SSH, for forwards. You will need to setup SSH for unattended operation.

Use these buttons for some useful presets:The following variables are available for interpolation (prefixed with new_ or old_ for replace operations): ', }, + + 'postfix' => { + 'desc' => 'Real-time export to Postfix text files', + 'options' => \%postfix_options, + #'nodomain' => 'Y', + 'notes' => 'Batch export of Postfix aliases and virtual files. File::Rsync must be installed. Run bin/postfix.export to export the files.', + }, + }, 'svc_www' => {