oversip Command

NOTE: If there is an oversip package for your operating system you don’t need to directly use the oversip command. Instead use the init script provided by the package.

The Gem installs an executable called oversip whose location depends on the operating system. In some operating systems (i.e. Debian) the location of the executable files provided by Ruby Gems are not in the default PATH and thus cannot be directly executed by invoking oversip in a shell. In some other operating systems (i.e. Ubuntu) those executable files are stored in /usr/bin/ or /usr/local/bin/ directories (usually included in the default PATH enviroment variable).

  • To get the exact location of the oversip command (regardless your operating system) run the following command:
oversip_bin_path="$(dirname $(gem which oversip))/../bin"
ls ${oversip_bin_path}/oversip
#=> /var/lib/gems/1.9.1/gems/oversip-1.3.0/lib/../bin/oversip

Usage

Assuming the path of the oversip command has been included in the PATH enviroment variable, the usage of the command is as follows:

root:~# oversip --help
OverSIP 1.3.7
http://www.oversip.net
2012-2013, Inaki Baz Castillo <ibc@aliax.net>

Usage: oversip [OverSIP options] [Ruby options]

OverSIP options:
  -P, --pid FILE               Create a PID file (required)
  -p, --process-name NAME      Change the running process name, also affects to syslogger
                               process and Posix Message Queue name (default 'oversip')
      --config-dir DIR         Absolute path to the directory with user configuration files
                               (default '/etc/oversip/')
      --config-file FILE       Name of the configuration file within the configuration directory
                               (default 'oversip.conf')
  -u, --user USER              System user to run with
  -g, --group GROUP            System group to run with
      --no-color               Don't colorize text printed in stdout
      --remove-mqueue MQUEUE   Destroy the Posix Message Queue with the given name and exit

Ruby options:
  -d, --debug                  Set debugging flags ($DEBUG = true)
  -w, --warn                   Turn warnings on ($-w = true)
  -I, --include PATH           Add PATH to $LOAD_PATH (may be used more than once)
  -r, --require LIBRARY        Load LIBRARY before running the programm (may be used more than once)

Common options:
  -h, --help                   Show this message
  -v, --version                Show version

Command parameters

-P / --pid FILE

Required parameter. Absolute path to the PID file to generate.

NOTE: Ensure the directory exists and the user running OverSIP (-u or --user option) has permissions for removing the PID file once OverSIP has been stopped.

-P /var/run/oversip/oversip.pid

-p / --process-name NAME

Changes the running process name (default to “oversip”). It also affects to OverSIP syslogger process name and the Posix Message Queue name.

-p oversip1

--config-dir DIR

Absolute path to the directory with user configuration files (by default “/etc/oversip/”).

--config-dir /usr/local/etc/oversip/

--config-file FILE

Name of the main configuration file within the configuration directory (default “oversip.conf”).

--config-file oversip1.conf

-u / --user USER

System user to run with (by default not set).

-u oversip

-g / --group GROUP

System group to run with (by default not set).

-g oversip

--no-color

Don’t colorize text printed in stdout when starting OverSIP.

--remove-mqueue MQUEUE

Destroy the Posix Message Queue with the given name and exit. The default name of the queue is “/${NAME}_syslogger” where NAME is the process name (set with the -p or --process-name option), so default value is “/oversip_syslogger”.

The Posix Message Queue is used to intercommunicate OverSIP master and syslogger processes.

NOTE: The DEB init script uses this option for removing the Posix Message Queue during the script stop action. This is because the queue is created as root user and thus cannot be removed by the oversip user when OverSIP is stopped.

--remove-mqueue /oversip1_syslogger