-
Notifications
You must be signed in to change notification settings - Fork 2
/
daemon.conf.asciidoc
110 lines (82 loc) · 3.67 KB
/
daemon.conf.asciidoc
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
// -*- text -*-
daemon.conf(5)
==============
David Caldwell <david@porkrind.org>
NAME
----
daemon.conf - Daemon configuration file for Daemon Manager
SYNOPSIS
--------
# Example conf file:
start=exec ./daemon --flags # Line will be interpretted by /bin/sh
dir=/some/working/dir # working dir default: /
user=nobody # Who to run as default: the user
output=log # "log" or "discard" default: discard
autostart=no # "yes" or "no" default: yes
export VAR=value # Set env variable "VAR" to "value"
DESCRIPTION
-----------
This manual page describes the config files for daemons controlled by
'daemon-manager(1)'. The config files are loaded out of the user's home
directory: *'~/.daemon-manager/daemons'*. Root's config files are loaded from
*'/etc/daemon-manager/daemons'*. Only files with the suffix ``.conf'' will be
loaded.
The config files must not be world writable and must be owned by the user
whose home directory they are in.
Each config file describes a single daemon.
FILE FORMAT
-----------
The config file is a plain text file. The general format is
option = value
White space is stripped from around options and values.
Comments are stripped from lines before they are parsed. A comment starts with
a "#" and continues to the end of a line.
Blank lines are ignored.
Environment variables for the process can be set with the 'export' keyword:
export env_var = value
This resembles 'bash' but is not. In particular, quotes are not interpreted
in the config file, so don't put quotes around 'value' unless you want
literal quote characters in your environment variable.
There are three default environment variables: 'HOME', 'LOGNAME', and
'PATH'. Variables with the same name in the config file will override the
defaults.
CONFIGURATION OPTIONS
---------------------
*start*::
This is the line that will be fed to /bin/sh in order to start the
daemon. This option is required. The daemon is required to stay in the
foreground. If it tries to daemonize then 'daemon-manager(1)' will think it
has exited prematurely and will attempt to restart it. It is also a good idea
to use _sh_'s 'exec' built-in to jettison the shell while launching the
daemon.
*dir*::
This option specifies the working directory. The daemon will be started from
this directory. If the 'dir' option is not specified it defaults to ``/''.
*user*::
Use this option to specify which user the daemon should be run as. By default
users are only allowed to start daemons as themselves. The system
administrator can allow a user to run as another user by adding to the
'can_run_as' section of the 'daemon-manager.conf(5)' file. The 'HOME'
environment variable in the daemon's process will default to the specified
user's home directory, and 'LOGNAME' will default to the specified user's
login name.
*output*::
This option controls whether stdout and stderr from the daemon should be
logged or discarded.
+
The valid values for this option are ``log'' or ``discard'', with
``discard'' being the default if the option is not specified.
+
If the daemons have been configured with the 'output' option set to ``log''
then their stdout and stderr will be redirected to a log file in
``~/.daemon-manager/log/_<daemon>_.log'' where ``__<daemon>__'' is the basename of the
.conf file.
*autostart*::
If this option is ``yes'' or left unspecified then the daemon will be started
automatically when 'daemon-manager(5)' itself is started.
+
If this option is ``no'' then it will only be started by _dmctl(1)_'s
``start'' command.
SEE ALSO
--------
'daemon-manager(1)', 'daemon-manager.conf(5)', 'dmctl(1)'