BlockchainCommons / BlockchainCommons/Bitcoin-Standup-Scripts

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

Ouverte Adaptée aux débutants
#40 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Shell
Étoiles
57
Forks
36
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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\`

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par Scripts/LinodeStandUp.sh autour des lignes 214-225 et reproduisez la commande sed sur /etc/tor/torrc, en vérifiant /standup.err pour l’erreur d’expression signalée. Mettez à jour l’entrée HiddenServiceDir afin que la configuration se termine et que les lignes HiddenService soient ajoutées à torrc sans l’erreur sed.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
shell
Domaine
devops, infrastructure
Type d'issue
Bug
Difficulté
2/5
Temps estimé
1-3 heures
Activité
À l'abandon
Clarté
Clairement spécifiée
Accessibilité débutants
65/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.