-
-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(contrib): improve system related contrib files
Make example configuration self documenting Most services on *nix type systems have configuration files that are self documenting. This usually entails: - listing all configuration options with some sane default values - commenting out options that do not need to be set or match the binary default value - some explanatory comments where needed This simplifies management of the service as configuration can be understood and modified in place without having to open up the internet. This diff also groups settings into logical blocks: - basic server settings - directory settings - behavioural settings Improve contrib system file behaviour This diff improves gonic serive files in the following way: - Define a sane default for gonig cache, which will map well to established cache paths on most Linux systems - Update service file to use StateDirectory=, CacheDirectory= directives to create /var/lib/gonic and /var/cache/gonic directories respectively - Add a tmpfilesd sample configuration that will automatically clean cache files if they are older than 7 days - Add sysysers configuration file that can be used in sysusers.d to create relevant gonic user and group during installation.
- Loading branch information
Showing
4 changed files
with
57 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,52 @@ | ||
music-path <path to your music dir> | ||
podcast-path <path to your podcasts dir> | ||
cache-path <path to cache dir> | ||
db-path /var/lib/gonic/gonic.db | ||
jukebox-enabled false | ||
listen-addr 127.0.0.1:4747 | ||
scan-interval 0 | ||
# This is the gonic server system-wide configuration file. For other | ||
# administrative and per user settings go th the web UI. | ||
# | ||
# The strategy used for options in the default config shipped with gonic is to | ||
# specify options with their default value where possible, and leave optional | ||
# ones commented. Uncommented options override the default value. Options that | ||
# are mandatory and need setting before first run have a placeholder for their | ||
# values in <angle brackets>. | ||
|
||
# Interface and port to listen on. Defaults to 0.0.0.0:4747 | ||
listen-addr 127.0.0.1:4747 | ||
|
||
# HTTP(S) request logging | ||
#http-log true | ||
# URL path prefix to use if behind reverse proxy | ||
#proxy-prefix <prefix> | ||
|
||
# Secure connection settings. Recommended to set up unless gonic sits behing an | ||
# SSL enabled reverse proxy server. Disabled by default. | ||
#tls-cert <path to TLS certificatie> | ||
#tls-key <path to TLS private key> | ||
|
||
# gonic's internal state database location | ||
db-path /var/lib/gonic/gonic.db | ||
|
||
# Path to music files. Must be specified at least once, but can be specified | ||
# multiple times if the collection is split into different | ||
# directories. E.g.: | ||
# music-path /srv/audio/music | ||
music-path <path to your music dir> | ||
|
||
# Path to downloaded podcast files. Must be specified. E.g.: | ||
# podcast-path /var/cache/podcast | ||
podcast-path <path to your podcasts dir> | ||
|
||
# Age (in days) to purge podcast episodes if not accessed. Disabled by default. | ||
#podcast-purge-age 0 | ||
|
||
# Directory where transcoded audio files and covers are stored. It's safe to | ||
# delete contents periodically (see tmpfilesd configuration), as it will be | ||
# regenerated. | ||
cache-path /var/cache/gonic | ||
|
||
# Interval (in minutes) to check for new music. Default: don't scan | ||
#scan-interval 0 | ||
#scan-at-start-enabled false | ||
#scan-watcher-enabled false | ||
#jukebox-enabled false | ||
#jukebox-mpv-extra-args <extra command line arguments to pass to the jukebox mpv daemon> | ||
|
||
# A string or character to split genre tags on for multi-genre support (e.g. ;) | ||
#genre-split ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
u gonic - "user for gonic daemon" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
d /var/cache/gonic 0775 gonic gonic 7d |