From 58481157c7823b25f698d9b22144d5828ef60adb Mon Sep 17 00:00:00 2001 From: GouveaHeitor Date: Thu, 2 Jan 2020 08:37:26 -0300 Subject: [PATCH] fix a few bugs and update readme.md --- .gitignore | 47 +------------------------------------------ README.md | 4 ++-- lib/Nipe/Functions.pm | 8 ++++++++ nipe.pl | 2 +- 4 files changed, 12 insertions(+), 49 deletions(-) diff --git a/.gitignore b/.gitignore index f42d3b4..ccc9fd9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,46 +1 @@ -*.DS_Store - -# Created by https://www.gitignore.io/api/perl -# Edit at https://www.gitignore.io/?templates=perl - -### Perl ### -!Build/ -.last_cover_stats -/META.yml -/META.json -/MYMETA.* -*.o -*.pm.tdy -*.bs - -# Devel::Cover -cover_db/ - -# Devel::NYTProf -nytprof.out - -# Dizt::Zilla -/.build/ - -# Module::Build -_build/ -Build -Build.bat - -# Module::Install -inc/ - -# ExtUtils::MakeMaker -/blib/ -/_eumm/ -/*.gz -/Makefile -/Makefile.old -/MANIFEST.bak -/pm_to_blib -/*.zip - -# Carton -/local - -# End of https://www.gitignore.io/api/perl \ No newline at end of file +*.DS_Store \ No newline at end of file diff --git a/README.md b/README.md index d09cf9f..2e54efb 100644 --- a/README.md +++ b/README.md @@ -64,9 +64,9 @@ ### Contribution -- Your contributions and suggestions are heartily♥ welcome. [**See here the contribution guidelines.**](/.github/CONTRIBUTING.md) Please, report bugs via [**issues page.**](https://github.com/GouveaHeitor/nipe/issues)(✿◕‿◕) +- Your contributions and suggestions are heartily ♥ welcome. [**See here the contribution guidelines.**](/.github/CONTRIBUTING.md) Please, report bugs via [**issues page.**](https://github.com/GouveaHeitor/nipe/issues) See here the [**Security Policy.**](./github/SECURITY.md) (✿ ◕‿◕) -- Interested in better understanding how the Nipe really works? Maybe this post can help you: [**A techinical Overview about Nipe**](https://heitorgouvea.me/2019/11/19/Nipe-Overview) +- Interested in better understanding how the Nipe really works? Maybe this post can help you: [**A techinical Overview about Nipe.**](https://heitorgouvea.me/2019/11/19/Nipe-Overview) ### License diff --git a/lib/Nipe/Functions.pm b/lib/Nipe/Functions.pm index 6f2cc5f..a775813 100644 --- a/lib/Nipe/Functions.pm +++ b/lib/Nipe/Functions.pm @@ -48,6 +48,14 @@ sub install { system ("sudo chmod 644 /etc/tor/torrc"); + if (-e "/etc/init.d/tor") { + system ("sudo /etc/init.d/tor stop > /dev/null"); + } + + else { + system ("sudo systemctl stop tor"); + } + return true; } diff --git a/nipe.pl b/nipe.pl index 3cd4681..585b991 100755 --- a/nipe.pl +++ b/nipe.pl @@ -1,6 +1,6 @@ #!/usr/bin/env perl -use 5.010; +use 5.018; use Switch; use lib "./lib/"; use Nipe::Stop;