HiddenService not set up in torrc file because of sed expression error

Open Beginner friendly
#40 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
shell

Research direction

Start with Scripts/LinodeStandUp.sh around lines 214-225 and reproduce the sed command against /etc/tor/torrc, checking /standup.err for the reported expression error. Update the HiddenServiceDir entry so the setup completes and the HiddenService lines are added to torrc without the sed error.

Written by the indexing model from the issue text.

Description

I tried installing the standup script following your directions. I noticed that the HiddenService lines were not added to my /etc/tor/torrc. Then, I saw this error in /standup.err:

standup@localhost:~$ grep ^sed /standup.err
sed: -e expression #1, char 253: unknown option to `s'

I was able to reproduce the error by running the code https://github.com/BlockchainCommons/Bitcoin-Standup-Scripts/blob/master/Scripts/LinodeStandUp.sh#L214-L225:

standup@localhost:~$ sed -i -e 's/## address y:z./## address y:z.\
\
HiddenServiceDir \/var\/lib\/tor\/standup\/\
HiddenServiceVersion 3\
HiddenServicePort 18332 127.0.0.1:18332\
HiddenServicePort 18443 127.0.0.1:18443\
HiddenServicePort 8332 127.0.0.1:8332\
\
HiddenServiceDir \/var/\lib/\tor/\cypherpunkpay\
HiddenServiceVersion 3\
HiddenServicePort 8081 127.0.0.1:8081\
/g' /etc/tor/torrc
sed: -e expression #1, char 253: unknown option to `s'

I think the problem is this line that doesn't properly escape the directory forward slashes. It needs changed to:

HiddenServiceDir \/var\/lib\/tor\/cypherpunkpay\

Dominant language
Shell
Stars
57
Forks
36
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from BlockchainCommons/Bitcoin-Standup-Scripts

All issues in BlockchainCommons/Bitcoin-Standup-Scripts

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.