]>
Commit | Line | Data |
---|---|---|
e91b9f68 A |
1 | .Dd September 30, 2004 |
2 | .Dt launchctl 1 | |
3 | .Os Darwin | |
4 | .Sh NAME | |
5 | .Nm launchctl | |
6 | .Nd Interfaces with launchd | |
7 | .Sh SYNOPSIS | |
8 | .Nm | |
9 | .Op Ar subcommand Op Ar arguments ... | |
10 | .Sh DESCRIPTION | |
11 | .Nm | |
12 | interfaces with | |
13 | .Nm launchd | |
14 | to load, unload daemons/agents and generally control | |
15 | .Nm launchd . | |
16 | .Nm | |
17 | supports taking subcommands on the command line, interactively or even redirected from standard input. | |
18 | These commands can be stored in | |
19 | .Nm $HOME/.launchd.conf | |
20 | or | |
21 | .Nm /etc/launchd.conf | |
22 | to be read at the time | |
23 | .Nm launchd | |
24 | starts. | |
25 | .Sh SUBCOMMANDS | |
26 | .Bl -tag -width -indent | |
ab36757d | 27 | .It Xo Ar load Op Fl wF |
e91b9f68 A |
28 | .Ar paths ... |
29 | .Xc | |
30 | Load the specified configuration files or directories of configuration files. | |
31 | .Bl -tag -width -indent | |
32 | .It Fl w | |
33 | Remove the disabled key and write the configuration files back out to disk. | |
ab36757d A |
34 | .It Fl F |
35 | Force the loading of the plist. Ignore the Disabled key. | |
e91b9f68 A |
36 | .El |
37 | .It Xo Ar unload Op Fl w | |
38 | .Ar paths ... | |
39 | .Xc | |
40 | Unload the specified configuration files or directories of configuration files. | |
41 | .Bl -tag -width -indent | |
42 | .It Fl w | |
43 | Add the disabled key and write the configuration files back out to disk. | |
44 | .El | |
45 | .It Ar start Ar joblabels ... | |
46 | Start the specified jobs by label. | |
47 | .It Ar stop Ar joblabels ... | |
48 | Stop the specified jobs by label. Jobs may restart automatically if demand driven. | |
49 | .It Ar list | |
50 | List all of the jobs loaded into | |
51 | .Nm launchd . | |
52 | .It Ar setenv Ar key Ar value | |
53 | Set an environmental variable inside of | |
54 | .Nm launchd . | |
55 | .It Ar unsetenv Ar key | |
56 | Unset an environmental variable inside of | |
57 | .Nm launchd . | |
58 | .It Ar getenv Ar key | |
59 | Get an environmental variable inside of | |
60 | .Nm launchd . | |
61 | .It Ar export | |
62 | Export all of the environmental variables of | |
63 | .Nm launchd | |
64 | for use in a shell eval statement. | |
65 | .It Ar getrusage self | children | |
66 | Get the resource utilization statistics for | |
67 | .Nm launchd | |
68 | or the children of | |
69 | .Nm launchd . | |
70 | .It Xo Ar log | |
71 | .Op Ar level loglevel | |
72 | .Op Ar only | mask loglevels... | |
73 | .Xc | |
74 | Get and set the | |
75 | .Xr syslog 3 | |
76 | log level mask. The available log levels are: debug, info, notice, warning, error, critical, alert and emergency. | |
77 | .It Xo Ar limit | |
78 | .Op Ar cpu | filesize | data | stack | core | rss | memlock | maxproc | maxfiles | |
79 | .Op Ar both Op Ar soft | hard | |
80 | .Xc | |
81 | With no arguments, this command prints all the resource limits of | |
82 | .Nm launchd | |
83 | as found via | |
84 | .Xr getrlimit 2 . | |
85 | When a given resource is specified, it prints the limits for that resource. | |
86 | With a third argument, it sets both the hard and soft limits to that value. | |
87 | With four arguments, the third and forth argument represent the soft and hard limits respectively. | |
88 | See | |
89 | .Xr setrlimit 2 . | |
90 | .It Ar stdout path | |
91 | Set the standard out file descriptor to the given path. | |
92 | .Nm launchd | |
93 | .It Ar stderr path | |
94 | Set the standard error file descriptor to the given path. | |
95 | .Nm launchd | |
96 | .It Ar shutdown | |
97 | Tell | |
98 | .Nm launchd | |
99 | to prepare for shutdown by removing all jobs. | |
100 | .It Ar reloadttys | |
101 | Tell | |
102 | .Nm launchd | |
103 | to reread /etc/ttys. This option may go away in a future release. | |
104 | .It Ar umask Op Ar newmask | |
105 | Get or optionally set the | |
106 | .Xr umask 2 | |
107 | of | |
108 | .Nm launchd . | |
109 | .It Ar help | |
110 | Print out a quick usage statement. | |
111 | .El | |
ab36757d A |
112 | .Sh ENVIRONMENTAL VARIABLES |
113 | .Bl -tag -width -indent | |
114 | .It Pa LAUNCHD_SOCKET | |
115 | This variable informs launchctl how to find the correct launchd to talk to. If it is missing, launchctl will use a built-in default. | |
116 | .El | |
e91b9f68 A |
117 | .Sh FILES |
118 | .Bl -tag -width "/System/Library/LaunchDaemons" -compact | |
119 | .It Pa ~/Library/LaunchAgents | |
120 | Per-user agents provided by the user. | |
121 | .It Pa /Library/LaunchAgents | |
122 | Per-user agents provided by the administrator. | |
123 | .It Pa /Library/LaunchDaemons | |
124 | System wide daemons provided by the administrator. | |
125 | .It Pa /System/Library/LaunchAgents | |
126 | Mac OS X Per-user agents. | |
127 | .It Pa /System/Library/LaunchDaemons | |
128 | Mac OS X System wide daemons. | |
129 | .El | |
130 | .Sh SEE ALSO | |
131 | .Xr launchd.plist 5 , | |
132 | .Xr launchd.conf 5 , | |
133 | .Xr launchd 8 |