-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathapphub.8
More file actions
63 lines (61 loc) · 2.04 KB
/
apphub.8
File metadata and controls
63 lines (61 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
.TH apphub 8
'''
.SH NAME
\fBapphub\fR \- generic application supervisor
'''
.SH DESCRIPTION
This service spawns applications on user's request. It is meant primarily
for GUI applications, but can handle pretty much anything that does not
require user input from stdin or open TTY on stdout.
.P
\fBapphub\fR is a regular service that should be started during system boot.
'''
.SH USAGE
Applications to be spawned by \fBapphub\fR are defined by executable files
in /etc/apphub/. The base name of the file is what needs to be passed to
\fBappctl\fR in order to spawn the script. When commanded to do so,
\fBapphub\fR execs the script in a newly spawned process.
.P
Sample script, /etc/apphub/foo:
.P
.ni
#!/sbin/msh
setenv PATH /usr/bin
setuid foo:apps
invoke /usr/bin/xbigapp
.fi
.P
Application defined by this script can them be started using
.P
.ni
appctl start foo
.fi
.P
Spawned applications get their arguments and environment from \fBappctl\fR.
.P
The scripts inherit credentials from the parent \fBapphub\fR process, which
typically means root uid and full capabilities. It is up to the script to limit
capabilities, set uid and groups, and otherwise set up process environment.
.P
Applications are expected to not take any input from stdin, and to not output
anything to either stdout or stderr during normal operations. In the spawned
process, all three standard file descriptors (0, 1, 2) point to the write end
of a pipe; \fBapphub\fR reads the other end of the pipe into a ring buffer,
and lets the user inspect its contents. The collected output is only meant to
be used for troubleshooting misbehaving applications, it is not supposed to be
a part of normal operations.
.P
The name of the script may be chosen arbitrarily. It is perfectly fine to have
several scripts exec the same executable, possibly with different options or
environment settings.
.P
Applications may exit at will, and generally are expected to do so.
'''
.SH FILES
.IP "/run/ctrl/apphub" 4
Control socket.
.IP "/etc/apphub" 4
Configuration directory.
'''
.SH SEE ALSO
\fBappctl\fR(1).