This repository has been archived on 2024-06-18. You can view files and clone it, but cannot push or open issues/pull-requests.
2014-01-24 22:37:02 +01:00
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
use v5.14;
|
|
|
|
use autodie;
|
|
|
|
use Modern::Perl;
|
|
|
|
use Config::Simple;
|
|
|
|
|
|
|
|
package initco;
|
|
|
|
|
|
|
|
sub initco {
|
|
|
|
my ($cfgfile) = @_;
|
|
|
|
|
|
|
|
$cfgfile = defined $cfgfile ? $cfgfile : './config.ini';
|
|
|
|
|
|
|
|
my $cfg = new Config::Simple($cfgfile);
|
2014-01-25 18:49:58 +01:00
|
|
|
my $app = app->new( zdir => $cfg->param('zones_path')
|
|
|
|
, dbname => $cfg->param('dbname')
|
|
|
|
, dbhost => $cfg->param('host')
|
|
|
|
, dbport => $cfg->param('port')
|
|
|
|
, dbuser => $cfg->param('user')
|
|
|
|
, dbpass => $cfg->param('passwd')
|
|
|
|
, sgbd => $cfg->param('sgbd')
|
|
|
|
, sshhost => $cfg->param('sshhost')
|
|
|
|
, sshuser => $cfg->param('sshuser')
|
|
|
|
, dnsapp => $cfg->param('dnsapp') );
|
2014-01-24 22:37:02 +01:00
|
|
|
|
|
|
|
$app->init();
|
|
|
|
|
|
|
|
return $app;
|
|
|
|
}
|
|
|
|
|
|
|
|
1;
|