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

Update tor_public_pool.sh #154

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

secp512k2
Copy link
Contributor

Added missing ; after then

Added missing ; after then
@@ -1,34 +1,39 @@
function enable_tor_public_pool {
if [[ $OS == Mac ]] ; then no_mac ; return 1 ; fi
if [[ $OS == Mac ]]; then no_mac; return 1; fi
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't mind much either way, but I use spaces before every ; all through Parmanode.
If I'm going to use C or C++, I don't use the space.

if sudo grep "HiddenServiceDir $varlibtor/public_pool-service/" \
$torrc | grep -v "^#" >$dn 2>&1 ; then true ; debug "true" ; else debug "else"
echo "HiddenServiceDir $varlibtor/public_pool-service/" | sudo tee -a $torrc >$dn 2>&1
if sudo grep "HiddenServiceDir $varlibtor/public_pool-service/" $torrc | grep -v "^#" >$dn 2>&1; then
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough, the original was ugly and uncalled for.

if sudo grep "HiddenServicePort 5055 127.0.0.1:5052" \
$torrc | grep -v "^#" >$dn 2>&1 ; then true ; else
echo "HiddenServicePort 5055 127.0.0.1:5052" | sudo tee -a $torrc >$dn 2>&1
if sudo grep "HiddenServicePort 5055 127.0.0.1:5052" $torrc | grep -v "^#" >$dn 2>&1; then
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that I look, it's probably better to have no else and put the code under "then" by adding a "!" before sudo


set_terminal ; echo -e "
set_terminal
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set_terminal ; echo -e "
is my commonly used style on hundreds of pages.

########################################################################################
FYI, changes have been made to torrc file, and Tor has been restarted.
########################################################################################
"
enter_continue ; jump $enter_cont
enter_continue
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commonly used style, and helps the search if I want to refactor, looking for this specific line

Copy link
Owner

@ArmanTheParman ArmanTheParman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestions. I have given answer about specific choices.
Then indentation of the function is cleaner.

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

Successfully merging this pull request may close these issues.

2 participants