]> iEval git - gruntmaster-daemon.git/commitdiff
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 ed2415812c0b61537fb97ede9420789195afb74a..f222500504b301e85b4dc0257e6c3fbc37193e9d 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.029938 seconds and 4 git commands to generate.