From 9a69bbad177308e296d1dfc3486bcbcdb966de0c Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Fri, 30 Jan 2015 14:05:12 +0200 Subject: [PATCH] Connect to $ENV{GRUNTMASTER_DSN} if defined --- lib/Gruntmaster/Daemon.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Gruntmaster/Daemon.pm b/lib/Gruntmaster/Daemon.pm index ed24158..f222500 100644 --- a/lib/Gruntmaster/Daemon.pm +++ b/lib/Gruntmaster/Daemon.pm @@ -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; -- 2.39.2