Skip to end of metadata
Go to start of metadata

Updated for v6.5.

Contents

Introduction

RUSS servers that are made available on the system are managed using the ruservice tool.

System server configuration files are organized directly under /etc/russ/conf, including subdirectories.

The first line of configuration files is used to mark it as a RUSS configuration file:

#russ [<directive>] [...]

and provide some additional information/directives that may be used, e.g., by ruservice.

ruservice is support operations: start, stop, restart, list, and status.

Each running server has a pid file at /var/run/russ/pid and a service file (which is a socket or special configuration file) at /var/run/russ/services (which path is also identified as RUSS_SERVICES_DIR).

When ruservice is called to start a server, it examines the first line of the configuration file in /etc/russ/conf. If it contains "service=socket" as:

#russ service=socket

a server is started and a socket file is set up. If the configuration file contains "service=conffile" as:

#russ service=conffile

a slightly modified/augmented copy of the configuration file is copied to the RUSS_SERVICES_DIR.

A server that needs to perform operations as root on behalf of the connecting user must always use a server actively listening on a socket file. A socket file server is also useful when the fastest turnaround time (connect, perform service, close) is required.

The conffile approach is suitable for servers that will run as the connecting user. In effect, when the dial function in the RUSS library is called and finds a configuration file instead of a socket file, a server will be started dynamically and the connection be established. Because the server is actually started by the connecting user, this is suitable only for servers that must run as the connecting user. Since a new server must be started each time, there is a small performance penalty. The benefit is that less system servers need to actually be running as processes.

ruservice uses ruspawn to start socket servers. ruspawn automatically cleans up the socket file when the server exits/is killed.

Usage

usage: ruservice <name> {start|stop|restart|status|list}
       ruservice list|status
       ruservice -h|--help|help

Manage system configured RUSS servers as configured in:
	/etc/russ/conf

The given <name> may be the name of the configuration (without
.conf), a directory, or "." for all.

Examples

Single Server

Start server:

ruservice ssh start

Stop server:

ruservice ssh stop

Restart (RUSS) ssh server:

ruservice ssh restart

Notes:

  • applies to configuration file at /etc/russ/conf/ssh.conf

Collection of Servers

Restart collection of servers under fspc:

ruservice fspc restart

Notes:

  • applies to configuration files under /etc/russ/conf/fspc (e.g., /etc/russ/conf/fspc/*.conf)

Restart a single instance of a collection of servers:

ruservice fspc/local restart

All Servers

Restart all servers:

ruservice . restart

Get status of all servers:

ruservice . status