-
Notifications
You must be signed in to change notification settings - Fork 19
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
base: master
Are you sure you want to change the base?
Conversation
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this 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.
Added missing ; after then