User:Stevelitt/sandbox

https://git.skarnet.org/cgi-bin/cgit.cgi/s6/

s6 is an init system and process supervisor for Unix-like operating systems. s6 initializes, supervises, and ends processes throughout the operating system. As a supervision system, s6 is in the same category as Runit, Daemontools, Daemontools Encore, and Perp. Like the preceding and OpenRC and systemd, s6 features parallelization of the start up of system services, which can speed up the boot time of the operating system.

s6 is a package manager based option on several Linux distributions, including Debian, Funtoo and Gentoo.

Design
s6 focuses on being a small, modular, and portable codebase, but not so small as to sacrifice popular features, including:


 * Parallel instantiation of services.
 * Ability to run as a process supervisor or full fledged init.
 * Ability to mix long run (respawning) and one-time processes (with addition of s6-rc |s6-rc).
 * Process ordering on bootup (with addition of s6-rc).
 * The useful parts of socket activation.

s6 is designed to operate in three distinct stages:


 * Stage 1: One time actions and configuration to bring up the OS at boot.
 * Stage 2: Process supervision. s6 remains in Stage2 once the computer is up and booted, until a reboot or shutdown begins.
 * Stage 3: Shutting down or rebooting the computer.

If s6 is used only as a process supervisor, only its Stage 2 is used.

Usage
s6 can be used either as a full fledged init system, or as a process supervisor used with another init system such as sysvinit, systemd, runit, and OpenRC. To use s6 as a process supervisor on sysvinit or OpenRC initted systems, include a respawn line for it in /etc/inittab. To use it as a process supervisor on systemd initted systems, include a unit file for it.

To use s6 as a full init system, compile, install and configure all of it, and set your bootloader to run s6's provided PID1 starter. To gain all of s6's features, highly advisable to also install and configure s6-rc.