minidlna: restore & fix recipe

Restore minidlna recipe and bump it to v1.2.1
Move it to meta-multimedia
Signed-off-by: Baptiste Durand <baptiste.durand@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Baptiste DURAND
2018-09-11 20:17:04 +02:00
committed by Khem Raj
parent f0b1f3d30b
commit 9e050f01a9
5 changed files with 79 additions and 0 deletions
@@ -1,54 +0,0 @@
#!/bin/sh
NAME="minidlna"
DAEMON=/usr/sbin/minidlnad
SCRIPTNAME=/etc/init.d/$NAME
PIDFILE=/var/run/$NAME.pid
CONF=/etc/$NAME.conf
ARGS="-f $CONF"
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
start_function() {
export PATH=$PWD:$PATH
if [ -f ${PIDFILE} ]; then
echo "$SCRIPTNAME already running with PID #`cat $PIDFILE` ( according to ${PIDFILE} )";
exit 0
fi
$DAEMON $ARGS
pid=$!
if [ "$pid" != "" ]; then
echo -n "$pid" > ${PIDFILE}
fi
}
stop_function() {
export PATH=$PWD:$PATH
if [ ! -e "${PIDFILE}" ]; then
echo "${SCRIPTNAME} not running ( according to ${PIDFILE} )";
exit 1;
fi
PID=`cat ${PIDFILE}`
kill -INT ${PID}
rm -f ${PIDFILE}
}
case $1 in
"start")
start_function
;;
"stop")
stop_function
;;
*)
echo "Usage: $0 {start | stop}"
esac
@@ -1,10 +0,0 @@
[Unit]
Description=Minidlna Daemon
After=network.target
[Service]
Type=notify
ExecStart=/usr/sbin/minidlnad -f /etc/minidlna.conf
[Install]
WantedBy=multi-user.target