From 5bd5f206a77cf975515d955119d4dff7764a2d8c Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 3 Feb 2000 05:17:39 +0000 Subject: [PATCH] beginning of DNS and Apache support --- FS/FS/cust_pkg.pm | 3 +- FS/FS/domain_record.pm | 182 ++++++++++++++++++++++++++++++++++ FS/FS/svc_domain.pm | 68 ++++++++++++- FS/FS/svc_www.pm | 242 ++++++++++++++++++++++++++++++++++++++++++++++ bin/fs-setup | 34 ++++++- bin/svc_acct.import | 9 +- bin/svc_acct_sm.import | 9 +- bin/svc_domain.import | 92 ++++++++++++++++++ htdocs/docs/config.html | 13 +++ htdocs/docs/install.html | 2 +- htdocs/docs/schema.html | 14 +++ htdocs/docs/upgrade5.html | 22 +++++ 12 files changed, 678 insertions(+), 12 deletions(-) create mode 100644 FS/FS/domain_record.pm create mode 100644 FS/FS/svc_www.pm create mode 100644 bin/svc_domain.import diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index 1dcdab8d5..08be4e4e0 100644 --- a/FS/FS/cust_pkg.pm +++ b/FS/FS/cust_pkg.pm @@ -16,6 +16,7 @@ use FS::pkg_svc; use FS::svc_acct; use FS::svc_acct_sm; use FS::svc_domain; +use FS::svc_www; @ISA = qw( FS::Record ); @@ -490,7 +491,7 @@ sub order { =head1 VERSION -$Id: cust_pkg.pm,v 1.3 1999-11-08 21:38:38 ivan Exp $ +$Id: cust_pkg.pm,v 1.4 2000-02-03 05:16:52 ivan Exp $ =head1 BUGS diff --git a/FS/FS/domain_record.pm b/FS/FS/domain_record.pm new file mode 100644 index 000000000..9b7081b2c --- /dev/null +++ b/FS/FS/domain_record.pm @@ -0,0 +1,182 @@ +package FS::domain_record; + +use strict; +use vars qw( @ISA ); +#use FS::Record qw( qsearch qsearchs ); +use FS::Record qw( qsearchs ); +use FS::svc_domain; + +@ISA = qw(FS::Record); + +=head1 NAME + +FS::domain_record - Object methods for domain_record records + +=head1 SYNOPSIS + + use FS::domain_record; + + $record = new FS::domain_record \%hash; + $record = new FS::domain_record { 'column' => 'value' }; + + $error = $record->insert; + + $error = $new_record->replace($old_record); + + $error = $record->delete; + + $error = $record->check; + +=head1 DESCRIPTION + +An FS::domain_record object represents an entry in a DNS zone. +FS::domain_record inherits from FS::Record. The following fields are currently +supported: + +=over 4 + +=item recnum - primary key + +=item svcnum - Domain (see L) of this entry + +=item reczone - partial (or full) zone for this entry + +=item recaf - address family for this entry, currently only `IN' is recognized. + +=item rectype - record type for this entry (A, MX, etc.) + +=item recdata - data for this entry + +=back + +=head1 METHODS + +=over 4 + +=item new HASHREF + +Creates a new entry. To add the example to the database, see L<"insert">. + +Note that this stores the hash reference, not a distinct copy of the hash it +points to. You can ask the object for a copy with the I method. + +=cut + +sub table { 'domain_record'; } + +=item insert + +Adds this record to the database. If there is an error, returns the error, +otherwise returns false. + +=cut + +=item delete + +Delete this record from the database. + +=cut + +=item replace OLD_RECORD + +Replaces the OLD_RECORD with this one in the database. If there is an error, +returns the error, otherwise returns false. + +=cut + +=item check + +Checks all fields to make sure this is a valid example. If there is +an error, returns the error, otherwise returns false. Called by the insert +and replace methods. + +=cut + +# the check method should currently be supplied - FS::Record contains some +# data checking routines + +sub check { + my $self = shift; + + my $error = + $self->ut_numbern('recnum') + || $self->ut_number('svcnum') + ; + return $error if $error; + + return "Unknown svcnum (in svc_domain)" + unless qsearchs('svc_domain', { 'svcnum' => $self->svcnum } ); + + $self->reczone =~ /^(@|[a-z0-9\.\-]+)$/ + or return "Illegal reczone: ". $self->reczone; + $self->reczone($1); + + $self->recaf =~ /^(IN)$/ or return "Illegal recaf: ". $self->recaf; + $self->recaf($1); + + $self->rectype =~ /^(SOA|NS|MX|A|PTR|CNAME)$/ + or return "Illegal rectype (only SOA NS MX A PTR CNAME recognized): ". + $self->rectype; + $self->rectype($1); + + if ( $self->rectype eq 'SOA' ) { + my $recdata = $self->recdata; + $recdata =~ s/\s+/ /g; + $recdata =~ /^([a-z0-9\.\-]+ [\w\-\+]+\.[a-z0-9\.\-]+ \( (\d+ ){5}\))$/ + or return "Illegal data for SOA reocrd: $recdata"; + $self->recdata($1); + } elsif ( $self->rectype eq 'NS' ) { + $self->recdata =~ /^([a-z0-9\.\-]+)$/ + or return "Illegal data for NS record: ". $self->recdata; + $self->recdata($1); + } elsif ( $self->rectype eq 'MX' ) { + $self->recdata =~ /^(\d+)\s+([a-z0-9\.\-]+)$/ + or return "Illegal data for MX record: ". $self->recdata; + $self->recdata("$1 $2"); + } elsif ( $self->rectype eq 'A' ) { + $self->recdata =~ /^((\d{1,3}\.){3}\d{1,3})$/ + or return "Illegal data for A record: ". $self->recdata; + $self->recdata($1); + } elsif ( $self->rectype eq 'PTR' ) { + $self->recdata =~ /^([a-z0-9\.\-]+)$/ + or return "Illegal data for PTR record: ". $self->recdata; + $self->recdata($1); + } elsif ( $self->rectype eq 'CNAME' ) { + $self->recdata =~ /^([a-z0-9\.\-]+)$/ + or return "Illegal data for CNAME record: ". $self->recdata; + $self->recdata($1); + } else { + die "ack!"; + } + + ''; #no error +} + +=back + +=head1 VERSION + +$Id: domain_record.pm,v 1.1 2000-02-03 05:16:52 ivan Exp $ + +=head1 BUGS + +The data validation doesn't check everything it could. In particular, +there is no protection against bad data that passes the regex, duplicate +SOA records, forgetting the trailing `.', impossible IP addersses, etc. Of +course, it's still better than editing the zone files directly. :) + +=head1 SEE ALSO + +L, schema.html from the base documentation. + +=head1 HISTORY + +$Log: domain_record.pm,v $ +Revision 1.1 2000-02-03 05:16:52 ivan +beginning of DNS and Apache support + + +=cut + +1; + diff --git a/FS/FS/svc_domain.pm b/FS/FS/svc_domain.pm index f960de066..4d4db5ad8 100644 --- a/FS/FS/svc_domain.pm +++ b/FS/FS/svc_domain.pm @@ -3,6 +3,8 @@ package FS::svc_domain; use strict; use vars qw( @ISA $whois_hack $conf $mydomain $smtpmachine $tech_contact $from $to @nameservers @nameserver_ips @template + @mxmachines @nsmachines $soadefaultttl $soaemail $soaexpire $soamachine + $soarefresh $soaretry ); use Carp; use Mail::Internet; @@ -16,6 +18,7 @@ use FS::cust_svc; use FS::svc_acct; use FS::cust_pkg; use FS::cust_main; +use FS::domain_record; @ISA = qw( FS::svc_Common ); @@ -43,6 +46,15 @@ $FS::UID::callback{'FS::domain'} = sub { } @ns; @template = map { $_. "\n" } $conf->config("$internic/template"); + @mxmachines = $conf->config('mxmachines'); + @nsmachines = $conf->config('nsmachines'); + $soadefaultttl = $conf->config('soadefaultttl'); + $soaemail = $conf->config('soaemail'); + $soaexpire = $conf->config('soaexpire'); + $soamachine = $conf->config('soamachine'); + $soarefresh = $conf->config('soarefresh'); + $soaretry = $conf->config('soaretry'); + }; =head1 NAME @@ -114,6 +126,19 @@ email address on this email. Otherwise, the svc_acct records for this package (see L) are searched. If there is exactly one svc_acct record in the same package, it is automatically used. Otherwise an error is returned. +If any I configuration file exists, an SOA record is added to +the domain_record table (see ). + +If any machines are defined in the I configuration file, NS +records are added to the domain_record table (see L). + +If any machines are defined in the I configuration file, MX +records are added to the domain_record table (see L). + +Any problems adding FS::domain_record records will emit warnings, but will +not return errors from this method. If your configuration files are correct +you shouln't have any problems. + =cut sub insert { @@ -144,6 +169,47 @@ sub insert { $self->submit_internic unless $whois_hack; + if ( $soamachine ) { + my $soa = new FS::domain_record { + 'svcnum' => $self->svcnum, + 'reczone' => '@', + 'recaf' => 'IN', + 'rectype' => 'SOA', + 'recdata' => "$soamachine $soaemail ( ". time2str("%Y%m%e", time). "00 ". + "$soarefresh $soarety $soaexpire $soadefaultttl )" + }; + $error = $soa->insert; + warn "WARNING: couldn't insert SOA record for new domain: $error" if $error; + + foreach $nsmachine ( @nsmachines ) { + my $ns = new FS::domain_record { + 'svcnum' => $self->svcnum, + 'reczone' => '@', + 'recaf' => 'IN', + 'rectype' => 'NS', + 'recdata' => $nsmachine, + }; + my $error = $ns->insert; + warn "WARNING: couldn't insert NS record for new domain: $error" + if $error; + } + + foreach $mxmachine ( @mxmachines ) { + my $mx = new FS::domain_record { + 'svcnum' => $self->svcnum, + 'reczone' => '@', + 'recaf' => 'IN', + 'rectype' => 'mx', + 'recdata' => $mxmachine, + }; + my $error = $mx->insert; + warn "WARNING: couldn't insert MX record for new domain: $error" + if $error; + } + + } + + ''; #no error } @@ -393,7 +459,7 @@ sub submit_internic { =head1 VERSION -$Id: svc_domain.pm,v 1.4 2000-01-29 21:10:13 ivan Exp $ +$Id: svc_domain.pm,v 1.5 2000-02-03 05:16:52 ivan Exp $ =head1 BUGS diff --git a/FS/FS/svc_www.pm b/FS/FS/svc_www.pm new file mode 100644 index 000000000..fc1419c7d --- /dev/null +++ b/FS/FS/svc_www.pm @@ -0,0 +1,242 @@ +package FS::svc_www; + +use strict; +use vars qw(@ISA $conf $apacheroot $apachemachine $nossh_hack ); +#use FS::Record qw( qsearch qsearchs ); +use FS::Record qw( qsearchs ); +use FS::svc_Common; +use FS::cust_svc; +use FS::domain_record; +use FS::svc_acct; +use FS::SSH qw(ssh); + +@ISA = qw(svc_Common); + +#ask FS::UID to run this stuff for us later +$FS::UID::callback{'FS::svc_www'} = sub { + $conf = new FS::Conf; + $apacheroot = $conf->config('apacheroot'); + $apachemachine = $conf->config('apachemachine'); +}; + +=head1 NAME + +FS::svc_www - Object methods for svc_www records + +=head1 SYNOPSIS + + use FS::svc_www; + + $record = new FS::svc_www \%hash; + $record = new FS::svc_www { 'column' => 'value' }; + + $error = $record->insert; + + $error = $new_record->replace($old_record); + + $error = $record->delete; + + $error = $record->check; + + $error = $record->suspend; + + $error = $record->unsuspend; + + $error = $record->cancel; + +=head1 DESCRIPTION + +An FS::svc_www object represents an web virtual host. FS::svc_www inherits +from FS::svc_Common. The following fields are currently supported: + +=over 4 + +=item svcnum - primary key + +=item recnum - DNS `A' record corresponding to this web virtual host. (see L) corresponding to this web virtual host. + +=back + +=head1 METHODS + +=over 4 + +=item new HASHREF + +Creates a new web virtual host. To add the record to the database, see +L<"insert">. + +Note that this stores the hash reference, not a distinct copy of the hash it +points to. You can ask the object for a copy with the I method. + +=cut + +sub table { 'svc_www'; } + +=item insert + +Adds this record to the database. If there is an error, returns the error, +otherwise returns false. + +The additional fields pkgnum and svcpart (see L) should be +defined. An FS::cust_svc record will be created and inserted. + +If the configuration values (see L) I, and +I exist, the command: + + mkdir $apacheroot/$zone; + chown $username $apacheroot/$zone; + ln -s $apacheroot/$zone $homedir/$zone + +I<$zone> is the DNS A record pointed to by I +I<$username> is the username pointed to by I +I<$homedir> is that user's home directory + +is executed on I via ssh. This behaviour can be surpressed by +setting $FS::svc_www::nossh_hack true. + +=cut + +sub insert { + my $self = shift; + my $error; + + $error = $self->SUPER::insert; + return $error if $error; + + my $domain_record = qsearchs('domain_record', { 'recnum' => $self->recnum } ); # or die ? + my $zone = $domain_record->reczone; + # or die ? + unless ( $zone =~ /\.$/ ) { + my $dom_svcnum = $domain_record->svcnum; + my $svc_domain = qsearchs('svc_domain', { 'svcnum' => $dom_svcnum } ); + # or die ? + $zone .= $svc_domain->domain; + } + + my $svc_acct = qsearchs('svc_acct', { 'svcnum' => $self->usersvc } ); + # or die ? + my $username = $svc_acct->username; + # or die ? + my $homedir = $svc_acct->dir; + # or die ? + + if ( $apachemachine + && $apacheroot + && $zone + && $username + && $homedir + && ! $nossh_hack + ) { + ssh("root\@$apachemachine", + "mkdir $apacheroot/$zone; ". + "chown $username $apacheroot/$zone; ". + "ln -s $apacheroot/$zone $homedir/$zone" + ); + } + + ''; +} + +=item delete + +Delete this record from the database. + +=cut + +sub delete { + my $self = shift; + my $error; + + $error = $self->SUPER::delete; + return $error if $error; + + ''; +} + +=item replace OLD_RECORD + +Replaces the OLD_RECORD with this one in the database. If there is an error, +returns the error, otherwise returns false. + +=cut + +sub replace { + my ( $new, $old ) = ( shift, shift ); + my $error; + + $error = $new->SUPER::replace($old); + return $error if $error; + + ''; +} + +=item suspend + +Called by the suspend method of FS::cust_pkg (see L). + +=item unsuspend + +Called by the unsuspend method of FS::cust_pkg (see L). + +=item cancel + +Called by the cancel method of FS::cust_pkg (see L). + +=item check + +Checks all fields to make sure this is a valid example. If there is +an error, returns the error, otherwise returns false. Called by the insert +and repalce methods. + +=cut + +sub check { + my $self = shift; + + my $x = $self->setfixed; + return $x unless ref($x); + my $part_svc = $x; + + my $error = + $self->ut_numbern('svcnum') + || $self->ut_number('recnum') + || $self->ut_number('usersvc') + ; + return $error if $error; + + return "Unknown recnum: ". $self->recnum + unless qsearchs('domain_record', { 'recnum' => $self->recnum } ); + + return "Unknown usersvc (svc_acct.svcnum): ". $self->usersvc + unless qsearchs('svc_acct', { 'svcnum' => $self->usersvc } ); + + ''; #no error +} + +=back + +=head1 VERSION + +$Id: svc_www.pm,v 1.1 2000-02-03 05:16:52 ivan Exp $ + +=head1 BUGS + +=head1 SEE ALSO + +L, L, L, L, +L, L, schema.html from the base documentation. + +=head1 HISTORY + +$Log: svc_www.pm,v $ +Revision 1.1 2000-02-03 05:16:52 ivan +beginning of DNS and Apache support + + +=cut + +1; + diff --git a/bin/fs-setup b/bin/fs-setup index dcaccdf1c..b75058d55 100755 --- a/bin/fs-setup +++ b/bin/fs-setup @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: fs-setup,v 1.22 2000-01-31 05:22:23 ivan Exp $ +# $Id: fs-setup,v 1.23 2000-02-03 05:16:52 ivan Exp $ # # ivan@sisd.com 97-nov-8,9 # @@ -32,7 +32,10 @@ # fix radius attributes ivan@sisd.com 98-sep-27 # # $Log: fs-setup,v $ -# Revision 1.22 2000-01-31 05:22:23 ivan +# Revision 1.23 2000-02-03 05:16:52 ivan +# beginning of DNS and Apache support +# +# Revision 1.22 2000/01/31 05:22:23 ivan # prepaid "internet cards" # # Revision 1.21 2000/01/30 06:03:26 ivan @@ -184,7 +187,7 @@ my($part_svc)=$dbdef->table('part_svc'); #because of svc_acct_pop #foreach (grep /^svc_/, $dbdef->tables) { #foreach (qw(svc_acct svc_acct_sm svc_charge svc_domain svc_wo)) { -foreach (qw(svc_acct svc_acct_sm svc_domain)) { +foreach (qw(svc_acct svc_acct_sm svc_domain svc_www)) { my($table)=$dbdef->table($_); my($col); foreach $col ( $table->columns ) { @@ -653,6 +656,31 @@ sub tables_hash_hack { 'index' => [ [] ], }, + 'domain_record' => { + 'columns' => [ + 'recnum', 'int', '', '', + 'svcnum', 'int', '', '', + 'reczone', 'varchar', '', $char_d, + 'recaf', 'char', '', 2, + 'rectype', 'char', '', 5, + 'recdata', 'varchar', '', $char_d, + ], + 'primary_key' => 'recnum', + 'unique' => [ [] ], + 'index' => [ ['svcnum'] ], + }, + + 'svc_www' => { + 'columns' => [ + 'svcnum', 'int', '', '', + 'recnum', 'int', '', '', + 'usersvc', 'int', '', '', + ], + 'primary_key' => 'svcnum', + 'unique' => [ [] ], + 'index' => [ [] ], + }, + #'svc_wo' => { # 'columns' => [ # 'svcnum', 'int', '', '', diff --git a/bin/svc_acct.import b/bin/svc_acct.import index 6541a9fd4..893a8298a 100755 --- a/bin/svc_acct.import +++ b/bin/svc_acct.import @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: svc_acct.import,v 1.7 1999-07-08 02:32:26 ivan Exp $ +# $Id: svc_acct.import,v 1.8 2000-02-03 05:16:52 ivan Exp $ # # ivan@sisd.com 98-mar-9 # @@ -17,7 +17,10 @@ # don't import /var/spool/freeside/conf/shells! ivan@sisd.com 98-aug-13 # # $Log: svc_acct.import,v $ -# Revision 1.7 1999-07-08 02:32:26 ivan +# Revision 1.8 2000-02-03 05:16:52 ivan +# beginning of DNS and Apache support +# +# Revision 1.7 1999/07/08 02:32:26 ivan # import fix, noticed by Ben Leibig and Joel Griffiths # # Revision 1.6 1999/07/08 01:49:00 ivan @@ -263,6 +266,6 @@ foreach $username ( keys %upassword ) { # sub usage { - die "Usage:\n\n svc_acct.export user\n"; + die "Usage:\n\n svc_acct.import user\n"; } diff --git a/bin/svc_acct_sm.import b/bin/svc_acct_sm.import index bda9762e1..50b0f6702 100755 --- a/bin/svc_acct_sm.import +++ b/bin/svc_acct_sm.import @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: svc_acct_sm.import,v 1.4 1999-03-25 08:42:20 ivan Exp $ +# $Id: svc_acct_sm.import,v 1.5 2000-02-03 05:16:52 ivan Exp $ # # ivan@sisd.com 98-mar-9 # @@ -16,7 +16,10 @@ # ivan@sisd.com 98-jul-13 # # $Log: svc_acct_sm.import,v $ -# Revision 1.4 1999-03-25 08:42:20 ivan +# Revision 1.5 2000-02-03 05:16:52 ivan +# beginning of DNS and Apache support +# +# Revision 1.4 1999/03/25 08:42:20 ivan # import stuff uses Term::Query and spits out (some kinds of) nonsensical input # # Revision 1.3 1999/03/24 00:51:55 ivan @@ -278,6 +281,6 @@ END # sub usage { - die "Usage:\n\n svc_acct_sm.export user\n"; + die "Usage:\n\n svc_acct_sm.import user\n"; } diff --git a/bin/svc_domain.import b/bin/svc_domain.import new file mode 100644 index 000000000..329465ca1 --- /dev/null +++ b/bin/svc_domain.import @@ -0,0 +1,92 @@ +#!/usr/bin/perl -w +# +# $Id: svc_domain.import,v 1.1 2000-02-03 05:17:39 ivan Exp $ + +use strict; +use vars qw( %d_part_svc ); +use Term::Query qw(query); +use FS::SSH qw(iscp); +use FS::UID qw(adminsuidsetup datasrc); +#use FS::Record qw(qsearch qsearchs); +#use FS::svc_acct_sm; +use FS::svc_domain; +use FS::domain_record; +#use FS::svc_acct; +#use FS::part_svc; + +my $user = shift or die &usage; +adminsuidsetup $user; + +my($spooldir)="/usr/local/etc/freeside/export.". datasrc; + +%d_part_svc = + map { $_->svcpart, $_ } qsearch('part_svc',{'svcdb'=>'svc_domain'}); + +print "\n\n", + ( join "\n", map "$_: ".$d_part_svc{$_}->svc, sort keys %d_part_svc ), + "\n\n"; +$^W=0; #Term::Query isn't -w-safe +my $domain_svcpart = + query "Enter part number for domains: ", 'irk', [ keys %d_part_svc ]; +$^W=1; + + print "\n\n", <) { + next unless /^\s*options/; +} +my $directory; +while () { + last if /^\s*directory\s+\"([\/\w+]+)\";/; +} +$directory = $1 or die "can't locate directory in named.conf!"; +whlie () { + next unless /^\s*zone\s+\"([\w\.\-]+)\"\s+\{/; + my $zone = $1; + while () { + my $type; + if ( /^\s*type\s+(master|slave)\s*\;/ ) { + $type = $1; + } + if ( /^\s*file\s+\"([\w\.\-]+)\"\s*\;/ && $type eq 'master' ) { + + # + # (add svc_domain) + my $file = $1; + iscp("root\@$named_machine:$directory/$file","$spooldir/$file.import"); + open(ZONE,"<$spooldir/$file.import") + or die "Can't open $spooldir/$file.import: $!"; + while () { + # (add domain_record) + } + + # + + } + + last if /^\s*\}\s*\;/; + } +} + +## + +sub usage { + die "Usage:\n\n svc_domain.import user\n"; +} + diff --git a/htdocs/docs/config.html b/htdocs/docs/config.html index cad10ce65..6f7a2b561 100644 --- a/htdocs/docs/config.html +++ b/htdocs/docs/config.html @@ -22,6 +22,11 @@ All further configuration files and directories are located in `/usr/local/etc/freeside/conf.DBI:Pg:dbname=freeside'
  • address - Your company name and address, four lines. +
  • apacheroot - The directory containing Apache virtual hosts +
  • apachemachine - A machine with the apacheroot directory and user home directories. The existance of this file enables setup of virtual host directories, and, in conjunction with the `home' configuration file, symlinks into user home directories. +
  • apachemachines - Your Apache machines, one per line. This enables export of `/etc/apache/vhosts.conf', which can be included in your Apache configuration via the Include directive. +
  • bindprimary - Your BIND primary nameserver. This enables export of /var/named/named.conf and zone files into /var/named +
  • bindsecondaries - Your BIND secondary nameservers, one per line. This enables export of /var/named/named.conf
  • bsdshellmachines - Your BSD flavored shell (and mail) machines, one per line. This enables export of `/etc/passwd' and `/etc/master.passwd'.
  • cybercash2 - CyberCash v2 support, four lines: paymentserverhost, paymentserverport, paymentserversecret, and transaction type (`mauthonly' or `mauthcapture'). CCLib.pm is required.
  • cybercash3.2 - CyberCash v3.2 support. Two lines: the full path and name of your merchant_conf file, and the transaction type (`mauthonly' or `mauthcapture'). CCMckLib3_2.pm, CCMckDirectLib3_2.pm and CCMckErrno3_2 are required. @@ -34,6 +39,8 @@ All further configuration files and directories are located in
  • home - For new users, prefixed to usrename to create a directory name. Should have a leading but not a trailing slash.
  • invoice_from - Return address on email invoices.
  • lpr - Print command for paper invoices, for example `lpr -h'. +
  • mxmachines - MX entries for new domains, weight and machine, one per line, with trailing `.' +
  • nsmachines - NS nameservers for new domains, one per line, with trailing `.'
  • nismachines - Your NIS master (not slave master) machines, one per line. This enables export of `/etc/global/passwd' and `/etc/global/shadow'.
  • passwordmin - Minimum password length (default 6);
  • qmailmachines - Your qmail machines, one per line. This enables export of `/var/qmail/control/virtualdomains', `/var/qmail/control/recipientmap', and `/var/qmail/control/rcpthosts'. The existance of this file (even if empty) also turns on user `.qmail-extension' file maintenance in conjunction with `shellmachine'. @@ -55,6 +62,12 @@ All further configuration files and directories are located in
  • shells - Legal shells (think /etc/shells). You probably want to `cut -d: -f7 /etc/passwd | sort | uniq' initially so that importing doesn't fail with `Illegal shell' errors, then remove any special entries afterwords. A blank line specifies that an empty shell is permitted.
  • showpasswords - The existance of this file will allow unencrypted user passwords to be displayed.
  • smtpmachine - SMTP relay for Freeside's outgoing mail. +
  • soadefaultttl - SOA default TTL for new domains. +
  • soaemail - SOA email for new domains, in BIND form (`.' instead of `@'), with trailing `.' +
  • soaexpire - SOA expire for new domains +
  • soamachine - SOA machine for new domains, with trailing `.' +
  • soarefresh - SOA refresh for new domains +
  • soaretry - SOA retry for new domains
  • usernamemin - Minimum username length (default 2);
  • usernamemax - Maximum username length (default is the size of the SQL column, probably specified when fs-setup was run)
diff --git a/htdocs/docs/install.html b/htdocs/docs/install.html index 574ab91e4..bb621e9a1 100644 --- a/htdocs/docs/install.html +++ b/htdocs/docs/install.html @@ -12,7 +12,7 @@ Before installing, you need:
  • Perl modules (CPAN will query, download and build perl modules automatically) +
  • domain_record - Domain zone detail +
      +
    • recnum - primary key +
    • svcnum - Domain (by svcnum) +
    • reczone - zone for this line +
    • recaf - address family, usually IN +
    • rectype - type for this record (A, MX, etc.) +
    • recdata - data for this record +
    +
  • svc_www +
  • svcnum - primary key +
  • recnum - host +
  • usersvc - account +
  • type_pkgs
    • typenum - agent type diff --git a/htdocs/docs/upgrade5.html b/htdocs/docs/upgrade5.html index fc4bf2c39..2be3c6e1b 100644 --- a/htdocs/docs/upgrade5.html +++ b/htdocs/docs/upgrade5.html @@ -19,6 +19,28 @@ CREATE TABLE prepay_credit ( PRIMARY KEY (prepaynum), INDEX (identifier) ); +CREATE TABLE domain_record ( + recnum int NOT NULL, + svcnum int NOT NULL, + reczone varchar(80) NOT NULL, + recaf char(2) NOT NULL, + rectype char(5) NOT NULL, + recdata varchar(80) NOT NULL, + PRIMARY KEY (recnum) +); +CREATE TABLE svc_www ( + svcnum int NOT NULL, + recnum int NOT NULL, + usersvc int NOT NULL, + PRIMARY KEY (svcnum) +); +ALTER TABLE part_svc ADD svc_www__svcnum varchar(80) NULL; +ALTER TABLE part_svc ADD svc_www__svcnum_flag char(1) NULL; +ALTER TABLE part_svc ADD svc_www__recnum varchar(80) NULL; +ALTER TABLE part_svc ADD svc_www__recnum_flag char(1) NULL; +ALTER TABLE part_svc ADD svc_www__usersvc varchar(80) NULL; +ALTER TABLE part_svc ADD svc_www__uesrsvc_flag char(1) NULL; +
    • Copy or symlink htdocs to the new copy.
    • Remove the symlink or directory (your_site_perl_directory)/FS. -- 2.11.0