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

Conversation

driedbrains
Copy link

What was a problem?

overwrites torrc file when copying from .config

How this PR fixes the problem?

checking for exists /etc/tor/torrc & rename if exist to torrc.bak

@driedbrains driedbrains reopened this Feb 20, 2020
@bmeneg
Copy link
Contributor

bmeneg commented Feb 20, 2020

Hi @driedbrains! Just fyi.. this situation was already handled by PR #80 which was merged in "develop" branch but didn't make "master" yet. However, using a backup file could be helpful.. maybe when the user issues the install command with "-f"?... not sure.

@driedbrains
Copy link
Author

driedbrains commented Feb 20, 2020

Hi @bmeneguele maybe, but users can be forgetful... like me for example :)

@bmeneg
Copy link
Contributor

bmeneg commented Feb 20, 2020

Hi @bmeneguele maybe, but users can be forgetful... like me for example :)

yep, but that's why the code brought with #80 doesn't take any action in case the user don't use the "-f" option. It'll only warn about the existence of the config file under nipe's project directory.

Check the if/else statement in https://github.com/GouveaHeitor/nipe/blob/develop/lib/Nipe/Install.pm#L41, if "-f" used: overwrite, else do nothing other than print a message.

@driedbrains
Copy link
Author

Ok, "-f" good idea, but I would add, however, the ability to save the file, and not just rewrite

@bmeneg
Copy link
Contributor

bmeneg commented Feb 20, 2020

Ok, "-f" good idea, but I would add, however, the ability to save the file, and not just rewrite

Ah yes.. I'm fine with that. Plus a message about the "old config" being backed up.
I think that's a good addition!

+1

@htrgouvea htrgouvea changed the base branch from master to develop February 20, 2020 22:17
@htrgouvea
Copy link
Owner

Hi @driedbrains,

First of all thank you very much for your contribution, it is very valid!!

We believe that we can proceed as follows:

  • We keep the "-f" option created by @bmeneguele
  • But we will take the action of making a "backup" of the original file, automatically, as suggested by @driedbrains

@driedbrains Whenever you do a PR, do it for the "develop" branch, it has the latest updates from Nipe. Can you write the code for these features we discussed here? If you need help just let me know.

Thx!!!

@htrgouvea htrgouvea linked an issue Feb 21, 2020 that may be closed by this pull request
@mcasdfgf
Copy link

mcasdfgf commented Feb 21, 2020

@GouveaHeitor, ok. I can.

Sorry. @driedbrains = @mcasdfgf.

@htrgouvea
Copy link
Owner

@driedbrains Could you review your PRs? They are adding/removing things that are not entirely directed at their suggestions ... I would like to see a PR somewhat cleaner please

@htrgouvea
Copy link
Owner

Hi @driedbrains, you can resolve the conflicts here?

@htrgouvea
Copy link
Owner

Hi @driedbrains,

Recently I was reading the tor manual and I discovered an option called "-f", where I configure the torrc file that I want, allowing me to keep the user's torrc file untouchable... I believe this is the best option for Nipe, in order to avoid any conflict or unhealthy movement.

This will soon be implemented in Nipe

Thx

@htrgouvea htrgouvea closed this Apr 27, 2020
@htrgouvea
Copy link
Owner

See #104.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Conflicting iptables rules
4 participants