moving the root check to another part that makes more sense
parent
a836a292aa
commit
33bca64c50
|
@ -5,7 +5,7 @@ use warnings;
|
|||
use Nipe::Utils::Device;
|
||||
|
||||
sub new {
|
||||
my %device = Nipe::Utils::Device -> new();
|
||||
my %device = Nipe::Utils::Device -> new();
|
||||
my $dnsPort = "9061";
|
||||
my $transferPort = "9051";
|
||||
my @table = ("nat", "filter");
|
||||
|
|
5
nipe.pl
5
nipe.pl
|
@ -12,13 +12,12 @@ use Nipe::Utils::Status;
|
|||
use Nipe::Utils::Helper;
|
||||
use Nipe::Utils::Install;
|
||||
|
||||
|
||||
sub main {
|
||||
die "Nipe must be run as root.\n" if $> != 0;
|
||||
|
||||
my $argument = $ARGV[0];
|
||||
|
||||
if ($argument) {
|
||||
die "Nipe must be run as root.\n" if $> != 0;
|
||||
|
||||
my $commands = {
|
||||
stop => "Nipe::Engine::Stop",
|
||||
start => "Nipe::Engine::Start",
|
||||
|
|
Loading…
Reference in New Issue