aboutsummaryrefslogtreecommitdiff
path: root/multimedia/navidrome/files
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/navidrome/files')
-rw-r--r--multimedia/navidrome/files/config.toml.sample.in73
-rw-r--r--multimedia/navidrome/files/navidrome.in51
-rw-r--r--multimedia/navidrome/files/pkg-message.in27
3 files changed, 151 insertions, 0 deletions
diff --git a/multimedia/navidrome/files/config.toml.sample.in b/multimedia/navidrome/files/config.toml.sample.in
new file mode 100644
index 000000000000..9cadbe155d1f
--- /dev/null
+++ b/multimedia/navidrome/files/config.toml.sample.in
@@ -0,0 +1,73 @@
+# Navidrome Configuration File
+# Anything that is commented out will use the default value shown
+#
+# Note: This file is installed by the port and not distributed as part of Navidrome
+
+# Folder where your music library is stored. Can be read-only
+MusicFolder = "%%DATADIR%%/music"
+# Folder to store application data (DB, cache…).
+#DataFolder = "/var/db/navidrome"
+# How frequently to scan for changes in your music library. Set it to 0 to disable scans
+#ScanInterval = "1m"
+
+# Log level. Useful for troubleshooting. Possible values: error, info, debug, trace. Default: info
+LogLevel = "info"
+
+# HTTP port Navidrome will use
+#Port = 4533
+# IP address the server will bind to. Comment out to use 0.0.0.0 and :: (all IPs)
+Address = "127.0.0.1"
+
+# Enables transcoding configuration in the UI
+#EnableTranscodingConfig = false
+# Size of transcoding cache. Set to 0 to disable cache
+#TranscodingCacheSize = "100MB"
+# Size of image (art work) cache. Set to 0 to disable cache
+#ImageCacheSize = "100MB"
+# Enable/disable .m3u playlist auto-import
+#AutoImportPlaylists = true
+
+# Base URL (only the path part) to configure Navidrome behind a proxy (ex: /music). Comment out to leave empty
+#BaseUrl = ""
+# Change background image used in the Login page. Comment out to use random music image from Unsplash.com
+#UILoginBackgroundUrl = ""
+# Add a welcome message to the login screen
+#UIWelcomeMessage = ""
+# Send basic info to your own Google Analytics account. Must be in the format UA-XXXXXXXX Empty (disabled)
+#GATrackingID = ""
+
+# List of ignored articles when sorting/indexing artists
+#IgnoredArticles = "The El La Los Las Le Les Os As O A"
+# Match query strings anywhere in searchable fields, not only in word boundaries. Useful for languages where words are not space separated
+#SearchFullString = false
+
+# Configure the order to look for cover art images. Use special embedded value to get embedded images from the audio files
+#CoverArtPriority = "embedded, cover.*, folder.*, front.*"
+# Set JPEG quality percentage for resized cover art images
+#CoverJpegQuality = 75
+# Enable the option in the UI to download music/albums/artists/playlists from the server
+#EnableDownloads = true
+
+# How long Navidrome will wait before closing web ui idle sessions
+#SessionTimeout = "24h"
+# How many login requests can be processed from a single IP during the AuthWindowLength. Set to 0 to disable the limit rater
+#AuthRequestLimit = 5
+# Window Length for the authentication rate limit
+#AuthWindowLength = "20s"
+# Select metadata extractor implementation. Options: taglib or ffmpeg
+#Scanner.Extractor = "taglib"
+
+# Last.FM ApiKey
+#LastFM.ApiKey = ""
+# Last.FM Shared Secret
+#LastFM.Secret = ""
+# Two letter-code for language to be used to retrieve biographies from Last.FM
+#LastFM.Language = "en"
+
+# Spotify Client ID
+#Spotify.ID = ""
+# Spotify Client Secret
+#Spotify.Secret = ""
+
+# Use Gravatar images as the user profile image. Needs the user’s email to be filled. Defaule: false
+EnableGravatar = true
diff --git a/multimedia/navidrome/files/navidrome.in b/multimedia/navidrome/files/navidrome.in
new file mode 100644
index 000000000000..afa980975d3c
--- /dev/null
+++ b/multimedia/navidrome/files/navidrome.in
@@ -0,0 +1,51 @@
+#!/bin/sh
+#
+# PROVIDE: %%PORTNAME%%
+# REQUIRE: NETWORKING
+# KEYWORD:
+#
+# Add the following lines to /etc/rc.conf to enable %%PORTNAME%%:
+# %%PORTNAME%%_enable="YES"
+#
+# %%PORTNAME%%_enable (bool): Set to YES to enable %%PORTNAME%%
+# Default: NO
+# %%PORTNAME%%_config (str): %%PORTNAME%% configration file
+# Default: %%ETCDIR%%/config.toml
+# %%PORTNAME%%_datafolder (str): %%PORTNAME%% Folder to store application data
+# Default: %%NAVIDROMEUSER%%
+# %%PORTNAME%%_user (str): %%PORTNAME%% daemon user
+# Default: %%NAVIDROMEUSER%%
+# %%PORTNAME%%_group (str): %%PORTNAME%% daemon group
+# Default: %%NAVIDROMEUSER%%
+
+. /etc/rc.subr
+
+name="%%PORTNAME%%"
+rcvar="%%PORTNAME%%_enable"
+load_rc_config $name
+
+: ${%%PORTNAME%%_user:="%%NAVIDROMEUSER%%"}
+: ${%%PORTNAME%%_group:="%%NAVIDROMEGROUP%%"}
+: ${%%PORTNAME%%_enable:="NO"}
+: ${%%PORTNAME%%_config:="%%ETCDIR%%/config.toml"}
+: ${%%PORTNAME%%_flags=""}
+: ${%%PORTNAME%%_facility:="daemon"}
+: ${%%PORTNAME%%_priority:="debug"}
+: ${%%PORTNAME%%_datafolder:="/var/db/${name}"}
+
+required_dirs=${%%PORTNAME%%_datafolder}
+required_files=${%%PORTNAME%%_config}
+procname="%%PREFIX%%/bin/${name}"
+pidfile="/var/run/${name}.pid"
+start_precmd="${name}_precmd"
+command=/usr/sbin/daemon
+command_args="-S -l ${%%PORTNAME%%_facility} -s ${%%PORTNAME%%_priority} -T ${name} -t ${name} -p ${pidfile} \
+ ${procname} --configfile ${%%PORTNAME%%_config} --datafolder ${%%PORTNAME%%_datafolder} ${%%PORTNAME%%_flags}"
+
+%%PORTNAME%%_precmd()
+{
+ install -o ${%%PORTNAME%%_user} /dev/null ${pidfile}
+}
+
+run_rc_command "$1"
+
diff --git a/multimedia/navidrome/files/pkg-message.in b/multimedia/navidrome/files/pkg-message.in
new file mode 100644
index 000000000000..a714d0d283db
--- /dev/null
+++ b/multimedia/navidrome/files/pkg-message.in
@@ -0,0 +1,27 @@
+[
+{ type: install
+ message: <<EOM
+
+To run Navidrome at startup, enable it in your /etc/rc.conf:
+sysrc navidrome_enable="YES"
+
+To start Navidrome:
+service navidrome start
+
+To configure Navidrome edit:
+%%ETCDIR%%/config.toml
+
+Navidrome will listen on port 4533 and bind to 127.0.0.1.
+This can be changed in the configuration file above or by passing extra flags
+using "navidrome_flags" in /etc/rc.conf.
+
+navidrome_flags="--address 0.0.0.0 --port 80"
+
+Navidrome is configured to scan for music under "%%DATADIR%%/music".
+This can be changed in the configuration file or by adding "--musicfolder <path>"
+to "navidrome_flags".
+
+EOM
+}
+]
+