Command reference
ed machines services restart
Restarts one unit.
ed machines services restart <machine> <unit> [--json]Arguments
| Name | Type / values | Default | What it does |
|---|---|---|---|
<machine> |
machine name, ssh alias or id | required | Which machine the unit lives on. |
<unit> |
unit name | required | The unit, for example nginx.service. |
Options
| Name | Type / values | Default | What it does |
|---|---|---|---|
--json |
flag | off | Emit JSON on stdout instead of the human line. |
--help, -h |
flag | off | Print the help for this command on stdout and exit 0. |
$ ed machines services restart devbox nginx.servicerestarted nginx.service on Devbox{ "action": "restart", "applied": true, "machine": "Devbox", "unit": "nginx.service"}ed machines services restart devbox nginx.serviceed machines devbox services restart docker.serviceed machines services restart devbox nginx.service --jsonBehaviour notes
systemctl restart on a stopped unit starts it, so this is the verb to reach
for when you do not care what state the unit was in. The 60 second timeout is
the one to watch: a unit with a slow ExecStop can outlast it, and the command
then reports a failure for something that finishes fine a moment later.
Only start, stop and restart exist. There is no enable, disable,
reload, status or journal verb; for those, use the raw form,
ed devbox systemctl reload nginx or ed devbox journalctl -u nginx -n 100.
Where to go next
ed machines power, the rest of this group- All
edcommands