Reply To: Different servers or folders / how to

#10946
ervin23
Participant

@S80_UK wrote:

OK – so this is a S60mt-daapd file…

#!/bin/sh

# make sure our shared libraries are in the path.
# if we get /etc/ld.so.conf working, this export
# can be removed
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/lib

if [ -n "`pidof mt-daapd`" ] ; then
killall mt-daapd 2>/dev/null
fi

sleep 2
/opt/sbin/mt-daapd -c /opt/etc/mt-daapd/All/mt-daapd.conf
/opt/sbin/mt-daapd -c /opt/etc/mt-daapd/Leslie/mt-daapd.conf
/opt/sbin/mt-daapd -c /opt/etc/mt-daapd/Jenny/mt-daapd.conf
/opt/sbin/mt-daapd -c /opt/etc/mt-daapd/Joanne/mt-daapd.conf

You will see that each instantiation of the server points to a different config file (they are in separate directories in this case).

Now, if each user had a unique choice of music, then your life is simple since each config only has to point to a single folder. However, if there is some music that two people like, but they also have their own unique preferences, then you either need to double up on the music they both like and put it in the folder for each of them, or give them another folder which they can share. Since Firefly can easily be set to point to more than one folder, I did it the second way.

Here are the relevant entries from one of the mt-daapd.conf files….


#
# give each user a log file, a unique server name, and a unique port number
#
logfile = /share/flash/data/mt-daapd/Leslie/mt-daapd.log
servername = Leslie's Music
port = 3690
#
#

#
# give each user a unique database location
#
db_type = sqlite
db_parms = /share/flash/data/mt-daapd/Leslie

#
# mp3_dir (required)
#
# Location of the mp3 files to share. This corresponds
# to a folder called "mp3" in the "DISK 1" share.
#
# this is unique for each user
#
mp3_dir = /share/flash/data/music/All,/share/flash/data/music/Leslie,/share/flash/data/music/Jenny-Leslie,/share/flash/data/music/Joanne-Leslie
#

mp3_dir = /share/flash/… is all on one line – on my screen it end up looking as though it is on two lines…

You will need to edit your own config files to suit your needs. Also note thet the use of the path ‘…/flash/…’ simply points to the hard drive on port 2 on the NSLU2, it is nothing to do with flash memory.

Hope this helps you,

Les.

I’m almost there – it’s running …. your advice having several daemons running is brilliant 🙂

The shared mp3_dir is however causing me trouble ….

#
# mp3_dir (required)
#
# Location of the mp3 files to share. This corresponds
# to a folder called “mp3” in the “DISK 1” share.
#

mp3_dir=/share/hdd/data/mp3/all,/share/hdd/data/mp3/ev

# servername (required)
#
# This is both the name of the server as advertised
# via rendezvous, and the name of the database
# exported via DAAP
#

servername All Music

#
# runas (required)
File mt-daapd.conf saved
# /opt/etc/init.d/S60mt-daapd
Required config entry ‘mp3_dir’ not specified
Error reading config file (/opt/etc/mt-daapd/all/mt-daapd.conf)
# mp3_dir=/share/hdd/data/mp3/all,/share/hdd/data/mp3/ev
#
You see I have the “mp3_dir=etc” ….. but the server can’t read it on restart

I’m on Version 0.2.4

Any tips … best regards ev