X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export.pm;h=d00bf5782988ab9dc054f1fc1b54633508d4a9f7;hb=12ec7e574507f247ba5f83df4f7326b42f796267;hp=16f91eb6eea27f232da70d7751d308c5d637547e;hpb=aecf44ec9118946eebe551fc7144a1d0dcff8de5;p=freeside.git diff --git a/FS/FS/part_export.pm b/FS/FS/part_export.pm index 16f91eb6e..d00bf5782 100644 --- a/FS/FS/part_export.pm +++ b/FS/FS/part_export.pm @@ -281,7 +281,7 @@ sub check { #check exporttype? - $self->SUPER::check; + ''; #no error } #=item part_svc @@ -303,7 +303,7 @@ sub part_svc { =item svc_x -Returns a list of associated FS::svc_* records. +Returns a list of associate FS::svc_* records. =cut @@ -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 @@ -663,19 +667,6 @@ END }, ; -tie my %router_options, 'Tie::IxHash', - 'protocol' => { - label=>'Protocol', - type =>'select', - options => [qw(telnet ssh)], - default => 'telnet'}, - 'insert' => {label=>'Insert command', default=>'' }, - 'delete' => {label=>'Delete command', default=>'' }, - 'replace' => {label=>'Replace command', default=>'' }, - 'Timeout' => {label=>'Time to wait for prompt', default=>'20' }, - 'Prompt' => {label=>'Prompt string', default=>'#' } -; - tie my %domain_shellcommands_options, 'Tie::IxHash', 'user' => { label=>'Remote username', default=>'root' }, 'useradd' => { label=>'Insert command', @@ -781,30 +772,18 @@ tie my %communigate_pro_singledomain_options, 'Tie::IxHash', ; tie my %bind_options, 'Tie::IxHash', - #'machine' => { label=>'named machine' }, - 'named_conf' => { label => 'named.conf location', - default=> '/etc/bind/named.conf' }, - 'zonepath' => { label => 'path to zone files', - default=> '/etc/bind/', }, - 'bind_release' => { label => 'ISC BIND Release', - type => 'select', - options => [qw(BIND8 BIND9)], - default => 'BIND8' }, - 'bind9_minttl' => { label => 'The minttl required by bind9 and RFC1035.', - default => '1D' }, + #'machine' => { label=>'named machine' }, + 'named_conf' => { label => 'named.conf location', + default=> '/etc/bind/named.conf' }, + 'zonepath' => { label => 'path to zone files', + default=> '/etc/bind/', }, ; tie my %bind_slave_options, 'Tie::IxHash', - #'machine' => { label=> 'Slave machine' }, - 'master' => { label=> 'Master IP address(s) (semicolon-separated)' }, - 'named_conf' => { label => 'named.conf location', - default => '/etc/bind/named.conf' }, - 'bind_release' => { label => 'ISC BIND Release', - type => 'select', - options => [qw(BIND8 BIND9)], - default => 'BIND8' }, - 'bind9_minttl' => { label => 'The minttl required by bind9 and RFC1035.', - default => '1D' }, + #'machine' => { label=> 'Slave machine' }, + 'master' => { label=> 'Master IP address(s) (semicolon-separated)' }, + 'named_conf' => { label => 'named.conf location', + default => '/etc/bind/named.conf' }, ; tie my %http_options, 'Tie::IxHash', @@ -839,27 +818,9 @@ tie my %http_options, 'Tie::IxHash', ; tie my %sqlmail_options, 'Tie::IxHash', - 'datasrc' => { label => 'DBI data source' }, - 'username' => { label => 'Database username' }, - 'password' => { label => 'Database password' }, - 'server_type' => { - label => 'Server type', - type => 'select', - options => [qw(dovecot_plain dovecot_crypt dovecot_digest_md5 courier_plain - courier_crypt)], - default => ['dovecot_plain'], }, - 'svc_acct_table' => { label => 'User Table', default => 'user_acct' }, - 'svc_forward_table' => { label => 'Forward Table', default => 'forward' }, - 'svc_domain_table' => { label => 'Domain Table', default => 'domain' }, - 'svc_acct_fields' => { label => 'svc_acct Export Fields', - default => 'username _password domsvc svcnum' }, - 'svc_forward_fields' => { label => 'svc_forward Export Fields', - default => 'domain svcnum catchall' }, - 'svc_domain_fields' => { label => 'svc_domain Export Fields', - default => 'srcsvc dstsvc dst' }, - 'resolve_dstsvc' => { label => q{Resolve svc_forward.dstsvc to an email address and store it in dst. (Doesn't require that you also export dstsvc.)}, - type => 'checkbox' }, - + 'datasrc' => { label=>'DBI data source' }, + 'username' => { label=>'Database username' }, + 'password' => { label=>'Database password' }, ; tie my %ldap_options, 'Tie::IxHash', @@ -903,6 +864,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 +903,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' => { @@ -967,7 +935,7 @@ tie my %forward_shellcommands_options, 'Tie::IxHash', 'sqlmail' => { 'desc' => 'Real-time export to SQL-backed mail server', 'options' => \%sqlmail_options, - 'nodomain' => '', + '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?...)', }, @@ -1048,12 +1016,14 @@ tie my %forward_shellcommands_options, 'Tie::IxHash', }, + 'svc_acct_sm' => {}, + 'svc_forward' => { 'sqlmail' => { '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 +1031,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' => { @@ -1077,17 +1055,6 @@ tie my %forward_shellcommands_options, 'Tie::IxHash', }, }, - 'svc_broadband' => { - 'router' => { - 'desc' => 'Send a command to a router.', - 'options' => \%router_options, - 'notes' => '', - }, - }, - - 'svc_external' => { - }, - ); =back