View | Details | Raw Unified | Return to bug 228552
Collapse All | Expand All

(-)usr.sbin/service/service.8 (-23 / +38 lines)
Lines 32-50 Link Here
32
.Nd "control (start/stop/etc.) or list system services"
32
.Nd "control (start/stop/etc.) or list system services"
33
.Sh SYNOPSIS
33
.Sh SYNOPSIS
34
.Nm
34
.Nm
35
.Op Fl j Ao jail name or id Ac
35
.Op Fl j Ar jail
36
.Fl e
36
.Fl e
37
.Nm
37
.Nm
38
.Op Fl j Ao jail name or id Ac
38
.Op Fl j Ar jail
39
.Fl R
39
.Fl R
40
.Nm
40
.Nm
41
.Op Fl j Ao jail name or id Ac
41
.Op Fl j Ar jail
42
.Op Fl v
42
.Op Fl v
43
.Fl l | r
43
.Fl l
44
.Nm
44
.Nm
45
.Op Fl j Ao jail name or id Ac
45
.Op Fl j Ar jail
46
.Op Fl v
46
.Op Fl v
47
.Ar <rc.d script> start|stop|etc.
47
.Fl r
48
.Nm
49
.Op Fl j Ar jail
50
.Op Fl v
51
.Ar script
52
.Ar command
48
.Sh DESCRIPTION
53
.Sh DESCRIPTION
49
The
54
The
50
.Nm
55
.Nm
Lines 52-65 command is an easy interface to the rc.d system. Link Here
52
Its primary purpose is to start and stop services provided
57
Its primary purpose is to start and stop services provided
53
by the rc.d scripts.
58
by the rc.d scripts.
54
When used for this purpose it will set the same restricted
59
When used for this purpose it will set the same restricted
55
environment that is in use at boot time (see below).
60
environment that is in use at boot time
61
.Po
62
see
63
.Sx ENVIRONMENT
64
.Pc .
56
It can also be used to list
65
It can also be used to list
57
the scripts using various criteria.
66
the scripts using various criteria.
58
.Pp
67
.Pp
59
The options are as follows:
68
The options are as follows:
60
.Bl -tag -width F1
69
.Bl -tag -width F1
61
.It Fl j Ao jail name or id Ac
62
Perform the given actions under the named jail.
63
.It Fl e
70
.It Fl e
64
List services that are enabled.
71
List services that are enabled.
65
The list of scripts to check is compiled using
72
The list of scripts to check is compiled using
Lines 70-77 then that list of scripts is checked for an Link Here
70
.Qq rcvar
77
.Qq rcvar
71
assignment.
78
assignment.
72
If present the script is checked to see if it is enabled.
79
If present the script is checked to see if it is enabled.
73
.It Fl R
80
.It Fl j Ar jail
74
Restart all enabled local services.
81
Perform the given actions under the named jail.
82
The
83
.Ar jail
84
argument can be either a jail ID or a jail name.
75
.It Fl l
85
.It Fl l
76
List all files in
86
List all files in
77
.Pa /etc/rc.d
87
.Pa /etc/rc.d
Lines 88-95 Generate the Link Here
88
as in
98
as in
89
.Fl e
99
.Fl e
90
above, but list all of the files, not just what is enabled.
100
above, but list all of the files, not just what is enabled.
101
.It Fl R
102
Restart all enabled local services.
91
.It Fl v
103
.It Fl v
92
Be slightly more verbose
104
Be slightly more verbose.
93
.El
105
.El
94
.Sh ENVIRONMENT
106
.Sh ENVIRONMENT
95
When used to run rc.d scripts the
107
When used to run rc.d scripts the
Lines 111-131 at boot time. Link Here
111
The following are examples of typical usage of the
123
The following are examples of typical usage of the
112
.Nm
124
.Nm
113
command:
125
command:
114
.Pp
126
.Bd -literal -offset -ident
115
.Dl "service named status"
127
service named status
116
.Dl "service -j dns named status"
128
service -j dns named status
117
.Dl "service -rv"
129
service -rv
130
.Ed
118
.Pp
131
.Pp
119
The following programmable completion entry can be use in
132
The following programmable completion entry can be use in
120
.Xr bash 1
133
.Xr bash 1
121
for the names of the rc.d scripts:
134
for the names of the rc.d scripts:
122
.Dl "_service () {"
135
.Bd -literal -offset -ident
123
.Dl "	local cur"
136
_service () {
124
.Dl "	cur=${COMP_WORDS[COMP_CWORD]}"
137
	local cur
125
.Dl "	COMPREPLY=( $( compgen -W '$( service -l )' -- $cur ) )"
138
	cur=${COMP_WORDS[COMP_CWORD]}
126
.Dl "	return 0"
139
	COMPREPLY=( $( compgen -W '$( service -l )' -- $cur ) )
127
.Dl "}"
140
	return 0
128
.Dl "complete -F _service service"
141
}
142
complete -F _service service
143
.Ed
129
.Sh SEE ALSO
144
.Sh SEE ALSO
130
.Xr bash 1 Pq Pa ports/shells/bash ,
145
.Xr bash 1 Pq Pa ports/shells/bash ,
131
.Xr rc.conf 5 ,
146
.Xr rc.conf 5 ,

Return to bug 228552