Service Management and Init
Init system
The Micro and MicroServer ISO flavors are using runit as init system. For ease of use, a very simple helper is provided, and can be used as follows:
List available services
|
|
Start a service
|
|
Stop a service
|
|
Enable a service on boot
|
|
Disable a service from booting on startup
|
|
Boot scripts
It’s possible to add scripts to be executed during boot execution, under /etc/runit/core-services/*.sh.
For example:
|
|
Yip Integration
Mocaccino Micro can be configured to execute yipfiles during different stages.
|
|
To start the yip service:
|
|
To Enable yip on boot:
|
|
Yip files running periodically
The yip service runs periodically yip files in /etc/yip.d, /etc/yip.yaml and from the boot cmdline on the system.
For example, by creating a yip file as /etc/yip.d/sshd.yaml:
|
|
yip will make sure and keep sshd configured.
There are two stages currently supported: reconcile and boot. The boot yip stage is run at start, during runit initialization, while the reconcile is called periodically. You can also run yip-reconcile to trigger the execution manually.
For more information about yip, check here. To see a sample /etc/yip.d control-repo check here.
Specifying yip files from boot
It is also possible to use yip to automatically configure the system from boot.
Add yip=... to the boot command lines to specify the yip file to execute across the stages (can be a path to a local file, or either a URL)