From 89a77fc8a4f8a4877ac19e81cbab2c03a7bb1626 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 29 Mar 2013 18:22:57 -0300 Subject: Initial import --- README | 2 ++ manifests/init.pp | 19 ++++++++++++++ manifests/share.pp | 15 ++++++++++++ templates/minidlna.conf.erb | 60 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 96 insertions(+) create mode 100644 README create mode 100644 manifests/init.pp create mode 100644 manifests/share.pp create mode 100644 templates/minidlna.conf.erb diff --git a/README b/README new file mode 100644 index 0000000..564c6de --- /dev/null +++ b/README @@ -0,0 +1,2 @@ +Got from https://github.com/georgebashi/systems +Needs clarification on license. diff --git a/manifests/init.pp b/manifests/init.pp new file mode 100644 index 0000000..dd3b62d --- /dev/null +++ b/manifests/init.pp @@ -0,0 +1,19 @@ +class minidlna { + package { "minidlna": } -> + service { "minidlna": } + + $conf = "/etc/minidlna.conf" + concat { $conf: + owner => root, + group => root, + require => Package[minidlna], + notify => Service[minidlna], + } + + concat::fragment { "${conf}_header": + target => $conf, + content => template("minidlna/minidlna.conf.erb"), + order => 1, + } + +} diff --git a/manifests/share.pp b/manifests/share.pp new file mode 100644 index 0000000..d1dca65 --- /dev/null +++ b/manifests/share.pp @@ -0,0 +1,15 @@ +define minidlna::share($type = undef) { + + $def = $type ? { + undef => $title, + default => "${type},${title}", + } + + $conf = "/etc/minidlna.conf" + concat::fragment { "${conf}_${title}": + target => $conf, + content => "media_dir=${def}\n", + order => 50, + } + +} diff --git a/templates/minidlna.conf.erb b/templates/minidlna.conf.erb new file mode 100644 index 0000000..033fb1a --- /dev/null +++ b/templates/minidlna.conf.erb @@ -0,0 +1,60 @@ +# port for HTTP (descriptions, SOAP, media transfer) traffic +port=8200 + +# network interfaces to serve, comma delimited +#network_interface=eth0 + +# 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 + +# set this if you want to customize the name that shows up on your clients +#friendly_name=My DLNA 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/cache/minidlna + +# set this if you would like to specify the directory where you want MiniDLNA to store its log file +#log_dir=/var/log + +# 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 + +# serial and model number the daemon will report to clients +# in its XML description +serial=12345678 +model_number=1 + +# 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=. -- cgit v1.2.3