Minidlna rc.d script

This forum is for all other ARMv5 devices

Minidlna rc.d script

Postby Speed383 » Tue May 21, 2013 4:08 am

Need minidlna rc.d script please.
Speed383
 
Posts: 10
Joined: Mon Jul 30, 2012 1:29 pm

Re: Minidlna rc.d script

Postby dinjo » Wed May 22, 2013 4:27 pm

The daemon has now being named as minidlnad

$this->bbcode_second_pass_code('', '#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions
. /etc/conf.d/minidlna
. /etc/minidlna.conf

daemon_name=minidlna

get_pid() {
pidof o %PPID /usr/sbin/minidlnad
}

case "$1" in
start)
stat_busy "Starting minidlna"
PID=$(get_pid)
if [[ -z "$PID" ]]; then
rm -f /var/run/$daemon_name.pid
touch /var/run/$daemon_name.pid
mkdir -p /var/cache/minidlna
su -s /bin/sh -l -c "/usr/sbin/minidlnad ${MINIDLNA_OPTS} $2" $MINIDLNA_USER
if [[ $? -gt 0 ]]; then
stat_fail
exit 1
else
add_daemon $daemon_name
stat_done
fi
else
stat_fail
exit 1
fi
;;

stop)
stat_busy "Stopping minidlna"
PID=$(get_pid)
[[ -n $PID ]] && kill $PID &> /dev/null
if [ $? -gt 0 ]; then
stat_fail
exit 1
else
rm f /var/run/$daemon_name.pid &> /dev/null
rm_daemon minidlna
stat_done
fi
;;

clean)
$0 stop
sleep 1
stat_busy "Cleaning minidlna cache"
[ -z $db_dir ] || rm -r $db_dir/*
stat_done
sleep 1
$0 start
;;

restart)
$0 stop
sleep 1
$0 start
;;

rescan)
$0 stop
sleep 1
$0 start R
;;

*)
echo "usage: $0 {start|stop|restart|clean}"
esac
exit 0')
dinjo
 
Posts: 258
Joined: Mon Nov 28, 2011 5:59 am

Re: Minidlna rc.d script

Postby nick2012 » Sat May 25, 2013 8:40 am

Conf.d also pls
nick2012
 
Posts: 85
Joined: Fri Apr 26, 2013 6:03 pm

Re: Minidlna rc.d script

Postby dinjo » Sat May 25, 2013 4:34 pm

$this->bbcode_second_pass_code('', '# port for HTTP (descriptions, SOAP, media transfer) traffic
port=8200

# network interfaces to serve, comma delimited
#network_interface=eth0

# specify the user account name or uid to run as
#user=jmaggard

# set this to the directory you want scanned.
# * if you want multiple directories, you can have multiple media_dir= lines
# * if you want to restrict a media_dir to specific content types, you
# can prepend the types, 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)
# + "PV" for pictures and video (eg. media_dir=AV,/home/jmaggard/digital_camera)
media_dir=V,/media/Data/data/

# 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

# 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

# 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

[root@alarm conf.d]# more ../minidlna.conf
# port for HTTP (descriptions, SOAP, media transfer) traffic
port=8200

# network interfaces to serve, comma delimited
#network_interface=eth0

# specify the user account name or uid to run as
#user=jmaggard

# set this to the directory you want scanned.
# * if you want multiple directories, you can have multiple media_dir= lines
# * if you want to restrict a media_dir to specific content types, you
# can prepend the types, 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)
# + "PV" for pictures and video (eg. media_dir=AV,/home/jmaggard/digital_camera)

# 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

# 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

# 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=.
')
dinjo
 
Posts: 258
Joined: Mon Nov 28, 2011 5:59 am


Return to Community Supported

Who is online

Users browsing this forum: No registered users and 4 guests