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.
This commit is contained in:
JF Bibeau 2016-09-26 16:36:10 -04:00 committed by GitHub
parent 5052712ff4
commit a50eba7805
1 changed files with 1 additions and 1 deletions

View File

@ -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: