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:
parent
5052712ff4
commit
a50eba7805
|
@ -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