NAME

svc - Service controller for App::Sv

SYNOPSIS

# Make sure you export SV_HOME or SV_CONFIG
$ 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'
    restart_delay: 1
    start_retries: 5
    umask: 027
    user: www
    group: www
    
$ svc down x

DESCRIPTION

The svc command is a service controller for App::Sv.

It connects to the server's socket, issues the commands supplied as its arguments and displays the server's response.

ARGUMENTS

The script accepts the following arguments.

status [service]

Requests a status about the service, showing its name, state, PID and uptime. When called without arguments it displays a status for all the services.

up <service>

Starts the specified service. If it stops, restart it.

once <service>

Starts the specified service. Do not restart it if it stops.

down <service>

If the service is running, send it the TERM signal. After it stops do not restart it.

pause|cont|hup|alarm|int|quit|usr1|usr2|term|kill <service>

If the service is running, send it the STOP, CONT, HUP, ALRM, INT, QUIT, USR1, USR2, TERM, or KILL signal respectively.

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.

ENVIRONMENT

SV_HOME

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

SV_CONF

The full path to the supervisor's configuration file.

SEE ALSO

App::Sv