Importing domains.

Adam Rose adamr at eaze.net
Mon Jun 11 16:04:35 PDT 2001


The purpose of my last question was to see about importing domains into
freeside.

I am having difficulty importing domain names into svc_domain using
FS::svc_domain.  Here is the code that I am writing to import one domain
for now.

------
#!/usr/bin/perl -w

use strict;
use FS::UID qw(adminsuidsetup datasrc);
use FS::Record qw(qsearch qsearchs 
use FS::svc_domain;

my $user = shift or die "domain.pl user";
adminsuidsetup $user;


$FS::svc_domain::whois_hack=1;
my $domain = 'test.com';


my ($svc_domain) = new FS::svc_domain ({
          'svcpart' => 5,
          'svcnum'  =>'',
          'domain'  =>$domain,
          'action'  =>'N',
      });
my $error = $svc_domain->insert;
if ($error){
  die $error;
}
-------------
Every time I run this I am getting Domain in use (here).  I have delete
everything from svc_domain and domain_record and still get the same error.


freeside 1.3.1
Linux 2.2.18
Perl 5.00503


--Adam Rose 




More information about the freeside-devel mailing list