Init scripts

Init scripts should be installed into /etc/init.d using the doinitd or newinitd functions (see Install functions reference). Any configuration (commandline parameters or environment variables) for these scripts should be handled via entries in /etc/conf.d with the same filename — doconfd or newconfd can be used to install these.

Please note that unlike ebuilds, init scripts for OpenRC are expected to be POSIX-compliant and must therefore avoid e.g. Bash-specific tests and constructs.

An overview of the Gentoo init system and how to write init scripts is available in the Writing Init Scripts section and in the OpenRC documentation.