Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

checking for exists /etc/tor/torrc & rename if exist #95

Closed
wants to merge 10 commits into from
4 changes: 2 additions & 2 deletions .github/workflows/blank.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:

steps:
- uses: actions/checkout@v1
- name: Run a multi-line script
- name: Installing dependencies and verify Nipe Status
run: |
sudo apt install -y tor iptables perl
sudo cpan install Switch JSON LWP::UserAgent Config::Simple
sudo cp .configs/debian-torrc /etc/tor/torrc
sudo chmod 644 /etc/tor/torrc
perl nipe.pl status
perl nipe.pl status
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ License
==============
The MIT License (MIT)

Copyright (c) 2015 - 2019 Heitor Gouvêa
Copyright (c) 2015 - 2020 | Heitor Gouvêa

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
$ cd nipe

# Install libs and dependencies
$ cpan install Switch JSON LWP::UserAgent Config::Simple
$ sudo cpan install Switch JSON LWP::UserAgent Config::Simple
$ perl nipe.pl install
```

Expand Down
8 changes: 6 additions & 2 deletions lib/Nipe/Functions.pm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ sub help {
\r\trestart Restart the Nipe process
\r\tstatus See status

\rCopyright (c) 2015 - 2019 Heitor Gouvêa\n\n";
\rCopyright (c) 2015 - 2020 | Heitor Gouvêa\n\n";

return true;
}
Expand All @@ -26,6 +26,10 @@ sub install {

system ("sudo mkdir -p /etc/tor");

if ( -e "/etc/tor/torrc") {
system ("sudo mv /etc/tor/torrc /etc/tor/torrc.bak")
}

if ($operationalSystem eq "debian") {
system ("sudo apt-get install tor iptables");
system ("sudo cp .configs/debian-torrc /etc/tor/torrc");
Expand Down Expand Up @@ -59,4 +63,4 @@ sub install {
return true;
}

1;
1;