cvs commit: ports/net Makefile ports/net/crtmpserver Makefile
distinfo pkg-descr pkg-plist ports/net/crtmpserver/files
crtmpserver.in
Doug Barton
dougb at FreeBSD.org
Mon Feb 28 22:22:01 UTC 2011
There are a few problems with the rc.d script for this port, but overall
it looks quite good. I think you've probably already seen this, but just
in case there is more information available at:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/rc-scripts.html
The biggest problem (that needs to be fixed) is that we do not like to
have code executed unconditionally by scripts, especially when it's only
appropriate at start time. The other bug is that although you specify
the ability to set _user in the comments, you write it unconditionally
at install time. It's ok not to allow setting of _user, but generally
it's preferred for services that run as a specific user so I fixed it
instead of removing the documentation.
The last changes are recommendations, use them at your discretion. Since
the config file seems to be required I added it to required_files. This
is a safety belt in rc.subr that will prevent the script from trying to
run the service if the file is missing. The other recommended change is
to use pgrep to find the pid, which unless I'm really missing something
is now present on all supported versions of FreeBSD.
Maintainer, please test these changes and let us know what you approve ASAP.
hth,
Doug
On 02/28/2011 05:57, Sylvio Cesar Teixeira wrote:
> sylvio 2011-02-28 13:57:38 UTC
>
> FreeBSD ports repository
>
> Modified files:
> net Makefile
> Added files:
> net/crtmpserver Makefile distinfo pkg-descr pkg-plist
> net/crtmpserver/files crtmpserver.in
> Log:
> High performance RTMP/RTSP streaming server
> rtmpd is a high performance streaming server able to stream
> (live or recorded) in the following technologies:
> - To and from Flash (RTMP,RTMPE, RTMPS, RTMPT, RTMPTE)
> - To and from embedded devices: iPhone, Android
> - From surveillance cameras
> - IP-TV using MPEG-TS and RTSP/RTCP/RTP protocols
> Also, rtmpd can be used as a high performance rendes-vous server.
> For example, it enables you to do:
> - Audio/Video conferencing
> - Online gaming
> - Online collaboration
> - Simple/complex chat applications
>
> WWW: http://www.rtmpd.com
>
> PR: ports/155033 http://www.FreeBSD.org/cgi/query-pr.cgi?pr=155033
> Submitted by: Gavriloaie Eugen-Andrei<crtmpserver at gmail.com>
>
> Revision Changes Path
> 1.2320 +1 -0 ports/net/Makefile
> 1.1 +39 -0 ports/net/crtmpserver/Makefile (new)
> 1.1 +2 -0 ports/net/crtmpserver/distinfo (new)
> 1.1 +37 -0 ports/net/crtmpserver/files/crtmpserver.in (new)
> 1.1 +15 -0 ports/net/crtmpserver/pkg-descr (new)
> 1.1 +27 -0 ports/net/crtmpserver/pkg-plist (new)
>
> http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/net/Makefile.diff?&r1=1.2319&r2=1.2320&f=h
> http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/net/crtmpserver/Makefile
> http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/net/crtmpserver/distinfo
> http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/net/crtmpserver/files/crtmpserver.in
> http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/net/crtmpserver/pkg-descr
> http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/net/crtmpserver/pkg-plist
>
--
Nothin' ever doesn't change, but nothin' changes much.
-- OK Go
Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price. :) http://SupersetSolutions.com/
-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/net/crtmpserver/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- Makefile 28 Feb 2011 13:57:38 -0000 1.1
+++ Makefile 28 Feb 2011 22:06:18 -0000
@@ -7,6 +7,7 @@
PORTNAME= crtmpserver
PORTVERSION= 0.355
+PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= http://freebsd.rtmpd.com/
Index: files/crtmpserver.in
===================================================================
RCS file: /home/pcvs/ports/net/crtmpserver/files/crtmpserver.in,v
retrieving revision 1.1
diff -u -r1.1 crtmpserver.in
--- files/crtmpserver.in 28 Feb 2011 13:57:38 -0000 1.1
+++ files/crtmpserver.in 28 Feb 2011 22:06:18 -0000
@@ -25,13 +25,21 @@
command=%%PREFIX%%/sbin/${name}
pidfile=/var/run/${name}.pid
+start_postcmd="${name}_poststart"
+
+crtmpserver_poststart()
+{
+ pgrep crtmpserver > /var/run/crtmpserver.pid
+}
+
load_rc_config $name
: ${crtmpserver_enable="NO"}
: ${crtmpserver_config="%%PREFIX%%/etc/crtmpserver.lua"}
+: ${crtmpserver_username="%%USERS%%"}
+
+required_files="$crtmpserver_config"
-crtmpserver_username="%%USERS%%"
-command_args="--daemon --uid=`id -u ${crtmpserver_username}` $crtmpserver_config"
+command_args="--daemon --uid=`id -u ${crtmpserver_username}` $required_files"
run_rc_command "$1"
-ps -axo pid,comm|grep crtmpserver|cut -d " " -f1 >/var/run/crtmpserver.pid
More information about the cvs-ports
mailing list