Repository navigation
Expand file tree
/
Copy pathconfig.h
More file actions
42 lines (34 loc) · 1.96 KB
/
Copy pathconfig.h
File metadata and controls
42 lines (34 loc) · 1.96 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
/* hsm configuration.
* Paths starting with '/' are absolute; anything else is relative to $HOME. */
#ifndef HSM_VERSION
#define HSM_VERSION "dev" /* the makefile injects `git describe` here */
#endif
/* a user's hsmd supervises that user's session services */
static const char svdir[] = ".config/hsm/sv"; /* one subdir per service */
static const char sockpath[] = ".config/hsm/hsm.sock"; /* control socket */
/* root's hsmd supervises the system: runit's /var/service contract, so it
* can replace runsvdir as runit's stage 2 or run as pid 1 outright */
static const char sys_svdir[] = "/var/service";
static const char sys_sockpath[] = "/run/hsm.sock";
static const char sys_logdir[] = "/var/log/hsm"; /* <name>/log per service */
/* as pid 1, hsmd runs bootscript before supervising (mount, udev, fsck...)
* and shutdownscript after every service is down, with the pending
* action - poweroff, reboot or halt - as its argument */
static const char bootscript[] = "/etc/hsm/boot";
static const char shutdownscript[] = "/etc/hsm/shutdown";
/* runit's shutdown protocol, honoured as pid 1: "runit-init 0|6" (which is
* what Void's halt/poweroff/reboot/shutdown end up running) flips the
* execute bit on stopit - and on rebootflag for a reboot - then sends pid 1
* SIGCONT. Both are usually symlinks into /run; runit-init creates them. */
static const char stopit[] = "/etc/runit/stopit";
static const char rebootflag[] = "/etc/runit/reboot";
static const int throttle =
1; /* min seconds between restarts of a crashing service */
static const int killwait = 7; /* seconds after SIGTERM before SIGKILL */
static const int checkwait =
7; /* seconds "hsm check NAME" waits for the service to come up */
static const long logsize =
1 << 20; /* rotate a service log past this many bytes */
static const int logkeep = 3; /* rotated logs to keep (log.0 is the newest) */
#define MAXSV 64 /* max supervised services */
#define NAMEMAX 64 /* max service name length */