Release 0.7.0.0 of the s6-rc service manager has been published. It is designed to manage the launch of initialization scripts and services. It supports dependency tree tracking and automatic service startup or shutdown to achieve a specified state. The s6-rc toolkit can be used both in initialization systems and to organize the launch of arbitrary services based on events reflecting system state changes. The system supports initialization scripts compatible with sysv-init and can import dependency information from sysv-rc or OpenRC. The code is written in C and distributed under the ISC license.
The s6-rc service manager includes a set of utilities for starting and stopping long-running processes (daemons) or immediately terminated initialization scripts. During operation, parallel launch of non-intersecting services is ensured and a repeating sequence of script execution is guaranteed for different launches. All state changes are processed taking into account dependencies, for example, when a service is started, the dependencies necessary for its operation will be automatically started, and when stopped, the dependent services will also be stopped.
Unlike other service managers, s6-rc supports proactive (offline) construction of a dependency graph for an existing set of services, which allows performing resource-intensive dependency analysis separately, rather than during loading or state changes. At the same time, the system is not monolithic and is divided into a series of separate and replaceable modules, each of which, in accordance with the Unix philosophy, solves only a specific task. The s6-rc project adheres to the philosophy of minimalism (it does not contain anything unnecessary) and consumes a minimum of resources.
Instead of runlevels, s6-rc uses the concept of bundles, allowing services to be grouped according to arbitrary criteria and tasks. To improve efficiency, a compiled dependency database is used, created by the s6-rc-compile utility based on the contents of directories containing service start/stop files. The s6-rc-db and s6-rc-update utilities are provided for parsing and manipulating the database. The s6 toolchain is used in the Obarun, Adelie, and Artix distributions, and can also be optionally used in Gentoo, Void, and Alpine.
The project also develops accompanying packages that complement s6-rc:
- s6 is a utility for monitoring and managing processes (similar to daemontools and runit). It supports features such as restarting processes after their abnormal termination, starting a handler (service activation) when a network port is accessed, event logging (a replacement for syslogd), and controlled granting of additional privileges (similar to sudo).
- s6-linux-init — an implementation of the init process for kernel-based operating systems Linux, used to create init systems that use the s6 and s6-rc packages to manage services and scripts.
- s6-networking is a set of utilities for creating network services, similar to ucspi.
- s6-frontend - A wrapper to recreate daemontools and runit functionality on top of s6.
- s6-portable-utils is a set of generic Unix utilities such as cut, chmod, ls, sort, and grep optimized for minimal resource consumption and released under an ISC license.
- s6-linux-utils - a set of utilities tied to Linuxsuch as chroot, freeramdisk, logwatch, mount and swapon.
- mdevd is an event manager (similar to udevd) designed to handle hotplugging of devices. mdevd is configuration-compatible with Busybox's mdev.
- bcnm is a network configurator with capabilities for configuring Wi-Fi on the client side.
- execline is a scripting language.
- skalibs is a library for creating secure system applications in the C language.
- s6-dns is a set of client libraries and utilities that replace typical DNS utilities from BIND and djbdns.
- dnsfunnel - redirects local DNS requests to an external one server (DNS forwarder).
- shibari is a simple DNS server.
- tipidee is an HTTP server with HTTP/1.1 support.
In the new version of s6-rc and related utilities:
- The "s6-rc reload" command has been implemented to restart long-running services.
- Added a reload-signal control file that defines the signal sent to the process to restart (default is SIGHUP).
- The s6-rc-bundle utility has been removed - changing bundles without recompiling is no longer supported.
- A new format for the internal database has been proposed (updating requires recompilation and running the s6-rc-format-upgrade utility.
- Correct handling of the situation of restarting the s6-rc-init utility for service initialization has been ensured, and the handling of system failures has been improved.
- The s6-rc-set-change utility has been updated with the following options: -I/-i to display a warning or fail with an error when a conflicting dependency is detected; -P/-p to disable/enable automatic resolution of dependency conflicts when service states change.
- Removed deprecated "-f" option.
- The s6 utility now has the s6-svscanboot command to redirect s6-svscan supervisor logs to s6-log when it is not running under PID 1.
- Implemented the "s6-svc -l" option to send a signal for restart.
- The s6-frontend user interface now supports the following options and commands: "s6 --user" (for working with user services), "s6 live reset", "s6 apply", "s6 enable|disable|start|stop|kill|apply", "s6 live stop --clean".
- The tipidee HTTP server now supports FastCGI and adds the cgi_pass_authorization option.
Source: opennet.ru
