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
|
Managing services with SYSMGR
________________________________________________________________________________
sysmgr is an alternative service supervisor written in POSIX sh. It is similar
in usage to runit.
Installation
________________________________________________________________________________
Begin by first verifying that you have sysmgr installed.
+------------------------------------------------------------------------------+
| |
| # Available in the Community repository. |
| $ kiss b sysmgr && kiss i sysmgr |
| |
+------------------------------------------------------------------------------+
Basic usage
________________________________________________________________________________
As mentioned above, the usage of sysmgr is similar to runit.
+---------+--------------------------------------------------------------------+
| Action | Command |
+---------+--------------------------------------------------------------------+
| List | $ ls /etc/sysmgr/ |
| | |
| Enable | $ ln -s /etc/sysmgr/SERVICE_NAME /var/sysmgr |
| Disable | $ unlink /var/sysmgr/SERVICE_NAME |
| | |
| Stop | $ svctl stop SERVICE_NAME |
| Start | $ svctl start SERVICE_NAME |
| | |
+---------+--------------------------------------------------------------------+
See svctl(1) for more usage information.
Running sysmgr on startup
________________________________________________________________________________
sysmgr can be run at boot via /etc/inittab or a hook in /etc/rc.d.
+------------------------------------------------------------------------------+
| Enabling on inittab |
+------------------------------------------------------------------------------+
| |
| ::respawn:/usr/bin/sysmgr |
| |
+------------------------------------------------------------------------------+
| Enabling from /etc/rc.d/sysmgr.boot |
+------------------------------------------------------------------------------+
| |
| while :; do /usr/bin/sysmgr; done & |
| |
+------------------------------------------------------------------------------+
Switching from runit
________________________________________________________________________________
In order to switch from runit to sysmgr, copy the contents of the /var/service
directory to /var/sysmgr, and the same for /etc/sv to /etc/sysmgr.
+------------------------------------------------------------------------------+
| Create the service directory for sysmgr |
+------------------------------------------------------------------------------+
| |
| $ mkdir -p /etc/sysmgr |
| |
+------------------------------------------------------------------------------+
| Copy runit services |
+------------------------------------------------------------------------------+
| |
| for service in /etc/sv/*; do |
| cp "$service/run" "/etc/sysmgr/${service##*/}" |
| done |
| |
+------------------------------------------------------------------------------+
| Copy all enabled services |
+------------------------------------------------------------------------------+
| |
| for service in /var/service/*; do |
| ln -sf /etc/sysmgr/${service##*/} /var/sysmgr |
| done |
| |
+------------------------------------------------------------------------------+
|