Date: Mon, 2 Jul 2012 07:33:12 GMT From: Ivan Sy <ivan.sy@shaw.ca> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/169591: net/serviio rc needs status Message-ID: <201207020733.q627XC7I011060@red.freebsd.org> Resent-Message-ID: <201207020740.q627e7so079422@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207020733.q627XC7I011060>