Package: minidlna Version: 1.0.18-4 Severity: normal Tags: patch If minidlna is run as user minidlna it is unable to create the pid-file:
daemonize.c:98: error: Unable to open pidfile for writing /var/run/minidlna.pid: Keine Berechtigung This is because the directory /var/run is owned by root. The attached patch creates a directory /var/run/minidlna with owner minidlna and uses the file /var/run/minidlna/minidlna.pid as pid-file. This also fixes bug # 613853. Regards, Thomas Viehweger
--- /etc/init.d/minidlna.old 2011-03-10 21:21:53.776666671 +0100 +++ /etc/init.d/minidlna 2011-03-10 22:24:37.770000003 +0100 @@ -27,7 +27,8 @@ DESC="DLNA/UPnP-AV media server" NAME=minidlna DAEMON=/usr/bin/minidlna -PIDFILE=/var/run/$NAME.pid +PIDFILE=/var/run/$NAME/$NAME.pid +PIDDIR=/var/run/$NAME SCRIPTNAME=/etc/init.d/$NAME DEFAULT=/etc/default/$NAME @@ -82,6 +83,7 @@ # 0 if daemon has been started # 1 if daemon was already running # 2 if daemon could not be started + install -o $USER -g $GROUP -d $PIDDIR touch $LOGFILE chown $USER:$GROUP $LOGFILE start-stop-daemon --start --quiet --pidfile $PIDFILE \