2016-11-15 11:18:32 +00:00
|
|
|
# service
|
|
|
|
|
|
|
|
> Manage services by running init scripts.
|
2021-01-31 17:05:18 +00:00
|
|
|
> The full script path should be omitted (`/etc/init.d/` is assumed).
|
2016-11-15 11:18:32 +00:00
|
|
|
|
2020-10-06 19:44:12 +01:00
|
|
|
- List the name and status of all services:
|
|
|
|
|
|
|
|
`service --status-all`
|
|
|
|
|
2016-11-15 11:18:32 +00:00
|
|
|
- Start/Stop/Restart/Reload service (start/stop should always be available):
|
|
|
|
|
2020-10-06 19:44:12 +01:00
|
|
|
`service {{service_name}} {{start|stop|restart|reload}}`
|
2016-11-15 11:18:32 +00:00
|
|
|
|
|
|
|
- Do a full restart (runs script twice with start and stop):
|
|
|
|
|
2020-10-06 19:44:12 +01:00
|
|
|
`service {{service_name}} --full-restart`
|
2016-11-15 11:18:32 +00:00
|
|
|
|
|
|
|
- Show the current status of a service:
|
|
|
|
|
2020-10-06 19:44:12 +01:00
|
|
|
`service {{service_name}} status`
|