BlockchainCommons / BlockchainCommons/Bitcoin-Standup-Scripts
HiddenService not set up in torrc file because of sed expression error
- Lingua principale
- Shell
- Stelle
- 57
- Fork
- 36
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
I tried installing the [standup script](https://github.com/BlockchainCommons/Bitcoin-Standup-Scripts/blob/master/Scripts/LinodeStandUp.sh) following your [directions](https://github.com/BlockchainCommons/Learning-Bitcoin-from-the-Command-Line/blob/master/02_1_Setting_Up_a_Bitcoin-Core_VPS_with_StackScript.md#21-setting-up-a-bitcoin-core-vps-with-bitcoin-standup). 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](https://github.com/BlockchainCommons/Bitcoin-Standup-Scripts/blob/master/Scripts/LinodeStandUp.sh#L222) that doesn't properly escape the directory forward slashes. It needs changed to:
`HiddenServiceDir \/var\/lib\/tor\/cypherpunkpay\`
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia da Scripts/LinodeStandUp.sh intorno alle righe 214-225 e riproduci il comando sed su /etc/tor/torrc, controllando /standup.err per verificare l’errore di espressione segnalato. Aggiorna la voce HiddenServiceDir in modo che la configurazione venga completata e le righe HiddenService vengano aggiunte a torrc senza l’errore di sed.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- shell
- Ambito
- devops, infrastructure
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 65/100