Giter Club home page Giter Club logo

centos-rpm-rotter's Introduction

centos-rpm-rotter

CentOS 7 RPM Specfile for Rotter

centos-rpm-rotter

CentOS 7 RPM Specfile for Rotter (Recording of Transmission / Audio Logger for JACK) which is part of Radio Bern RaBe's Audio Packages for Enterprise Linux (RaBe APEL).

Usage

There is a pre-built binary packages for CentOS 7 available on RaBe APEL package repository, which can be installed as follows:

# Add EPEL repository
yum install epel-release

# Add RaBe APEL repository
curl -o /etc/yum.repos.d/home:radiorabe:audio.repo \
     http://download.opensuse.org/repositories/home:/radiorabe:/audio/CentOS_7/home:radiorabe:audio.repo
 
# Install rotter
yum install rotter

Running rotter through systemd

rotter and jackd can be started via the installed systemd service unit template pairs (and therefore support multiple instances).

To create a rotter and jackd instance pair named example and use jackd's ALSA backend, proceed with the following steps:

# The name of the rotter and jackd instance pair
instanceName="example"

# Create a service instance override for running jackd under the rotter
# user/group with the alsa backend
mkdir /etc/systemd/system/jackd@${instanceName}.service.d
cat > /etc/systemd/system/jackd@${instanceName}.service.d/override.conf << "EOF"
[Service]
User=rotter
Group=rotter
SupplementaryGroups=audio

# Jackd startup options
Environment="JACKD_OPTIONS=-d alsa --device hw:0 --capture --inchannels 2"
EOF

# Enable and start the rotter 'example' instance
systemctl enable rotter@${instanceName}.service
systemctl start rotter@${instanceName}.service
systemctl status rotter@${instanceName}.service

# The rotter instance triggered the start of a jackd instance with the same
# instance name
systemctl status jackd@${instanceName}.service

The systemd service will also create the necessary recording root directory located within the rotter instance root directory /var/lib/rotter/. Or in other words, the recordings will be be available at /var/lib/rotter/example in our example.

Systemd service unit templates explained

The included Systemd service unit templates for rotter and jackd correlate with each other and are supposed to be run with the same instance name.

[email protected] is a generic service unit template for starting one ore more headless jackd instances:

  • It is a generic jackd service unit template and can be used for other use-cases as well (i.e. it's not limited to the rotter usage)
  • It sets the required real-time priorities (LimitRTPRIO=) and maximum locked-in-memory address space (LimitMEMLOCK=)
  • It starts jackd with the dummy backend by default.
  • The name of the systemd service instance is used as the jack server name (jackd --name <instance>), so use default as the instance name if you would like to use the default jack server.
  • The unit waits for the jackd to be up and running with the help of the jack_wait command.
  • Start-up overrides of possible interest are User=/Group=, Environment="JACKD_SERVERNAME=%i" and Environment="JACKD_OPTIONS=-d dummy"
  • You need to add SupplementaryGroups=audio to your instance override, in case you would like to use jackd's ALSA backend.

[email protected] is a service unit template for starting one ore more rotter instances:

  • It depends on a jackd system service instance unit with the same instance name (BindsTo=jackd@%i.service)
  • It sets the required real-time priorities (LimitRTPRIO=) and maximum locked-in-memory address space (LimitMEMLOCK=)
  • It starts rotter under the rotter system user and group by default
  • It conects to a jackd server with the same name as the instance by default
  • It stores the recorded audio files below /var/lib/rotter/<instance> by default
  • Startup-up overrides of possible interest are Environment="ROTTER_ROOT_DIR=/var/lib/rotter/%i", Environment="ROTTER_OPTIONS=-a -j" and Environment="JACK_DEFAULT_SERVER=%i"

centos-rpm-rotter's People

Contributors

paraenggu avatar

Watchers

 avatar  avatar  avatar  avatar

centos-rpm-rotter's Issues

Consider DynamicUser= instead of User=

Have you considered using DynamicUser= instead of User=?

This might be one of the cases where a transient user makes just as much (if not more) sense than using this:

getent group %{name} >/dev/null || groupadd -r %{name}
getent passwd %{name} >/dev/null || \
useradd -r -g %{name} -d /var/lib/%{name} -s /sbin/nologin \
-c "%{name} system user account" %{name}
exit 0

I'm assuming that the recording will get chowned when we move the to our storage anyway.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.