forked from lix-project/hydra
Hydra now uses an optional HYDRA_DBI environment variable which holds the DBI url. If this variable is not set, sqlite is used like before.
This commit is contained in:
parent
d774cd6f18
commit
a509694220
|
@ -65,9 +65,15 @@ sub getHydraPath {
|
||||||
|
|
||||||
|
|
||||||
sub getHydraDBPath {
|
sub getHydraDBPath {
|
||||||
my $path = getHydraPath . '/hydra.sqlite';
|
my $db = $ENV{"HYDRA_DBI"};
|
||||||
die "The Hydra database ($path) not exist!\n" unless -f $path;
|
if ($db ne "") {
|
||||||
return "dbi:SQLite:$path";
|
return $db ;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
my $path = getHydraPath . '/hydra.sqlite';
|
||||||
|
die "The Hydra database ($path) not exist!\n" unless -f $path;
|
||||||
|
return "dbi:SQLite:$path";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue