mirror of
https://github.com/spl0k/supysonic.git
synced 2024-11-09 11:42:16 +00:00
Docs update + systemd service file for the daemon
This commit is contained in:
parent
e29ab91a97
commit
373beaa92e
35
README.md
35
README.md
@ -35,7 +35,7 @@ details, go check the [API implementation status][docs-api].
|
|||||||
+ [Other options](#other-options)
|
+ [Other options](#other-options)
|
||||||
+ [Docker](#docker)
|
+ [Docker](#docker)
|
||||||
* [Quickstart](#quickstart)
|
* [Quickstart](#quickstart)
|
||||||
* [Watching library changes](#watching-library-changes)
|
* [Running the daemon](#running-the-daemon)
|
||||||
* [Upgrading](#upgrading)
|
* [Upgrading](#upgrading)
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
@ -155,13 +155,6 @@ example of what it looks like:
|
|||||||
Require all granted
|
Require all granted
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
You might also need to run _Apache_ using the system default locale, as the one
|
|
||||||
it uses might cause problems while scanning the library from the web UI. To do
|
|
||||||
so, edit the `/etc/apache2/envvars` file, comment the line `export LANG=C` and
|
|
||||||
uncomment the `. /etc/default/locale` line. Then you can restart _Apache_:
|
|
||||||
|
|
||||||
$ systemctl restart apache2
|
|
||||||
|
|
||||||
With that kind of configuration, the server address will look like
|
With that kind of configuration, the server address will look like
|
||||||
*http://server/supysonic/*
|
*http://server/supysonic/*
|
||||||
|
|
||||||
@ -222,15 +215,28 @@ targets API version 1.9.0, the token based method isn't supported. So if your
|
|||||||
client offers you the option, you'll have to disable the token based
|
client offers you the option, you'll have to disable the token based
|
||||||
authentication for it to work.
|
authentication for it to work.
|
||||||
|
|
||||||
## Watching library changes
|
## Running the daemon
|
||||||
|
|
||||||
Instead of manually running a scan every time your library changes, you can run
|
_Supysonic_ comes with an optional daemon service that currently provides the
|
||||||
a watcher that will listen to any library change and update the database
|
following features:
|
||||||
accordingly.
|
- background scans
|
||||||
|
- library changes detection
|
||||||
|
|
||||||
The watcher is `supysonic-watcher`, it is a non-exiting process. If you want to
|
First of all, the daemon allows running backgrounds scans, meaning you can start
|
||||||
|
scans from the 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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
The daemon is `supysonic-daemon`, it is a non-exiting process. If you want to
|
||||||
keep it running in background, either use the old `nohup` or `screen` methods,
|
keep it running in background, either use the old `nohup` or `screen` methods,
|
||||||
or start it as a simple _systemd_ unit (unit file not included).
|
or start it as a _systemd_ unit (see the very basic _supysonic-daemon.service_
|
||||||
|
file).
|
||||||
|
|
||||||
## Upgrading
|
## Upgrading
|
||||||
|
|
||||||
@ -248,4 +254,3 @@ Migration scripts are provided in the `supysonic/schema/migration` folder, named
|
|||||||
by the date of commit that introduced the schema changes. There could be both
|
by the date of commit that introduced the schema changes. There could be both
|
||||||
SQL scripts or Python scripts. The Python scripts require arguments that are
|
SQL scripts or Python scripts. The Python scripts require arguments that are
|
||||||
explained when the script is invoked with the `-h` flag.
|
explained when the script is invoked with the `-h` flag.
|
||||||
|
|
||||||
|
11
docs/cli.md
11
docs/cli.md
@ -54,12 +54,19 @@ Usage:
|
|||||||
supysonic-cli folder add <name> <path>
|
supysonic-cli folder add <name> <path>
|
||||||
supysonic-cli folder delete <name>
|
supysonic-cli folder delete <name>
|
||||||
supysonic-cli folder list
|
supysonic-cli folder list
|
||||||
supysonic-cli folder scan [<name>...]
|
supysonic-cli folder scan [-f] [--background | --foreground] [<name>...]
|
||||||
|
|
||||||
Arguments:
|
Arguments:
|
||||||
add Add a new folder
|
add Add a new folder
|
||||||
delete Delete a folder
|
delete Delete a folder
|
||||||
list List all the folders
|
list List all the folders
|
||||||
scan Scan all or specified folders
|
scan Scan all or specified folders
|
||||||
```
|
|
||||||
|
|
||||||
|
Options:
|
||||||
|
-f --force Force scan of already known files even if they
|
||||||
|
haven't changed
|
||||||
|
--background Scan in the background. Requires the daemon to
|
||||||
|
be running.
|
||||||
|
--foreground Scan in the foreground, blocking the process
|
||||||
|
while the scan is running
|
||||||
|
```
|
||||||
|
11
supysonic-daemon.service
Normal file
11
supysonic-daemon.service
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Supysonic Daemon
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=supysonic
|
||||||
|
Group=supysonic
|
||||||
|
WorkingDirectory=/home/supysonic
|
||||||
|
ExecStart=/usr/bin/env python -m supysonic.daemon
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
Loading…
Reference in New Issue
Block a user