Module: RunitCommandHelper

Defined in:
lib/runit_command_helper.rb

Overview

This module provides a facade to allow signals to be set to runit managed service directories from Capistrano. It uses the sv_command variable to decide which command to run on the server and currently supports both sv and runsvctrl.

The :sv_command variable can be set to :sv or :runsvctrl to choose.

The supported signals are shown in the SIGNALS constant below.

Usage examples:

  • sv.usr2 "/path/to/service/dir"
  • sv.down ["foo1", "foo2"]

As daemontools is very similar, support for that will be added at a later date.

The methods are available through sv. in your deploy.rb

Constant Summary collapse

SIGNALS =
%w(up down once pause cont hup alarm interrupt quit usr1 usr2 term kill status)