moving the root check to another part that makes more sense

master
GouveaHeitor 2020-06-27 12:27:08 -03:00
parent a836a292aa
commit 33bca64c50
2 changed files with 3 additions and 4 deletions

View File

@ -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");

View File

@ -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",