• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Solved minidlna service won't stop

zsolt

New Member


Messages: 9

#1
Hello

When I do:

Code:
root@server:~ # service minidlna stop
Stopping minidlna.
Waiting for PIDS: 31181
this won't exit minidlna only by ctrl+c and in top the service is still there:
31181 dlna 2 39 19 155M 17064K uwait 0:00 0.00% minidlnad

I can stop it only by this: kill -KILL 31181
Any suggestions?
 

butaford

New Member


Messages: 1

#4
Temp and Crutch rc.d script:
Code:
#!/bin/sh
#
# $FreeBSD: head/net/minidlna/files/minidlna.in 323762 2013-07-26 23:25:40Z wg $
#
# PROVIDE: minidlna
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf[.local] to enable minidlna:
#
# mdlna_enable="YES"

. /etc/rc.subr

name=mdlna
rcvar=mdlna_enable

load_rc_config $name

mdlna_enable=${mdlna_enable-"NO"}
mdlna_uid=${mdlna_uid-"dlna"}

command=/usr/local/sbin/minidlnad
pidfile="/var/run/minidlna/minidlna.pid"
command_args="-P $pidfile -u $mdlna_uid -f /usr/local/etc/minidlna.conf"

start_precmd="install -d -o $mdlna_uid ${pidfile%/*} /var/db/minidlna"
stop_precmd="kill -9 $(ps aux | grep minidlna | grep -v grep | awk '{print $2}')"
stop_postcmd="rm -f $pidfile"

extra_commands=rescan
rescan_cmd="$command -R -u $mdlna_uid -f /usr/local/etc/minidlna.conf"

run_rc_command $1
echo Running for PIDS: `ps aux | grep minidlna | grep -v grep | awk '{print $2}'`.
Save in /usr/local/etc/rc.d/mdlna
Add echo mdlna_enable=\"YES\" >> /etc/rc.conf
Disable minidlna_enable="YES"