BlockchainCommons / BlockchainCommons/Bitcoin-Standup-Scripts

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

オープン 初心者向け
#40 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Shell
スター
57
フォーク
36
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Scripts/LinodeStandUp.sh の214~225行付近から始め、/etc/tor/torrc に対して sed コマンドを再現し、報告された式エラーがないか /standup.err を確認します。セットアップが完了し、sed エラーなしで HiddenService 行が torrc に追加されるように、HiddenServiceDir エントリを更新します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
shell
領域
devops, infrastructure
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
65/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。