summaryrefslogtreecommitdiff
path: root/bin/svc_domain.erase
blob: 435dd5fddbe08d3fc6e2d2b429d3abc1665282c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/perl -w

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

use FS::domain_record;
use FS::svc_domain;

adminsuidsetup(shift @ARGV) or die "Usage: svc_domain.erase user\n";

foreach my $record ( qsearch('domain_record',{}), qsearch('svc_domain', {} ) ) {
  my $error = $record->delete;
  die $error if $error;
}