diff --git a/contrib/config b/contrib/config index 3f689a2..f5f448b 100644 --- a/contrib/config +++ b/contrib/config @@ -1,7 +1,52 @@ -music-path -podcast-path -cache-path -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 . + +# 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 + +# Secure connection settings. Recommended to set up unless gonic sits behing an +# SSL enabled reverse proxy server. Disabled by default. +#tls-cert +#tls-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 downloaded podcast files. Must be specified. E.g.: +# podcast-path /var/cache/podcast +podcast-path + +# 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 + +# A string or character to split genre tags on for multi-genre support (e.g. ;) +#genre-split ; diff --git a/contrib/gonic.service b/contrib/gonic.service index 4a2128f..7a4e432 100644 --- a/contrib/gonic.service +++ b/contrib/gonic.service @@ -1,6 +1,5 @@ [Unit] Description=gonic service -ConditionPathExists=/var/lib/gonic/ After=network.target [Service] @@ -8,6 +7,9 @@ Type=simple User=gonic Group=gonic +StateDirectory=gonic +CacheDirectory=gonic + Restart=on-failure RestartSec=10 diff --git a/contrib/gonic.sysusers b/contrib/gonic.sysusers new file mode 100644 index 0000000..1fef6ba --- /dev/null +++ b/contrib/gonic.sysusers @@ -0,0 +1 @@ +u gonic - "user for gonic daemon" diff --git a/contrib/gonic.tmpfiles b/contrib/gonic.tmpfiles new file mode 100644 index 0000000..2dd59cb --- /dev/null +++ b/contrib/gonic.tmpfiles @@ -0,0 +1 @@ +d /var/cache/gonic 0775 gonic gonic 7d