|/
|\ISS LINUX™

News (20210723a)
Blog
Install
FAQ
Wiki
Package System
Package Manager
Testimonials
Screenshots
Contact
Donate
Archive
wiki / init / sysmgr                                              Edit this page
Edited (4f18dd0) at 2023-07-07 by Dylan Araps
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                                                            |
|                                                                              |
+------------------------------------------------------------------------------+
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                                                                       |
|                                                                              |
+------------------------------------------------------------------------------+
________________________________________________________________________________
Dylan Araps (C) 2019-2021
The registered trademark Linux(R) is used pursuant to a sublicense from the
Linux Foundation, the exclusive licensee of Linus Torvalds, owner of the mark
on a world­wide basis.