Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
NITRO(8)		     System Manager's Manual			NITRO(8)

NAME
     nitro -- a tiny but flexible init system and process supervisior

SYNOPSIS
     nitro [dir]

DESCRIPTION
     nitro is a service supervisor that can be used as a Unix init system.

     Every directory inside dir (by default: /etc/nitro) defines a service.

     When  used as init, and the argument dir is `S' or `single', nitro looks at
     the directory /etc/nitro.single instead.  This can be used to boot  into  a
     special single-user mode.

SERVICE DIRECTORIES
     Service  directories  must  have a name shorter than 64 characters and must
     not contain `,' or newlines in the file name.  Service  directories  cannot
     be nested.

     Service directories can contain the following files:

     setup   If  it  exists,  this  script is run when starting the service, the
	     service enters state SETUP.  When setup exits with status 111,  the
	     service  enters  state  FATAL.   When setup exits with state 0, the
	     service progresses to state STARTING.  Else, setup is restarted af-
	     ter a delay.

     run     If it exists, this script should exec into the  service.	If  this
	     file  does  not  exist, the service is a ONESHOT.	When the service
	     does not exit for 2 seconds, it enters state UP.

     log     If this is a symlink to another  service  directory,  the	standard
	     output  of  the  service  is connected to the standard input of the
	     target service using a pipe.

     finish  After the service has exited, this script is  run	with  two  argu-
	     ments, the exit status of the service and the signal if the service
	     exited due to a signal.  Then, the service enters state DOWN.

     down    If this file exists, the service is not brought up automatically.

     down-signal
	     If  this  file exists, the first character of it encodes the signal
	     (see nitroctl(1)) that is sent to the service  to	bring  it  down,
	     else SIGTERM.

ENVIRONMENT
     NITRO_SOCK
	     The  control  socket  (by default: /var/run/nitro/nitro.sock) where
	     nitro listens for commands sent by nitroctl(1).

FILES
     The following special files are used inside the service directory:

     SYS/setup
	     This script is run very early in  boot,  before  all  services  are
	     started.  It can already start services using nitroctl(1).

     SYS/finish
	     When system shutdown is requested, this script is run.  When it ex-
	     its, the remaining services are brought down.

     SYS/reincarnate
	     If  this script exists, nitro execs into it instead of rebooting or
	     shutting down.

     SYS/final
	     This script is run after all services are stopped.  When it  exits,
	     the  root	file  system is remounted read-only and the system shuts
	     down/reboots.

EXIT STATUS
     nitro tries hard not to exit, being used as pid 1.

SEE ALSO
     nitroctl(1)

AUTHORS
     Leah Neukirchen <leah@vuxu.org>

FreeBSD ports 15.quarterly	 August 27, 2025			NITRO(8)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=nitro&sektion=8&manpath=FreeBSD+Ports+15.1.quarterly>

home | help