From: ivan Date: Tue, 24 Feb 2009 09:41:46 +0000 (+0000) Subject: somehow rc install wound up without any data X-Git-Tag: root_of_webpay_support~19 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=fa1ac68bf90cb9582f239bce31db157ec2719f43 somehow rc install wound up without any data --- diff --git a/bin/freeside-create-initial-data b/bin/freeside-create-initial-data new file mode 100755 index 000000000..052f47465 --- /dev/null +++ b/bin/freeside-create-initial-data @@ -0,0 +1,26 @@ +#!/usr/bin/perl -Tw + +use strict; +use vars qw($opt_d $opt_v); +use Getopt::Std; +use FS::UID qw(adminsuidsetup); +use FS::Setup qw(create_initial_data); + +getopts("d:"); + +my $dbh = adminsuidsetup shift; +create_initial_data('domain' => $opt_d); + +warn "Freeside initial data inserted - commiting transaction\n" if $opt_v; + +$dbh->commit or die $dbh->errstr; +$dbh->disconnect or die $dbh->errstr; + +warn "Database initialization committed successfully\n" if $opt_v; + +sub usage { + die "Usage:\n freeside-create-initial-data -d domain.name [ -v ] user\n" +} + +1; +