net/serviio port's rc does not come with "status" Fix: 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--xtp996z9xskdZgcAdXasLpSwVxqU3B5yuhCpYBBWZGbc7stO Content-Type: text/plain; name="file.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="file.diff" --- 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 How-To-Repeat: install net/serviio execute... /usr/local/etc/rc.d/serviio status shows "is not running" although it is running...
Responsible Changed From-To: freebsd-ports-bugs->mi mi@aldan.algebra.com => mi@ (via the GNATS Auto Assign Tool)
Maintainer of net/serviio, Please note that PR ports/169591 has just been submitted. If it contains a patch for an upgrade, an enhancement or a bug fix you agree on, reply to this email stating that you approve the patch and a committer will take care of it. The full text of the PR can be found at: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/169591 -- Edwin Groothuis via the GNATS Auto Assign Tool edwin@FreeBSD.org
State Changed From-To: open->feedback Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Responsible Changed From-To: mi->netchild Over to new maintainer.
Author: netchild Date: Mon Jan 28 19:56:45 2013 New Revision: 311134 URL: http://svnweb.freebsd.org/changeset/ports/311134 Log: Add support for the status command in the rc script. The change is inspired by the patch in the PR. PR: ports/169591 Submitted by: Ivan Sy <ivan.sy@shaw.ca> Modified: head/net/serviio/Makefile head/net/serviio/files/serviio.in Modified: head/net/serviio/Makefile ============================================================================== --- head/net/serviio/Makefile Mon Jan 28 18:07:31 2013 (r311133) +++ head/net/serviio/Makefile Mon Jan 28 19:56:45 2013 (r311134) @@ -3,6 +3,7 @@ PORTNAME= serviio PORTVERSION= 1.1 +PORTREVISION= 1 CATEGORIES= net multimedia java www MASTER_SITES= http://download.serviio.org/releases/ EXTRACT_SUFX= -linux.tar.gz Modified: head/net/serviio/files/serviio.in ============================================================================== --- head/net/serviio/files/serviio.in Mon Jan 28 18:07:31 2013 (r311133) +++ head/net/serviio/files/serviio.in Mon Jan 28 19:56:45 2013 (r311134) @@ -26,4 +26,14 @@ command_args="$serviio_args &" stop_cmd="$command -stop" +status_cmd=${name}_status +serviio_status() { + serviio_pid=$(ps -aU ${serviio_user} | awk '/java/ {print $1}') + if [ -n "${serviio_pid}" ]; then + echo "${name} is running as pid ${serviio_pid}" + else + echo "${name} is not running" + fi +} + run_rc_command $1 _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
State Changed From-To: feedback->closed A modified version of the patch is committed.