simplevisor-control - Man Page

run simplevisor as a service

Synopsis

simplevisor-control command [path]

Description

The simplevisor-control script can be used to run simplevisor as a service.

If this script is used the pidfile value specified in the simplevisor configuration file will be ignored.

Options

command run “simplevisor-control help” to list the available commands

path look at simplevisor man page for path behavior.

Examples

On Linux you can look at the script shipped in the examples folder which is called simplevisor-new-instance, it creates folders and the configuration to run a simplevisor instance.

    mkdir -p /var/lib/myinstance/bin
    mkdir -p /var/lib/myinstance/data
    mkdir -p /var/lib/myinstance/etc

Create a file /var/lib/myinstance/bin/service with content and make it executable:

    #!/bin/sh
    #
    # init script that can be symlinked from /etc/init.d
    #
    
    # chkconfig: - 90 15
    # description: my simplevisor instance
    
    . "/var/lib/myinstance/etc/simplevisor.profile"
    exec "/usr/bin/simplevisor-control" ${1+"$@"}

/var/lib/myinstance/etc/simplevisor.profile could look like:

    # main
    export SIMPLEVISOR_NAME=myinstance
    # if you want to run it as another user:
    #export SIMPLEVISOR_USER=games
    export SIMPLEVISOR_CONF=/var/lib/myinstance/etc/simplevisor.conf
    export SIMPLEVISOR_PIDFILE=/var/lib/myinstance/data/simplevisor.pid
    export SIMPLEVISOR_LOCKFILE=/var/lib/myinstance/data/simplevisor.lock

Create /var/lib/myinstance/etc/simplevisor.conf according to simplevisor documentation.

For Red Hat or Fedora you can symlink service script:

    ln -s /var/lib/myinstance/bin/service /etc/init.d/myinstance

And use it as a normal service:

    /sbin/service myinstance start|stop|status|restart|check

Author

Massimo Paladin <massimo.paladin@gmail.com>

Copyright (C) CERN 2013-2021

Info

2019-08-23 simplevisor-control man page