Page 2 of 3
Re: [HOWTO] Install minidlna into a jail
Posted: 15 Jan 2013 13:26
by fsbruva
If minidlna is inside a jail, just restart the jail! No need to reboot the whole NAS.
It seems the issue is that the scan is finding the file, but you think minidlna is not advertising this. Did you close your browser, and then try to see if the proper number of videos were present? How about restarting the blueray player?
Re: [HOWTO] Install minidlna into a jail
Posted: 15 Jan 2013 13:36
by DanAddz
How do i restart a jail?
I have closed the browser and reopened and it still thinks that there is only 4 when there is 5.
I have also turned the Bluray Player off and on, no luck.
cheers,
Re: [HOWTO] Install minidlna into a jail
Posted: 15 Jan 2013 14:05
by raulfg3
DanAddz wrote:How do i restart a jail?
/etc/rc.d/jail start ( or stop or restart) nameofthejail
eg: /etc/rc.d/jail restart proto
eg2: /etc/rc.d/jail stop proto
eg3: /etc/rc.d/jail start proto
eg4: in my case /etc/rc.d/jail restart minidlna
Re: [HOWTO] Install minidlna into a jail
Posted: 16 Jan 2013 01:41
by DanAddz
hay,
I tested the restart of the Jail, it seemed to work, but everytime i restarted the jail, it would change the Jail's JID for e.g. 1 to 2 to 3 for everytime i restart or stop.
is there anyway of locking the JID to a certain Jail.
i am going to leave some files in there without restarting the jail or rescanning minidlna and see what happens and see if it rescans like normal.
Cheers,
Re: [HOWTO] Install minidlna into a jail
Posted: 16 Jan 2013 07:52
by raulfg3
DanAddz wrote:is there anyway of locking the JID to a certain Jail.
no
DanAddz wrote:I tested the restart of the Jail, it seemed to work, but everytime i restarted the jail, it would change the Jail's JID for e.g. 1 to 2 to 3 for everytime i restart or stop.
is expected , this mean that woks.
Re: [HOWTO] Install minidlna into a jail
Posted: 16 Jan 2013 09:05
by DanAddz
is it bad for you to keep restarting the jail?
Also off topic of minidlna, do you find Serviio better? and does that refresh?
cheers,
Re: [HOWTO] Install minidlna into a jail
Posted: 16 Jan 2013 09:09
by raulfg3
DanAddz wrote:Also off topic of minidlna, do you find Serviio better?
YES
DanAddz wrote:and does that refresh?
YES, auomatically, no need to do a cron job, always is config by web admin interfaz
Re: [HOWTO] Install minidlna into a jail
Posted: 16 Jan 2013 09:12
by DanAddz
Im gonna give that a go i think,
Does it talk to the same amount of things as MiniDlna?
Re: [HOWTO] Install minidlna into a jail
Posted: 16 Jan 2013 09:32
by raulfg3
DanAddz wrote:Does it talk to the same amount of things as MiniDlna
I don't understand, if you ask if is more or less dificult to install that minidlna, is a bit hard, but no much, and you learn a lot of BSD.
Re: [HOWTO] Install minidlna into a jail
Posted: 16 Jan 2013 09:33
by DanAddz
I ment is it compatible with the same amount of DLNA clients as MiniDLNA is, eg ps3, samsung tv etc
Re: [HOWTO] Install minidlna into a jail
Posted: 16 Jan 2013 09:41
by raulfg3
Re: [HOWTO] Install minidlna into a jail
Posted: 16 Jan 2013 18:15
by fsbruva
DanAddz wrote:
is there anyway of locking the JID to a certain Jail.
Unfortunately, not. Also, using the jail's name is possible to configure, but results in a race condition.
However, if your jail is named proto, then type this command:
How does that compare with typing:

