1 .\" $NetBSD: service.8,v 1.4 2015/04/02 18:41:22 ast Exp $
3 .\" Copyright (c) 2009 Douglas Barton
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
15 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .Nd run or list system services
38 .Ar rc_script_name1 Op Ar rc_script_name2 Op Ar ...
41 .Ar rc_script_name action
45 command is a simple interface to the services startup system.
47 Its purpose is to list the services or invoke actions on them
55 will set the same environment that is used at boot time.
57 The options are as follows:
60 List services that are enabled.
61 The list of scripts is compiled using
63 the same way as is done in
65 each script is first checked for an
67 assignment and if present,
68 checked to see if it is enabled.
71 are specified, only those are checked.
74 arguments are always specified without a path prefix.
79 .Ev rc_directories as defined in
81 A script will be listed unless it has the
87 are defined or in which directory the
107 .Pa /sbin:/bin:/usr/sbin:/usr/bin
108 which is how they are set in
117 or any other argument supported by the
122 These are typical usages of the
126 # service sshd restart
131 $ service -v inetd status
132 inetd is located in /etc/rc.d
133 inetd is running as pid 1713.
136 $ service -ve ccd motd hostapd my_pkg
137 rc_directories is /etc/rc.d /usr/pkg/etc/rc.d
139 /usr/pkg/etc/rc.d/my_pkg
145 was apparently left disabled and the additional directory
146 .Pa /usr/pkg/etc/rc.d
147 was configured by redefining the variable
153 must have also been set.
161 utility first appeared in
168 .An Douglas Barton Aq Mt dougb@FreeBSD.org .
170 Adapted and extended to
173 .An Adrian Steinmann Aq Mt ast@marabu.ch .