1
0
mirror of https://github.com/spl0k/supysonic.git synced 2024-09-19 19:01:03 +00:00

Daemon doc

This commit is contained in:
Alban Féron 2021-01-16 17:03:42 +01:00
parent 6bb551a32a
commit 2599f1ae37
No known key found for this signature in database
GPG Key ID: 8CE0313646D16165
3 changed files with 71 additions and 12 deletions

View File

@ -2,17 +2,16 @@ Jukebox mode
============
The jukebox mode allow playing audio files on the hardware of the machine
running *Supysonic*, using regular clients that support it as a remote control.
running Supysonic, using regular clients that support it as a remote control.
The daemon must be running in order to be able to use the jukebox mode. So be
sure to start the ``supysonic-daemon`` command and keep it running. A basic
*systemd* service file can be found at the root of the project folder.
:doc:`setup/daemon` must be running in order to be able to use the jukebox mode.
So be sure to start the :doc:`man/supysonic-daemon` command and keep it running.
Setting the player program
--------------------------
Jukebox mode in *Supysonic* works through the use of third-party command-line
programs. *Supysonic* isn't bundled with such programs, and you are left to
Jukebox mode in Supysonic works through the use of third-party command-line
programs. Supysonic isn't bundled with such programs, and you are left to
choose which one you want to use. The chosen program should be able to play a
single audio file from a path specified on its command-line.

59
docs/setup/daemon.rst Normal file
View File

@ -0,0 +1,59 @@
The daemon
==========
Supysonic comes with an optional daemon service that currently provides the
following features:
- background scans
- library changes detection
- jukebox mode
Background scans
----------------
First of all, the daemon allows running backgrounds scans, meaning you can start
scans from the :doc:`command-line interface <../man/supysonic-cli>` and do
something else while it's scanning (otherwise the scan will block the CLI until
it's done). Background scans also enable the web UI to run scans, while you have
to use the CLI to do so if you don't run the daemon.
Library watching
----------------
Instead of manually running a scan every time your library changes, the daemon
can listen to any library change and update the database accordingly. This
watcher is started along with the daemon but can be disabled to only keep
background scans. Please refer to :ref:`conf-daemon` of the configuration to
enable or disable it.
Jukebox
-------
Finally, the daemon acts as a backend for the jukebox mode, allowing to play
audio on the machine running Supysonic. More details on the :doc:`../jukebox`
page.
Running it
----------
The daemon is :doc:`../man/supysonic-daemon`, it is a non-exiting process.
If you want to keep it running in background, either use the old
:command:`nohup` or :command:`screen` methods, or start it as a systemd unit.
Below is a basic service file to load it through systemd. Modify it to match
your installation and save it as
:file:`/etc/systemd/system/supysonic-daemon.service`.
.. code-block:: ini
[Unit]
Description=Supysonic Daemon
[Service]
User=someuser
Group=somegroup
WorkingDirectory=/home/supysonic
ExecStart=/usr/bin/python3 -m supysonic.daemon
[Install]
WantedBy=multi-user.target

View File

@ -1,7 +1,7 @@
Supysonic setup
===============
This guide details the required steps to get a *Supysonic* instance ready to
This guide details the required steps to get a Supysonic instance ready to
start serving your music.
.. toctree::
@ -11,3 +11,4 @@ start serving your music.
database
configuration
deploying/index
daemon