NAME
service —
manage services
SYNOPSIS
service |
[operation] [service |
all] |
DESCRIPTION
Most of the options accept either the service name or the special
keyword “all”, which applies the
operation to all the related services.
Operation names can be abbreviated to the shortest distinctive
form, eg. instead of activated, one can use
ad, but not act, as that is
the abbreviation for activate. The parts which can
be omitted are given here in brackets.
servicea(ctivate)[service |all]- activates the service “service”.
servicea(ctivate)d[service |all]- checks if the service “service” is activated in /bin/svc.d/run.
serviced(eactivate)[service |all]- deactivates the service “service”.
servicel(ist)- lists all available (not necessarily activated) services in the directory /bin/svc.d/avail.
servicere(start)[service |all]- restarts the service.
serviceru(nning)[service |all]- checks if the service “service” is running.
servicesta(rt)[service |all]- starts the service.
servicesto(p)[service |all]- stops the service.
ENVIRONMENT
STATUSDELAY- Delay between issuing ‘
service start all’ and ‘service running all’, in seconds. Default value is 1. Adjust as necessary to leave time for services to start before querying their status.
FILES
- /bin/svc.d/avail
- service scripts which are available for activation.
- /bin/svc.d/default
- service configuration files.
- /bin/svc.d/run
- symlinks to activated service scripts.
STATUS ABBREVIATIONS
When outputting service status, various four-letter-maximum abbreviations will be printed on the right:
- OK
- the operation was successful.
- FAIL
- the operation has failed.
- YE
- the service is running.
- NO
- the service isn't running.
- 1-ST
- the service is “one-shot”, so the
runningoperation doesn't apply. - RNNG
- the service is already running.
- NOTR
- the service already isn't running.
EXIT STATUS
svc(8),
service and service scripts themselves should set
the exit status to one of the following:
- 0
- success.
- 1
- redundancy; for example, if starting the service was attempted when the service is already running.
- 2
- general error.
SEE ALSO
HISTORY
svc(8) and related commands were made by Cristoph Lohmann in 2012. The version used in Galeb is heavily modified and documented by Strahinya Radich in 2022.
AUTHORS
Cristoph Lohmann
⟨20h@r-36.net⟩, 2012-2014, original author
Strahinya Radich
⟨contact@strahinja.org⟩, 2022, reorganized
svc(8) and created the
manpage.