Connect to $ENV{GRUNTMASTER_DSN} if defined
authorMarius Gavrilescu <marius@ieval.ro>
Fri, 30 Jan 2015 12:05:12 +0000 (14:05 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Fri, 30 Jan 2015 12:05:12 +0000 (14:05 +0200)
lib/Gruntmaster/Daemon.pm

index ed24158..f222500 100644 (file)
@@ -163,7 +163,7 @@ sub got_job{
 sub run{
        warn "No GRUNTMASTER_VM environment variable. Running without a VM is a security risk.\n"  unless $ENV{GRUNTMASTER_VM};
        require Gruntmaster::Data;
-       $db = Gruntmaster::Data->connect('dbi:Pg:');
+       $db = Gruntmaster::Data->connect($ENV{GRUNTMASTER_DSN} // 'dbi:Pg:');
        Log::Log4perl->init('/etc/gruntmasterd/gruntmasterd-log.conf');
        get_logger->info("gruntmasterd $VERSION started");
        chdir tempdir 'gruntmasterd.XXXX', CLEANUP => 1, TMPDIR => 1;
This page took 0.0287 seconds and 4 git commands to generate.