ports/169591: net/serviio rc needs status
Ivan Sy
ivan.sy at shaw.ca
Mon Jul 2 07:40:08 UTC 2012
>Number: 169591
>Category: ports
>Synopsis: net/serviio rc needs status
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Mon Jul 02 07:40:07 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Ivan Sy
>Release: STABLE
>Organization:
Ivan Sy
>Environment:
FreeBSD server1.freebsduser.org 9.0-STABLE FreeBSD 9.0-STABLE #0: Sun Mar 25 12:46:17 MDT 2012 root at server1.freebsduser.org:/mnt/data/obj/usr/src/sys/FREEBSDUSER-ORG-03252012 amd64
>Description:
net/serviio port's rc does not come with "status"
>How-To-Repeat:
install net/serviio
execute... /usr/local/etc/rc.d/serviio status
shows "is not running" although it is running...
>Fix:
--- files/serviio.in.orig 2012-07-02 01:27:37.000000000 -0600
+++ files/serviio.in 2012-07-02 01:29:16.000000000 -0600
@@ -17,6 +17,7 @@
command=%%PREFIX%%/sbin/serviiod
load_rc_config $name
+status_cmd="${name}_status"
serviio_user=${serviio_user-"dlna"}
@@ -24,6 +25,15 @@
start_precmd="mkdir -p $_dirs; chown $serviio_user $_dirs"
command_args="$serviio_args &"
+serviio_status() {
+ serviio_pid=`ps -U ${serviio_user} | grep serviio | grep -v 'grep' | awk '{print $1}'`
+ if [ -n "${serviio_pid}" ]; then
+ echo "$name is running as ${serviio_pid}"
+ else
+ echo "$name is not running"
+ fi
+}
+
stop_cmd="$command -stop"
run_rc_command $1
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list