The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

svd - Supervisor daemon for App::Sv

SYNOPSIS

    # Read commands from a config file
    $ cat sv.yml
    ---
    global:
      listen: unix/:/tmp/sv.sock
      daemon: 0
      umask: 077
    run:
      x: 'plackup -p 3010 ./sites/x/app.psgi'
      y:
        cmd: 'plackup -p 3011 ./sites/y/app.psgi'
        start_retries: 5
        restart_delay: 1
        umask: 027
        user: www
        group: www
        
    $ svd -c sv.yml
    

DESCRIPTION

The svd command is a supervisor daemon for App::Sv.

It reads a list of commands to execute from a YAML config file and starts each one, and then monitors their execution. If one of the program dies, the supervisor will restart it after a preset delay.

You can restart the supervised process with Ctrl-C. If you hit Ctrl-C again before the supervised process restart, the supervisor will exit. This allows you to use one tap of Ctrl-C to restart, and a double tap to exit.

ARGUMENTS

The script accepts no arguments on the command line.

OPTIONS

The script accept the follwoing command line options.

-c config_file

Specify the configuration file to read. If this isn't specified, the script searches $ENV{SV_CONFIG}, $ENV{SV_HOME}/sv.yml and $ENV{HOME}/.sv/sv.yml or dies upon failure to find a valid configuration file in one of those places.

-d

Run as a daemon. This can be also specified in the global section of the configuration file via the daemon option (boolean).

ENVIRONMENT

SV_DEBUG

If set to a true value, the supervisor will show debug information.

SV_HOME

Specifies the default home directory where svd searches for the config file.

SV_CONF

The config file for the supervisor.

SEE ALSO

App::Sv