2015-12-04 16:52:19 -06:00
|
|
|
.\" Copyright (c) 2007-2015 The OpenRC Authors.
|
|
|
|
.\" See the Authors file at the top-level directory of this distribution and
|
2021-12-20 20:07:00 -05:00
|
|
|
.\" https://github.com/OpenRC/openrc/blob/HEAD/AUTHORS
|
2008-03-19 17:11:50 +00:00
|
|
|
.\"
|
2015-12-04 16:52:19 -06:00
|
|
|
.\" This file is part of OpenRC. It is subject to the license terms in
|
|
|
|
.\" the LICENSE file found in the top-level directory of this
|
2021-12-20 20:07:00 -05:00
|
|
|
.\" distribution and at https://github.com/OpenRC/openrc/blob/HEAD/LICENSE
|
2015-12-04 16:52:19 -06:00
|
|
|
.\" This file may not be copied, modified, propagated, or distributed
|
|
|
|
.\" except according to the terms contained in the LICENSE file.
|
2008-03-19 17:11:50 +00:00
|
|
|
.\"
|
2009-05-01 08:38:57 +01:00
|
|
|
.Dd May 1, 2009
|
2008-03-19 17:11:50 +00:00
|
|
|
.Dt RC-SERVICE 8 SMM
|
|
|
|
.Os OpenRC
|
|
|
|
.Sh NAME
|
|
|
|
.Nm rc-service
|
2012-01-22 01:17:42 +01:00
|
|
|
.Nd locate and run an OpenRC service with the given arguments
|
2008-03-19 17:11:50 +00:00
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
2017-12-04 17:17:17 -06:00
|
|
|
.Op Fl c , -ifcrashed
|
|
|
|
.Ar service cmd
|
|
|
|
.Op Ar ...
|
|
|
|
.Nm
|
2018-05-15 16:59:21 -05:00
|
|
|
.Fl d , -debug
|
|
|
|
.Ar service cmd
|
|
|
|
.Op Ar ...
|
|
|
|
.Nm
|
|
|
|
.Fl D , -nodeps
|
|
|
|
.Ar service cmd
|
|
|
|
.Op Ar ...
|
|
|
|
.Nm
|
2009-05-01 08:38:57 +01:00
|
|
|
.Op Fl i , -ifexists
|
2008-03-19 17:11:50 +00:00
|
|
|
.Ar service cmd
|
|
|
|
.Op Ar ...
|
2008-03-21 09:10:59 +00:00
|
|
|
.Nm
|
2014-09-21 13:54:51 -05:00
|
|
|
.Op Fl I , -ifinactive
|
|
|
|
.Ar service cmd
|
|
|
|
.Op Ar ...
|
|
|
|
.Nm
|
|
|
|
.Op Fl N , -ifnotstarted
|
|
|
|
.Ar service cmd
|
|
|
|
.Op Ar ...
|
2018-05-16 13:25:22 -05:00
|
|
|
.Nm
|
|
|
|
.Op Fl s , -ifstarted
|
|
|
|
.Ar service cmd
|
|
|
|
.Op Ar ...
|
|
|
|
.Nm
|
|
|
|
.Op Fl S , -ifstopped
|
|
|
|
.Ar service cmd
|
|
|
|
.Op Ar ...
|
2014-09-21 13:54:51 -05:00
|
|
|
.Nm
|
2008-03-26 08:08:47 +00:00
|
|
|
.Fl e , -exists
|
|
|
|
.Ar service
|
|
|
|
.Nm
|
2018-05-14 19:00:04 -05:00
|
|
|
.Fl Z , -dry-run
|
2018-05-15 17:09:56 -05:00
|
|
|
.Ar service cmd
|
|
|
|
.Op Ar ...
|
2018-05-14 19:00:04 -05:00
|
|
|
.Nm
|
2009-05-01 08:38:57 +01:00
|
|
|
.Fl l , -list
|
|
|
|
.Nm
|
2008-03-26 08:08:47 +00:00
|
|
|
.Fl r , -resolve
|
|
|
|
.Ar service
|
2008-03-19 17:11:50 +00:00
|
|
|
.Sh DESCRIPTION
|
2012-01-22 01:17:42 +01:00
|
|
|
Service scripts could be in different places on different systems.
|
2008-03-19 17:11:50 +00:00
|
|
|
.Nm
|
|
|
|
locates the specified service and runs it with the given arguments.
|
2009-05-01 08:38:57 +01:00
|
|
|
If
|
|
|
|
.Fl i , -ifexists
|
|
|
|
is given then
|
|
|
|
.Nm
|
|
|
|
returns 0 even if the service does not exist.
|
2014-09-21 13:54:51 -05:00
|
|
|
If
|
|
|
|
.Fl I , -ifinactive
|
|
|
|
or
|
|
|
|
.Fl N , -ifnotstarted
|
|
|
|
is given then
|
|
|
|
.Nm
|
|
|
|
returns 0 if the service exists but is in the wrong state.
|
2008-03-21 09:10:59 +00:00
|
|
|
.Pp
|
|
|
|
If given the
|
|
|
|
.Fl l , -list
|
|
|
|
argument then
|
|
|
|
.Nm
|
|
|
|
will list all available services.
|
2008-03-26 08:08:47 +00:00
|
|
|
.Pp
|
2009-05-01 08:38:57 +01:00
|
|
|
.Fl e , -exists
|
2008-03-26 08:08:47 +00:00
|
|
|
return 0 if it can find
|
|
|
|
.Ar service ,
|
|
|
|
otherwise -1.
|
2009-05-01 08:38:57 +01:00
|
|
|
.Fl r , -resolve
|
2008-03-26 08:08:47 +00:00
|
|
|
does the same and also prints the full path of the service to stdout.
|
2018-05-14 19:00:04 -05:00
|
|
|
.Pp
|
2018-05-15 16:59:21 -05:00
|
|
|
.Fl d , -debug
|
|
|
|
sets -x when running the service script(s).
|
|
|
|
.Pp
|
|
|
|
.Fl D , -nodeps
|
|
|
|
ignores dependencies when running the service.
|
|
|
|
.Pp
|
2018-05-14 19:00:04 -05:00
|
|
|
.Fl Z , -dry-run
|
2018-05-15 17:09:56 -05:00
|
|
|
displays commands rather than executing them.
|
2008-03-19 17:11:50 +00:00
|
|
|
.Sh SEE ALSO
|
2013-12-11 17:39:38 -06:00
|
|
|
.Xr openrc 8 ,
|
2008-03-26 08:08:47 +00:00
|
|
|
.Xr stdout 3
|
2008-03-19 17:11:50 +00:00
|
|
|
.Sh AUTHORS
|
2008-12-30 19:08:51 +00:00
|
|
|
.An Roy Marples <roy@marples.name>
|