mirror of
https://codeberg.org/h3xx/you-dont-need-pihole.git
synced 2024-08-14 20:27:01 +00:00
Replace working directory guess with FindBin
This commit is contained in:
parent
f8c4c19dcd
commit
e80b115e74
1 changed files with 2 additions and 2 deletions
|
@ -18,7 +18,7 @@ use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
use Getopt::Long qw/ GetOptions :config no_ignore_case /;
|
use Getopt::Long qw/ GetOptions :config no_ignore_case /;
|
||||||
use File::Basename qw/ dirname /;
|
use FindBin qw//;
|
||||||
|
|
||||||
my %domains;
|
my %domains;
|
||||||
my $dupes = 0;
|
my $dupes = 0;
|
||||||
|
@ -69,7 +69,7 @@ sub add_host_file {
|
||||||
MAIN: {
|
MAIN: {
|
||||||
my $out;
|
my $out;
|
||||||
my $block_ip = '0.0.0.0 ::1';
|
my $block_ip = '0.0.0.0 ::1';
|
||||||
my $workdir = &dirname($0);
|
my $workdir = $FindBin::RealBin;
|
||||||
|
|
||||||
unless (&GetOptions(
|
unless (&GetOptions(
|
||||||
'out=s' => \$out,
|
'out=s' => \$out,
|
||||||
|
|
Loading…
Reference in a new issue