initctldebug
Toggle finit (daemon) debug to /dev/consoleinitctlhelp
Show built-in help text.
initctlversion
Show program version.
initctlls | list
List all *.conf files in /etc/finit.dinitctlcreateCONF
Create .conf in /etc/finit.d/available.
Piping the contents into initctl works as one would expect:
echo "task name:foo /tmp/foo.sh -- Foo logger" | initctl create foo
initctl enable foo
initctl reload
initctldeleteCONF
Delete .conf in /etc/finit.d/availableinitctlshowCONF
Show .conf in /etc/finit.d/availableinitctleditCONF
Edit .conf in /etc/finit.d/availableinitctltouchCONF
Change (mark as modified) .conf in /etc/finit.d/available, like edit this tells finit that a
configuration has been changed and is a candidate to be restarted (or SIGHUP'ed) on initctlreloadinitctlenableCONF
Enable .conf in /etc/finit.d/available, i.e., add symlink in /etc/finit.d/enabledinitctldisableCONF
Disable .conf in /etc/finit.d/enabled, i.e., removes symlink.
initctlreload
Reload *.confin/etc/finit.d, i.e., activates changes.
initctlcondsetCOND [COND ...]
Set (assert) user-defined condition, +usr/CONDinitctlcondgetCOND
Get (quietly) the status of any condition. Defaults to user-defined condions, but if a slash is
detected, e.g., pid/foo or net/eth0/exist, then any condition can be read.
The command is geared for scripting, check the exit code to get the status of the condition: 0 -
on, 1 - off, 255 - flux. For a more verbose output, use the -v option.
initctlcondclr | clearCOND [COND ...]
Clear (deassert) user-defined condition, -usr/CONDinitctlcondstatus
Show condition status, default cond command. Also supports the -j option for detailed JSON
output.
initctlconddump [TYPE]
Dump all, or a given type of, conditions and their status. Also supports the -j option for
detailed JSON output.
initctlident [NAME]
Display indentities of all run/task/services, or only instances matching NAME. A partial string,
e.g., NAM, will not match anything.
initctllog [NAME]
Show ten last Finit, or NAME, messages from syslog.
initctlstartNAME[:ID]
Start service by name, with optional ID, e.g., initctlstarttty:1initctlstopNAME[:ID]
Stop/Pause a running service by name.
initctlreloadNAME[:ID]
Reload service as if its configuration had changed. Internally, finit marks the named service as
"dirty" and turns the state machine, resulting in a SIGHUP or restart of (at least) the named
service. Any dependant services are also restarted.
Note: no .conf file is reloaded with this variant of the command. Essentially it is the same as
calling restart. Except for two things:
1. if the service supports HUP, it's signaled instead of stop-started, and
2. it allows restarting run/task in the same runlevel -- which is otherwise restricted.
initctlsignalNAME:[ID]S
Send signal S to service, by name. S may be a complete signal name such as SIGHUP, or short name
such as HUP, or the signal number such as 1 (SIGHUP).
initctlrestartNAME[:ID]
Restart (stop/start) service by name.
initctlstatusNAME[:ID]
Show service status, by name. If only NAME is given and multiple instances exits, a summary of
all matching instances are shown. Only an exact match displays detailed status for a given
instance.
With the -q option this command is silent, provided the NAME[:ID] selection matches a single
run/task/service. The exit code of initctl is non-zero if there is a problem. Zero is returned
if a run/task has run (at least) once in the current runlevel, and when a service is running (as
expected). See the -j option for detailed JSON output suitable for machine parsing.
Tip:jq(1) is a useful scripting tool in combination with JSON output.
initctlstatus
Show status of all services, default command. Also supports the -j option for detailed JSON
output.
initctlcgroup
List cgroup config overview.
initctlps
List processes based on cgroups.
initctltop
Show top-like listing based on cgroups.
initctlplugins
List installed plugins.
initctlrunlevel [0-9]
Show or set runlevel: 0 halt, 6 reboot.
If called at boot (runlevel S) to set the runlevel, Finit only schedules the change, effectively
overriding the configured runlevel from /etc/finit.conf. Useful to trigger a fail-safe mode, or
similar.
initctlreboot
Reboot system, default if reboot is symlinked to initctl.
initctlhalt
Halt system, default if halt is symlinked to initctl.
initctlpoweroff
Power-off system, default if poweroff is symlinked to initctl.
initctlsuspend
Suspend system, default if suspend is symlinked to initctl.
initctlutmpshow
Raw dump of UTMP/WTMP db.