diff options
author | 2018-12-09 21:15:13 -0800 | |
---|---|---|
committer | 2018-12-09 21:15:13 -0800 | |
commit | 7a7859fdf12e8c71fb60ae500ecc025cc40bf979 (patch) | |
tree | 83ebd8003cb1d0b17197a10cb63a69ab95e6761d | |
parent | Avoid HTTP downgrades (diff) | |
download | bouncer-7a7859fdf12e8c71fb60ae500ecc025cc40bf979.tar.gz bouncer-7a7859fdf12e8c71fb60ae500ecc025cc40bf979.tar.bz2 bouncer-7a7859fdf12e8c71fb60ae500ecc025cc40bf979.zip |
perl: find db.conf when run from another path
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rwxr-xr-x | perl/sentry.pl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/perl/sentry.pl b/perl/sentry.pl index bc4788c..3da9291 100755 --- a/perl/sentry.pl +++ b/perl/sentry.pl @@ -9,6 +9,7 @@ use Data::Dumper; use LWP; use LWP::UserAgent; use Config::Tiny; +use File::Basename; $ua = LWP::UserAgent->new; $ua->timeout(4); @@ -17,7 +18,8 @@ $ua->agent("Gentoo Mirror Monitor/1.0"); my $DEBUG = 1; my %products = (); my %oss = (); -my $Config = Config::Tiny->read( 'db.conf' ); +my $dirname = dirname(__FILE__); +my $Config = Config::Tiny->read( $dirname . '/db.conf' ); # Some db credentials my $host = $Config->{database}->{host}; |