Re: [HOWTO] Install minidlna into a jail
Posted: 17 Jan 2013 14:17
by El Loco
Hello @ all,
I've some problems with my minidlna server. i installed it like in the howto. Minidlna is running and i see the server on my tv. My jail is config. like the n4f how to describe it.
My Probleme is, my Musik, Videos are shown up in the /jail/minidlna/mnt/ media directories, but i can't see them in the /mnt/Volume/jail/minidlna/mnt/ media directories. If I check the minidlna.db in the jail, it found all my media files.
And if i look for the files at 192.168.0.6:8200 it says that he found nothing.
fstab:
Code: Select all
/mnt/Volume/Media/Filme /jail/minidlna/mnt/Filme nullfs ro 0 0
/mnt/Volume/Media/Musik /jail/minidlna/mnt/Musik nullfs ro 0 0
/mnt/Volume/Media/Bilder /jail/minidlna/mnt/Bilder nullfs ro 0 0
minidlna Conf:
Code: Select all
# port for HTTP (descriptions, SOAP, media transfer) traffic
port=8200
# network interfaces to serve, comma delimited
#network_interface=eth0
network_interface=re0
# set this to the directory you want scanned.
# * if have multiple directories, you can have multiple media_dir= lines
# * if you want to restrict a media_dir to a specific content type, you
# can prepend the type, followed by a comma, to the directory:
# + "A" for audio (eg. media_dir=A,/home/jmaggard/Music)
# + "V" for video (eg. media_dir=V,/home/jmaggard/Videos)
# + "P" for images (eg. media_dir=P,/home/jmaggard/Pictures)
#media_dir=/opt
media_dir=A,/mnt/Musik
media_dir=V,/mnt/Filme
media_dir=P,/mnt/Bilder
# set this if you want to customize the name that shows up on your clients
#friendly_name=My DLNA Server
friendly_name=miniDLNA Server
# set this if you would like to specify the directory where you want MiniDLNA to store its database and album art cache
db_dir=/var/db/minidlna
# set this if you would like to specify the directory where you want MiniDLNA to store its log file
log_dir=/var/db/minidlna
# set this to change the verbosity of the information that is logged
# each section can use a different level: off, fatal, error, warn, info, or debug
#log_level=general,artwork,database,inotify,scanner,metadata,http,ssdp,tivo=warn
# this should be a list of file names to check for when searching for album art
# note: names should be delimited with a forward slash ("/")
album_art_names=Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg/AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg/Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg
# set this to no to disable inotify monitoring to automatically discover new files
# note: the default is yes
inotify=yes
# set this to yes to enable support for streaming .jpg and .mp3 files to a TiVo supporting HMO
enable_tivo=no
# set this to strictly adhere to DLNA standards.
# * This will allow server-side downscaling of very large JPEG images,
# which may hurt JPEG serving performance on (at least) Sony DLNA products.
strict_dlna=no
# default presentation url is http address on port 80
#presentation_url=http://www.mylan/index.php
# notify interval in seconds. default is 895 seconds.
#notify_interval=900
notify_interval=10
# serial and model number the daemon will report to clients
# in its XML description
serial=12345678
model_number=1
# specify the path to the MiniSSDPd socket
#minissdpdsocket=/var/run/minissdpd.sock
# use different container as root of the tree
# possible values:
# + "." - use standard container (this is the default)
# + "B" - "Browse Directory"
# + "M" - "Music"
# + "V" - "Video"
# + "P" - "Pictures"
# if you specify "B" and client device is audio-only then "Music/Folders" will be used as root
#root_container=.
and the minidlna Log:
Code: Select all
er.c:737: warn: Scanning /mnt/Filme
[2013/01/17 13:09:24] scanner.c:808: warn: Scanning /mnt/Filme finished (0 files)!
[2013/01/17 13:09:24] scanner.c:737: warn: Scanning /mnt/Bilder
[2013/01/17 13:09:24] scanner.c:808: warn: Scanning /mnt/Bilder finished (0 files)!
[2013/01/17 13:09:24] playlist.c:126: warn: Parsing playlists...
[2013/01/17 13:35:57] minidlna.c:160: warn: received signal 15, good-bye
[2013/01/17 13:36:03] minidlna.c:917: warn: Starting MiniDLNA version 1.0.24 [SQLite 3.7.14.1].
[2013/01/17 13:36:03] minidlna.c:1019: warn: HTTP listening on port 8200
[2013/01/17 13:49:53] minidlna.c:917: warn: Starting MiniDLNA version 1.0.24 [SQLite 3.7.14.1].
[2013/01/17 13:49:53] minidlna.c:940: warn: Creating new database...
[2013/01/17 13:49:53] minissdp.c:108: error: bind(udp): Address already in use
[2013/01/17 13:49:53] minissdp.c:815: error: connect("/var/run/minissdpd.sock"): No such file or directory
[2013/01/17 13:49:53] minidlna.c:1009: fatal: Failed to connect to MiniSSDPd. EXITING
[2013/01/17 13:49:53] scanner.c:737: warn: Scanning /mnt/Musik
[2013/01/17 13:50:02] scanner.c:808: warn: Scanning /mnt/Musik finished (0 files)!
[2013/01/17 13:50:02] scanner.c:737: warn: Scanning /mnt/Filme
[2013/01/17 13:50:03] scanner.c:808: warn: Scanning /mnt/Filme finished (0 files)!
[2013/01/17 13:50:03] scanner.c:737: warn: Scanning /mnt/Bilder
[2013/01/17 13:50:03] scanner.c:808: warn: Scanning /mnt/Bilder finished (0 files)!
[2013/01/17 13:50:03] playlist.c:126: warn: Parsing playlists...
Hope that someone can help
THX
Re: [HOWTO] Install minidlna into a jail
Posted: 17 Jan 2013 17:21
by raulfg3
answer of El Loco:
Well if i execute the command the nas gaves me the Jid of the jail:
Code: Select all
JID IP Address Hostname Path
1 192.168.0.6 minidlna /jail/minidlna
so and if i execute the ls -l command on the folders you said he gives me that:
/mnt/Volume/Media/Filme
Code: Select all
nas4free:/mnt/Volume/Media/Filme# ls -l
total 76
drwxr-xr-x 4 root wheel 512 Jan 15 00:48 1 Downhillmovies
drwxr-xr-x 3 root wheel 512 Jan 15 00:54 2001 Maniacs 2 - Field of Screams
drwxr-xr-x 3 root wheel 512 Jan 15 00:54 Bad Taste
drwxr-xr-x 2 root wheel 512 Jan 15 00:54 Black Past
drwxr-xr-x 2 root wheel 512 Jan 15 00:55 Braindead
drwxr-xr-x 3 root wheel 512 Jan 15 00:55 Dead Silence
drwxr-xr-x 4 root wheel 512 Jan 15 00:55 Event Horizon
drwxr-xr-x 3 root wheel 512 Jan 15 00:56 Ich - einfach unverbesserlich
drwxr-xr-x 3 root wheel 512 Jan 15 00:56 Inside
drwxr-xr-x 3 root wheel 512 Jan 15 00:56 Insidious
drwxr-xr-x 3 root wheel 512 Jan 15 00:57 Kindsköpfe
drwxr-xr-x 2 root wheel 512 Jan 15 00:57 Madagascar 3 - Flucht durch Europa
drwxr-xr-x 3 root wheel 512 Jan 15 00:57 Pandorum
drwxr-xr-x 3 root wheel 512 Jan 15 00:58 Rec
drwxr-xr-x 3 root wheel 512 Jan 15 01:02 Rec 2
drwxr-xr-x 3 root wheel 512 Jan 15 01:03 Rec 3 - Genesis
drwxr-xr-x 3 root wheel 512 Jan 15 01:03 The Revenant - Untote wie wir
drwxr-xr-x 3 root wheel 512 Jan 15 01:05 Tucker and Dale vs Evil
drwxr-xr-x 3 root wheel 512 Jan 15 01:06 Wolkig - Mit Aussicht auf Fleischbällchen
/jail/minidlna/mnt/Filme :
Code: Select all
nas4free:/jail/minidlna/mnt/Filme# ls -l
total 76
drwxr-xr-x 4 root wheel 512 Jan 15 00:48 1 Downhillmovies
drwxr-xr-x 3 root wheel 512 Jan 15 00:54 2001 Maniacs 2 - Field of Screams
drwxr-xr-x 3 root wheel 512 Jan 15 00:54 Bad Taste
drwxr-xr-x 2 root wheel 512 Jan 15 00:54 Black Past
drwxr-xr-x 2 root wheel 512 Jan 15 00:55 Braindead
drwxr-xr-x 3 root wheel 512 Jan 15 00:55 Dead Silence
drwxr-xr-x 4 root wheel 512 Jan 15 00:55 Event Horizon
drwxr-xr-x 3 root wheel 512 Jan 15 00:56 Ich - einfach unverbesserlich
drwxr-xr-x 3 root wheel 512 Jan 15 00:56 Inside
drwxr-xr-x 3 root wheel 512 Jan 15 00:56 Insidious
drwxr-xr-x 3 root wheel 512 Jan 15 00:57 Kindsköpfe
drwxr-xr-x 2 root wheel 512 Jan 15 00:57 Madagascar 3 - Flucht durch Europa
drwxr-xr-x 3 root wheel 512 Jan 15 00:57 Pandorum
drwxr-xr-x 3 root wheel 512 Jan 15 00:58 Rec
drwxr-xr-x 3 root wheel 512 Jan 15 01:02 Rec 2
drwxr-xr-x 3 root wheel 512 Jan 15 01:03 Rec 3 - Genesis
drwxr-xr-x 3 root wheel 512 Jan 15 01:03 The Revenant - Untote wie wir
drwxr-xr-x 3 root wheel 512 Jan 15 01:05 Tucker and Dale vs Evil
drwxr-xr-x 3 root wheel 512 Jan 15 01:06 Wolkig - Mit Aussicht auf Fleischbällchen
Re: [HOWTO] Install minidlna into a jail
Posted: 17 Jan 2013 17:28
by raulfg3
El Loco wrote:My Probleme is, my Musik, Videos are shown up in the /jail/minidlna/mnt/ media directories, but i can't see them in the /mnt/Volume/jail/minidlna/mnt/ media directories. If I check the minidlna.db in the jail, it found all my media files
I see the same directories ????? in both path so minidlna can index all your content.
PD: I do ???? because I put *.avi files on my Video folders, and you put folders. What do you have inside of this folders?, if you have *.avi files, minidlna can see all, but if you put content of DVD isos, with mts extension or so, minidlna do not support it, plese go to minidlna page to know supported format files,see a note:
Code: Select all
Media Handling MiniDLNA is aimed for small devices, so doesn't generate movie thumbnails to lower CPU load and DB built time. It uses either thumbs in the same folder with movie if any, or extracts them where present from media containers like MP4 or MKV with embedded Album Art tags, but not AVI. One can add thumbs (JPG 160x160 pxl or less) to media folders with a Thumbnail Maker, and miniDLNA will link them to media files after rescan. Larger thumbs will be resized and stored in Media_DB that slows scan. At one movie per folder, follow thumb naming rules in minidlna.conf. For multiple show episodes per folder, each thumb name should match its episode name without ext. (<file>.cover.jpg or <file>.jpg). To handle MS Album Art thumb names with GUID, add * to the end "AlbumArt_{*".jpg . MiniDLNA will list on screen only chosen media type (i.e. Movies), but won't other files in the same folder.
When viewing photos, progressive and/or lossless compression JPG may not be supported by your player via DLNA. Also resize photos to "suggested photo size" by the player's docs for problem free image slideshow. DLNA spec restricts image type to JPG or PNG, and max size to 4096 x 4096 pixels - and that's if the DLNA server implementation supports the LARGE format. The next size limit down (MEDIUM) is 1024 x 768, so resizing may help to show photos correctly.
To decrease system load, MiniDLNA doesn't transcode on the fly unsupported media files into supported by your player formats. When building Media_DB, it might not correctly identify whether certain formats are supported by your player, which may play via UPnP a broader formats choice. DLNA standard is quite limiting UPnP subset in media containers and codec profiles allowed. If you don't see on TV screen or can't play some media files listed in Media_DB, check if your HD started spinning or try connecting to your media player via USB for their playback. MiniDLNA might not support choosing audio tracks, subtitles, disk chapters, list sorting, and other advanced playback features for your player model
Re: [HOWTO] Install minidlna into a jail
Posted: 17 Jan 2013 19:31
by El Loco
In the folders there are only .mkv and .avi files und the music files are .mp3 . I don't know the /jail data are all mounted to /mnt/Volume/jail, for example if I delete the Filme folder inside the Jail so it disapears to in the /jail/minidlna/mnt folder , but the media data are only mounted from my media pool to /jail. But they are not mounted inside my jail /mnt/Volume/jail/...
yes he can index it in the .db , but on the webgui it says there are 0 files detected
Re: [HOWTO] Install minidlna into a jail
Posted: 17 Jan 2013 20:55
by raulfg3
El Loco wrote:n the folders there are only .mkv and .avi files und the music files are .mp3 . I don't know the /jail data are all mounted to /mnt/Volume/jail, for example if I delete the Filme folder inside the Jail so it disapears to in the /jail/minidlna/mnt folder , but the media data are only mounted from my media pool to /jail. But they are not mounted inside my jail /mnt/Volume/jail/...
Sorry I do not understand well, English is not my native language, please can you use some examples or perhaps others users that understand the problem can help?.
El Loco wrote: I don't know the /jail data are all mounted to /mnt/Volume/jail,
<- Example, I don't understand what you want to say here.
Re: [HOWTO] Install minidlna into a jail
Posted: 12 Feb 2013 16:35
by Ozar
Hey,
If you have a problem with the "rescan" which can not list the files, you must replace the file "/usr/local/etc/rc.d/minidlna" the following line:
minidlna_uid=${minidlna_uid-"dlna"}
by
minidlna_uid=${root_uid-"root"}
I solved this problem because the shared directories belong to one user and only a chmod 777 on the directory and files allow to solve the problem but security level, it was very bad.
if you think my solution is very bad security level, tell me what I need to do to respond to my problem.
Re: [HOWTO] Install minidlna into a jail
Posted: 12 Feb 2013 16:43
by alexey123
DanAddz wrote:I tested the restart of the Jail, it seemed to work, but everytime i restarted the jail, it would change the Jail's JID for e.g. 1 to 2 to 3 for everytime i restart or stop.
Add to rc.conf.local line
jail_<jailname>_flags="-l -U root -n <jailname>"
Eqv
Code: Select all
jail_proto_flags="-l -U root -n proto"
And you can call jail as name. For example
Re: [HOWTO] Install minidlna into a jail
Posted: 04 Mar 2013 17:55
by Mizma
I try to do a "pkg_add -r minidlna" but i get
Code: Select all
Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9.1-release/Latest/minidlna.tbz: File unavailable (e.g., file not found, no access)pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9.1-release/Latest/minidlna.tbz' by URL
If i follow up the link "packages-9.1-release" isn't available but
Code: Select all
ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-10-current/Latest/
is available, how do i manualy download this file or change the patch?
Re: [HOWTO] Install minidlna into a jail
Posted: 04 Mar 2013 18:11
by Mizma
Re: [HOWTO] Install minidlna into a jail
Posted: 04 Mar 2013 21:56
by raulfg3
yes, but if you see the first post I use:
Code: Select all
setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-current/Latest/
pkg_add -r minidlna
Re: [HOWTO] Install minidlna into a jail
Posted: 01 Apr 2013 03:45
by MoonDogg
First of would like to give thanks to the OP this has worked great so far. Very good tutorial.
I have a couple issues. I have setup a crontab to rescan my files every 25mins. It shows that it finds them but in the GUI and when you connect they are not there. Here is my crontab
Code: Select all
root@proto:/ # crontab -l
SHELL=/bin/sh
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
HOME=/var/log
#
#minute hour mday month wday command
#
*/25 * * * * /usr/local/etc/rc.d/minidlna rescan
#
root@proto:/ #
And here is the log of when it runs...
Code: Select all
[2013/03/31 20:25:02] minidlna.c:917: warn: Starting MiniDLNA version 1.0.24 [SQLite 3.7.14.1].
[2013/03/31 20:25:02] minidlna.c:940: warn: Creating new database...
[2013/03/31 20:25:02] scanner.c:737: warn: Scanning /mnt/Movies
[2013/03/31 20:25:02] minissdp.c:108: error: bind(udp): Address already in use
[2013/03/31 20:25:02] minissdp.c:815: error: connect("/var/run/minissdpd.sock"): No such file or directory[2013/03/31 20:25:02] minidlna.c:1009: fatal: Failed to connect to MiniSSDPd. EXITING[2013/03/31 20:25:10] scanner.c:808: warn: Scanning /mnt/Movies finished (15 files)!
[2013/03/31 20:25:10] scanner.c:737: warn: Scanning /mnt/TVShows
[2013/03/31 20:25:11] metadata.c:712: warn: Opening /mnt/TVShows/Califonication/Season 6/Californication.S06E02.720p.HDTV.x264-IMMERSE.mkv failed!
[2013/03/31 20:25:11] scanner.c:509: warn: Unsuccessful getting details for /mnt/TVShows/Califonication/Season 6/Californication.S06E02.720p.HDTV.x264-IMMERSE.mkv!
[2013/03/31 20:25:16] metadata.c:712: warn: Opening /mnt/TVShows/Califonication/Season 6/Californication.S06E07.720p.HDTV.x264-2HD.mkv failed!
[2013/03/31 20:25:16] scanner.c:509: warn: Unsuccessful getting details for /mnt/TVShows/Califonication/Season 6/Californication.S06E07.720p.HDTV.x264-2HD.mkv!
[2013/03/31 20:25:16] metadata.c:712: warn: Opening /mnt/TVShows/Califonication/Season 6/Californication.S06E08.720p.HDTV.x264-2HD.mkv failed!
[2013/03/31 20:25:16] scanner.c:509: warn: Unsuccessful getting details for /mnt/TVShows/Califonication/Season 6/Californication.S06E08.720p.HDTV.x264-2HD.mkv!
[2013/03/31 20:25:16] metadata.c:712: warn: Opening /mnt/TVShows/Califonication/Season 6/Californication.S06E09.720p.HDTV.x264-2HD.mkv failed!
[2013/03/31 20:25:16] scanner.c:509: warn: Unsuccessful getting details for /mnt/TVShows/Califonication/Season 6/Californication.S06E09.720p.HDTV.x264-2HD.mkv!
[2013/03/31 20:25:17] metadata.c:712: warn: Opening /mnt/TVShows/Califonication/Season 6/Californication.S06E10.720p.HDTV.x264-2HD.mkv failed!
[2013/03/31 20:25:17] scanner.c:509: warn: Unsuccessful getting details for /mnt/TVShows/Califonication/Season 6/Californication.S06E10.720p.HDTV.x264-2HD.mkv!
[2013/03/31 20:25:17] metadata.c:712: warn: Opening /mnt/TVShows/Califonication/Season 6/Californication.S06E11.720p.HDTV.x264-2HD.mkv failed!
[2013/03/31 20:25:17] scanner.c:509: warn: Unsuccessful getting details for /mnt/TVShows/Califonication/Season 6/Californication.S06E11.720p.HDTV.x264-2HD.mkv!
[2013/03/31 20:25:41] scanner.c:808: warn: Scanning /mnt/TVShows finished (72 files)!
[2013/03/31 20:25:42] playlist.c:126: warn: Parsing playlists...
[2013/03/31 20:29:51] upnphttp.c:1013: warn: /favicon.ico not found, responding ERROR 404
[2013/03/31 20:30:09] upnphttp.c:1053: warn: HTTP Connection closed unexpectedly
[2013/03/31 20:30:23] upnphttp.c:1013: warn: /favicon.ico not found, responding ERROR 404
[2013/03/31 20:30:26] upnphttp.c:1013: warn: /favicon.ico not found, responding ERROR 404
So I have to restart minidlna to get it to see the new files... or restart the NAS server. When I do the later I lose the ability to see the minidlna log in the webgui of Nas4Free. It seems my edits in /usr/local/www/diag_log.inc are erased after restart. Any suggestions? All help will be much appriciated.
Re: [HOWTO] Install minidlna into a jail
Posted: 01 Apr 2013 09:28
by raulfg3
MoonDogg wrote:So I have to restart minidlna to get it to see the new files... or restart the NAS server. When I do the later I lose the ability to see the minidlna log in the webgui of Nas4Free. It seems my edits in /usr/local/www/diag_log.inc are erased after restart. Any suggestions? All help will be much appriciated.
if you lose your changes, probably you have an embeded install, this howto is for full install ONLY, to use minidlna in embeded, you need to install inside a jail like is described here:
viewtopic.php?f=79&t=2099
MoonDogg wrote:/usr/local/etc/rc.d/minidlna rescan
first try if works from shell:
1 try
Code: Select all
/usr/local/etc/rc.d/minidlna rescan
2 try
both can work.
If work from shell and do not work from cron, revise permission problem ( revise what user "use" cron to execute script), and revise that this user, have permision to execute script
PD: do you create dlna user in webgui?, if yes please post a screen capture to see if dlna is his primary group and ftp or whell or root is mark as secondary group
Re: [HOWTO] Install minidlna into a jail
Posted: 01 Apr 2013 20:54
by MoonDogg
This is the topic for how to install minidlna into a jail.... and I did install it in a jail... I have already tried the command from shell... i get the same results.. your 2nd try does not work at all. command not found...
Also I did not create dlna user in webgui... I did it exactly as describe in this tutorial...
the is the command that does make it find the files.. but it restarts not rescan.. and I can't have it restart every 25mins...
/usr/local/etc/rc.d/minidlna restart
Re: [HOWTO] Install minidlna into a jail
Posted: 01 Apr 2013 21:39
by raulfg3
Sorry you are right, I mix this and the other post of howto install minidlna (without jail)
revise that you copy & paste minidlna start script properly ( No spaces on left)
/usr/local/etc/rc.d/minidlna
Code: Select all
#!/bin/sh
# $FreeBSD: ports/net/minidlna/files/minidlna.sh.in,v 1.5 2012/05/08 02:31:27 mi Exp $
#
# PROVIDE: minidlna
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf[.local] to enable minidlna:
#
# minidlna_enable="YES"
. /etc/rc.subr
name=minidlna
rcvar=minidlna_enable
command=/usr/local/sbin/minidlna
load_rc_config $name
minidlna_enable=${minidlna_enable-"NO"}
minidlna_uid=${minidlna_uid-"dlna"}
pidfile="/var/db/minidlna/minidlna.pid"
start_precmd="rm -f $pidfile"
stop_postcmd=$start_precmd
command_args="-P $pidfile -u $minidlna_uid"
extra_commands=rescan
rescan_cmd="$command -R -u $minidlna_uid"
required_dirs="/var/db/minidlna"
run_rc_command $1
This is the interesting part:
Code: Select all
extra_commands=rescan
rescan_cmd="$command -R -u $minidlna_uid"
required_dirs="/var/db/minidlna"
As you can see /var/db/minidlna must exist and MUST be writable by minidlna ( user & owner can be minidlna), revise this part too.
PD: You can test if rescan work, writing by hand the command in shell:
- /usr/local/sbin/minidlna -R -u minidlna_uid-"dlna"
<- remember to use uid of minidlna , like 12345 not "minidlna_uid text
Re: [HOWTO] Install minidlna into a jail
Posted: 03 Apr 2013 08:43
by raulfg3
other idea if latest do not work.
try to change your crontab to 2 hours like mine
Code: Select all
#minute hour mday month wday command
#
0 2 * * * /usr/local/etc/rc.d/minidlna rescan
I'm not sure if */25 is an adequate notation
Code: Select all
#minute hour mday month wday command
#
*/25 * * * * /usr/local/etc/rc.d/minidlna rescan
Re: [HOWTO] Install minidlna into a jail
Posted: 03 Apr 2013 08:57
by alexey123
I install minidlna for my TV Samsung
UA40ES5600R
It work.
But I have small troubles with Samsung's folder organize - need re compile minidlna for it. When I do it, I post binaries. Also I think, need webinterface for minidlna some as fuppes
Hmm? cron under jail? It work? May be run cronjob frob NAS4Free main? I run mrtg cron from NAS4Free, but MRTG installed under jail.
Re: [HOWTO] Install minidlna into a jail
Posted: 03 Apr 2013 09:08
by raulfg3
alexey123 wrote:Hmm? cron under jail? It work?
YES for me, not for MoonDog
alexey123 wrote:But I have small troubles with Samsung's folder organize - need re compile minidlna for it.
perhaps youn do not need, try to use browser in minidlna.conF:
Code: Select all
# use different container as root of the tree
# possible values:
# + "." - use standard container (this is the default)
# + "B" - "Browse Directory"
# + "M" - "Music"
# + "V" - "Video"
# + "P" - "Pictures"
# if you specify "B" and client device is audio-only then "Music/Folders" will be used as root
#root_container=B
alexey123 wrote:Also I think, need webinterface for minidlna some as fuppes
a lot of user thank you if finally you create an extension for minidlna, is an old request feature that developers are forgotten a lot of time. ( In this case no jail is needed , correct? )
Re: [HOWTO] Install minidlna into a jail
Posted: 03 Apr 2013 09:20
by alexey123
raulfg3 wrote:alexey123 wrote:Hmm? cron under jail? It work?
YES for me, not for MoonDog
I use such command NAS4Free cron for mrtg check.
Code: Select all
jexec omega /usr/home/alexey/mrtg.sh
where omega - name of jail
/usr/home/alexey/mrtg.sh - path under jail.
I run it every 5 minutes
perhaps youn do not need, try to use browser in minidlna.conF:
I find patch about folder organize
http://sourceforge.net/projects/minidln ... ic/5860281
a lot of user thank you if finally you create an extension for minidlna, is an old request feature that developers are forgotten a lot of time. ( In this case no jail is needed , correct? )
Jail need for it

But may be fsbruva will wrote small howto about slimjail
minidlna, when it installed into system, add also many packages. When I configure my new TV and recompile binaries, I try to build webinterface