The GNU Shepherd system manager 1.0.0 (formerly dmd) has been introduced, combining the capabilities of an initialization system and tools for managing system services. Notably, the assignment of version number 1.0 after 21 years of development marks the recognition of the project's readiness and its alignment with the functional requirements of modern initialization systems and service managers.
The project is developed by the maintainers of the GNU Guix System distribution as an alternative to the SysV-init initialization system, supporting dependencies. The managing daemon and utility tools of Shepherd are written in Guile (one of the implementations of the Scheme language), which is also used to define the settings and launch parameters for services. Shepherd is already in use within the GNU Guix System distribution and aims for utilization in GNU/Hurd but can operate on any POSIX-compliant OS that has Guile available.
Shepherd handles the starting and stopping of services, taking into account the interdependencies between them, dynamically identifying and launching services on which the selected service depends. Shepherd also supports conflict resolution between services and prevents them from running simultaneously. The project can serve both as the primary initialization system (init with PID 1) and in a standalone manner for managing background processes of individual users (e.g., for running tor, privoxy, mcron, etc.) with execution under the authority of those users.
Key innovations in GNU Shepherd 1.0.0:
- Support has been added for services that periodically execute commands or code in Scheme in accordance with a specified schedule.
- The command 'herd status SERVICE' now displays high-level information about services, such as PID, command, and addresses for incoming network requests, as well as summaries of recently added log messages. Additionally, this command now shows applicable user actions for the service and informs about the availability of a replacement service that will be applied after the current service is restarted.
- The command 'herd status root' is no longer synonymous with 'herd status' and displays information about the root shepherd process.
- For Linux platforms, the ability to restart using the kexec mechanism ('reboot --kexec') has been provided for replacing the Linux kernel without a physical reboot.
- A log-rotation service has been added, responsible for the periodic rotation of logs and the removal of outdated logs.
- A system-log service has been added, which can be used as a replacement for the traditional syslogd system.
- A timer service has been added for executing commands at a specified time, similar to the 'at' utility. For example, 'herd schedule timer at 07:00 -- mpg123 alarm.mp3.'
- A transient service has been added for running commands in the background, similar to the systemd-run utility. For example, 'herd spawn transient -d $PWD -- make -j4.'
Source: opennet.ru
