mirror of https://github.com/hashicorp/consul
Docs: Update command to create sample service
Since the previous command creates /etc/consul.d with sudo, a regular user won't have permission to echo and redirect a file to the directory. Switch to using tee with sudo to ensure the file gets created.pull/2361/head
parent
bdcc8c44f5
commit
ee008bcc2d
|
@ -41,7 +41,7 @@ we'll give it a tag we can use as an additional way to query the service:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
$ echo '{"service": {"name": "web", "tags": ["rails"], "port": 80}}' \
|
$ echo '{"service": {"name": "web", "tags": ["rails"], "port": 80}}' \
|
||||||
>/etc/consul.d/web.json
|
| sudo tee /etc/consul.d/web.json
|
||||||
```
|
```
|
||||||
|
|
||||||
Now, restart the agent, providing the configuration directory:
|
Now, restart the agent, providing the configuration directory:
|
||||||
|
|
Loading…
Reference in New Issue