App-LedgerSMB-Admin

 view release on metacpan or  search on metacpan

bin/lsmb_createdb  view on Meta::CPAN

The following options are supported:

   --help                   Print this message and exit
   --host hostname          Database Host
   --path /example/path     Path to LedgerSMB installation (required)
   --chart us/chart/General Chart of Accounts path (relative to sql)
   --gifi  ca/gifi/General  Path to GIFI
   --port 5432              Database Port
   --dbname database        Create db with the following name (required)
   --username postgres      Database Superuser to Log In As
   --prompt-password        Prompt for Password (can use PGPASSWORD instead)
|;

my ($all, $help, $host, $port, $path, $dbname, $username, $promptpasswd,
  $chart, $gifi);

GetOptions('all'               => \$all,
           'help'              => \$help,
           'chart=s'           => \$chart,
           'gifi=s'            => \$gifi,
           'host=s'            => \$host,
           'port=s'            => \$port,
           'username=s'        => \$username, 
           'prompt-password'   => \$promptpasswd,
           'path=s'            => \$path,
           'dbname=s'          => \$dbname
);

if ($help or !$dbname){
   print $helpmsg;
   exit 0;
}

my $passwd;
if ($promptpasswd){
   print "Password: ";
   $passwd = <>;
}

$username ||= 'postgres';

open(LSMB, '<', "$path/LedgerSMB.pm") or 
open(LSMB, '<', "$path/lib/LedgerSMB.pm") or die 'Bad LedgerSMB path';
($line) = grep {$_ =~ /^\s*our\s+\$VERSION/} <LSMB>;
$line =~ /(\d+\.\d+)/;

bin/lsmb_reload  view on Meta::CPAN


   --all                    Reload All Databases
   --help                   Print this message and exit
   --host hostname          Database Host
   --path13 /example/path   Path to LedgerSMB 1.3 installation
   --path14 /example/path2  Path to LedgerSMB 1.4 installation
   --path15 /example/path2  Path to LedgerSMB 1.5 installation
   --port 5432              Database Port
   --dbname database        Reload the specified db, overridden by --all
   --username postgres      Database Superuser to Log In As
   --prompt-password        Prompt for Password (can use PGPASSWORD instead)
|;

my ($all, $help, $host, $port, $path13, $path14, $dbname, 
    $username, $promptpasswd);

GetOptions('all'               => \$all,
           'help'              => \$help,
           'host=s'            => \$host,
           'port=s'            => \$port,
           'username=s'        => \$username, 
           'prompt-password'   => \$promptpasswd,
           'path13=s'          => \$path13,
           'path14=s'          => \$path14,
           'path15=s'          => \$path15,
           'dbname=s'          => \$dbname
);

if ($help){
   print $helpmsg;
   exit 0;
}

my $passwd;
if ($promptpasswd){
   print "Password: ";
   $passwd = <>;
}

$username ||= 'postgres';

## validate paths and set up versions

my $lsmbversions = {};

lib/App/LedgerSMB/Admin.pm  view on Meta::CPAN

The following options are supported:

   --all                    Reload All Databases
   --help                   Print this message and exit
   --host hostname          Database Host
   --path13 /example/path   Path to LedgerSMB 1.3 installation
   --path14 /example/path2  Path to LedgerSMB 1.4 installation
   --port 5432              Database Poart
   --dbname database        Reload the specified db, overridden by --all
   --username postgres      Database Superuser to Log In As
   --prompt-password        Prompt for Password (can use PGPASSWORD instead)


=head2 lsmb_createdb

Due to improper errors, this currently does not work properly with LedgerSMB
1.3.  It is expected that it will following the LedgerSMB 1.3.45 release
(forthcoming).

The lsmb_reload application provides a command line tool for upgrading or
rebuilding stored procedures and permissions of a LedgerSMB 1.3 or 1.4 database.

   --help                   Print this message and exit
   --host hostname          Database Host
   --path /example/path     Path to LedgerSMB installation (required)
   --chart us/chart/General Chart of Accounts path (relative to sql)
   --gifi  ca/gifi/General  Path to GIFI
   --port 5432              Database Poart
   --dbname database        Create db with the following name (required)
   --username postgres      Database Superuser to Log In As
   --prompt-password        Prompt for Password (can use PGPASSWORD instead)

=head1 Bundled Libraries

=head2 App::LedgerSMB::Admin

Provides base version tracking and management routines

=head2 App::LedgerSMB::Admin::Database

Routines to reload, create, update, backup, and restore databases



( run in 0.969 second using v1.01-cache-2.11-cpan-6aa56a78535 )