Morning Stuart, Thanks for the fast reply.
On Thu, Nov 30, 2023 at 09:28:17AM +0000, Stuart Henderson wrote: > I think in this case, if the user has overridden flags it should stay > working, and the installed file seems to match what the old default > flags do, ... This is correct to my knowledge, so no need for a mention. > > +# To allow other hosts to connect, change to "localhost". > > 0.0.0.0 rather than localhost. But according to > https://www.navidrome.org/docs/usage/configuration-options/ the default > is to bind to 0.0.0.0 _and_ ::, so it might be better for users to > comment this out if they want to allow connections from other hosts. > (Check that though, in case they really mean "listen to :: and hope it > sees v4 too", like so many other programs). I can confirm that when commenting out the `Addresss` line, other hosts can connect via IPv4. Updated diff (OK?): Index: Makefile =================================================================== RCS file: /cvs/ports/audio/navidrome/Makefile,v diff -u -p -r1.14 Makefile --- Makefile 28 Nov 2023 06:22:47 -0000 1.14 +++ Makefile 30 Nov 2023 09:48:45 -0000 @@ -2,6 +2,7 @@ COMMENT = modern music server and stream MODGO_MODNAME = github.com/navidrome/navidrome MODGO_VERSION = v0.49.3 +REVISION = 0 DISTNAME = navidrome-${MODGO_VERSION} @@ -31,11 +32,14 @@ RUN_DEPENDS = graphics/ffmpeg MODULES = lang/go -SUBST_VARS = LOCALSTATEDIR - post-extract: cd ${WRKSRC} && tar -C ${WRKSRC}/ui/ -zxf \ ${FULLDISTDIR}/navidrome-build-${MODGO_VERSION}.tar.gz + +post-install: + ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/navidrome + ${SUBST_CMD} -c -m 755 ${FILESDIR}/navidrome.toml \ + ${PREFIX}/share/examples/navidrome/navidrome.toml .include "modules.inc" Index: files/navidrome.toml =================================================================== RCS file: files/navidrome.toml diff -N files/navidrome.toml --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/navidrome.toml 30 Nov 2023 09:49:39 -0000 @@ -0,0 +1,15 @@ +# The address to bind to. +# +# To allow other hosts to connect, comment this line out. +Address = "127.0.0.1" + +# Where Navidrome finds music. +# +# Make sure the _navidrome user has read access to the music files. +MusicFolder = "${LOCALSTATEDIR}/navidrome/music" + +# Where Navidrome stores its database etc. +DataFolder = "${LOCALSTATEDIR}/navidrome/" + +# Uncomment to make logging more verbose. +#LogLevel = 'DEBUG' Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/audio/navidrome/pkg/PLIST,v diff -u -p -r1.4 PLIST --- pkg/PLIST 28 Nov 2023 06:22:47 -0000 1.4 +++ pkg/PLIST 30 Nov 2023 10:08:53 -0000 @@ -6,6 +6,9 @@ @group _navidrome @sample ${LOCALSTATEDIR}/navidrome/ @sample ${LOCALSTATEDIR}/navidrome/music/ +share/examples/navidrome/ +share/examples/navidrome/navidrome.toml +@sample ${SYSCONFDIR}/navidrome.toml @mode @owner @group Index: pkg/README =================================================================== RCS file: /cvs/ports/audio/navidrome/pkg/README,v diff -u -p -r1.2 README --- pkg/README 11 Mar 2022 18:20:21 -0000 1.2 +++ pkg/README 30 Nov 2023 09:50:07 -0000 @@ -2,20 +2,24 @@ | Running ${PKGSTEM} on OpenBSD +----------------------------------------------------------------------- +Config File +=========== + +When using the included rc.d(8) script, ${PKGSTEM} uses the config file at +`${SYSCONFDIR}/navidrome.toml`. + Adding Music ============= -Music can be added by copying it to ${VARBASE}/navidrome/music/ or by changing -the `--datafolder` directory used. +Music can be added by copying it to `${LOCALSTATEDIR}/navidrome/music/` or +by changing `MusicFolder` in the config file. Web Interface ============= -${PKGSTEM} serves up a web interface on: - - http://localhost:4533 +By default, ${PKGSTEM} serves up a web interface on: -If you wish to listen on a different interface or change the location -${PKGSTEM} looks for music, you can modify it via rcctl: + http://127.0.0.1:4533 - # rcctl set navidrome flags -a 0.0.0.0 --datafolder /home/music +If you wish to listen on a different address, change the `Address` setting in +the config file. Index: pkg/navidrome.rc =================================================================== RCS file: /cvs/ports/audio/navidrome/pkg/navidrome.rc,v diff -u -p -r1.2 navidrome.rc --- pkg/navidrome.rc 11 Mar 2022 18:20:21 -0000 1.2 +++ pkg/navidrome.rc 30 Nov 2023 09:48:30 -0000 @@ -2,7 +2,7 @@ daemon="${TRUEPREFIX}/bin/navidrome" daemon_user="_navidrome" -daemon_flags="-a localhost --datafolder ${VARBASE}/navidrome --musicfolder ${VARBASE}/navidrome/music" +daemon_flags="-c ${SYSCONFDIR}/navidrome.toml" . /etc/rc.d/rc.subr -- Best Regards Edd Barrett https://www.theunixzoo.co.uk