What’s confusing now:
start
does not load a service, butload
starts one…- historically,
start
orload
would also install a service, but this is no longer the case forstart
Possible alternatives, with an imaginary workflow:
$ hab search/provides <ident>
$ hab install <ident>
$ hab start <ident>
Each of the above steps can be considered a set of nested sets representing service state:
——————————————————————————————————
—————————————————————————— |
———————————————— | |
search/provides | install | start |
———————————————— | |
—————————————————————————— |
——————————————————————————————————
If user input is needed, like if we choose to start
a not-yet-installed service, we should be present with a confirmation prompt and an optional auto-accept flag for automation:
$ hab start <ident>
<ident> is not installed. Do you want to install it now?
yes/no
$ hab start <ident> --yes
enable [–s]
Enables the service instances specified by the operands. For each service instance, the assigned restarter will try to bring it to the online state. If the –s option is specified, svcadm enables each service instance and then waits for each service instance to enter the online or degraded state. svcadm will return early if it determines that the service cannot reach these states without administrator intervention.
disable [–s]
Disables the service instance specified by the operands.
restart [–s]
Requests that the service instances specified by the operands be restarted.
refresh [–s]
For each service instance specified by the operands, requests that the assigned restarter update the service's running configuration snapshot with the values from the current configuration.
clear [–s]
For each service instance specified by the operands, if the instance is in the maintenance state, signal to the assigned restarter that the service has been repaired.
start
Start (activate) one or more units specified on the command line.
stop
Stop (deactivate) one or more units specified on the command line.
reload
Asks all units listed on the command line to reload their configuration.
restart
Stop and then start one or more units specified on the command line.
status
Show terse runtime status information about one or more units, followed by most recent log data from the journal.