packages: red5/red5.spec - use red5 user and servlet group, run chkconfig

pawelz pawelz at pld-linux.org
Tue Oct 27 19:22:25 CET 2009


Author: pawelz                       Date: Tue Oct 27 18:22:25 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- use red5 user and servlet group, run chkconfig

---- Files affected:
packages/red5:
   red5.spec (1.13 -> 1.14) 

---- Diffs:

================================================================
Index: packages/red5/red5.spec
diff -u packages/red5/red5.spec:1.13 packages/red5/red5.spec:1.14
--- packages/red5/red5.spec:1.13	Tue Oct 27 19:15:27 2009
+++ packages/red5/red5.spec	Tue Oct 27 19:22:19 2009
@@ -15,6 +15,8 @@
 Source1:	%{name}
 URL:		http://red5.org/
 BuildRequires:	rpmbuild(macros) >= 1.300
+Provides:       group(servlet)
+Provides:       user(red5)
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -69,6 +71,26 @@
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%pre
+%groupadd -g 237 -r -f servlet
+%useradd -u 243 -r -d /var/lib/red5 -s /bin/false -c "red5 user" -g servlet red5
+
+%post
+/sbin/chkconfig --add red5
+%service red5 restart
+
+%preun
+if [ "$1" = "0" ]; then
+	%service red5 stop
+	/sbin/chkconfig --del red5
+fi
+
+%postun
+if [ "$1" = "0" ]; then
+	%userremove red5
+	%groupremove servlet
+fi
+
 %post javadoc
 ln -nfs %{name}-%{version} %{_javadocdir}/%{name}
 
@@ -77,7 +99,7 @@
 %doc license.txt
 %attr(755,root,root) %{_bindir}/red5
 %{_appdir}
-%attr(755,red5,red5) %{_localstatedir}/%{name}
+%attr(775,red5,servlet) %{_localstatedir}/%{name}
 
 %files javadoc
 %defattr(644,root,root,755)
@@ -90,6 +112,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.14  2009/10/27 18:22:19  pawelz
+- use red5 user and servlet group, run chkconfig
+
 Revision 1.13  2009/10/27 18:15:27  pawelz
 - up to 0.8.0
 - use binary package. build scripts downloads a lot of libraries. It needs
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/red5/red5.spec?r1=1.13&r2=1.14&f=u



More information about the pld-cvs-commit mailing list