BlockchainCommons / BlockchainCommons/Bitcoin-Standup-Scripts

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

Abierto Apto para principiantes
#40 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Shell
Estrellas
57
Forks
36
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comience con Scripts/LinodeStandUp.sh alrededor de las líneas 214-225 y reproduzca el comando sed contra /etc/tor/torrc, comprobando /standup.err para ver el error de expresión reportado. Actualice la entrada HiddenServiceDir para que la configuración se complete y las líneas HiddenService se añadan a torrc sin el error de sed.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
shell
Área
devops, infrastructure
Tipo de issue
Error
Dificultad
2/5
Tiempo estimado
1-3 horas
Estado de actividad
Estancado
Claridad
Bien especificado
Aptitud para principiantes
65/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.