rpms/ntop/devel ntop.spec,1.5,1.6

Peter Vrabec pvrabec at fedoraproject.org
Tue Mar 3 09:14:31 UTC 2009


Author: pvrabec

Update of /cvs/extras/rpms/ntop/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv18958

Modified Files:
	ntop.spec 
Log Message:
do not create new certificate if there is already one installed



Index: ntop.spec
===================================================================
RCS file: /cvs/extras/rpms/ntop/devel/ntop.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ntop.spec	2 Mar 2009 18:09:12 -0000	1.5
+++ ntop.spec	3 Mar 2009 09:14:00 -0000	1.6
@@ -1,6 +1,6 @@
 Name:           ntop
 Version:        3.3.9
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        A network traffic probe similar to the UNIX top command
 Group:          Applications/Internet
 License:        GPLv2
@@ -147,11 +147,14 @@
 
 # create new self-signed certificate
 %define sslcert %{_sysconfdir}/ntop/ntop-cert.pem
-FQDN=`hostname`
-if [ "x${FQDN}" = "x" ]; then
-   FQDN=localhost.localdomain
-fi
-cat << EOF | %{_bindir}/openssl req -new -newkey rsa:1024 -days 365 -nodes -x509 -keyout %{sslcert}  -out %{sslcert} 2>/dev/null
+if [ ! -f %{sslcert} ] ; then
+ #get hosname
+ FQDN=`hostname`
+ if [ "x${FQDN}" = "x" ]; then
+    FQDN=localhost.localdomain
+ fi
+ #create key and certificate in one file
+ cat << EOF | %{_bindir}/openssl req -new -newkey rsa:1024 -days 365 -nodes -x509 -keyout %{sslcert}  -out %{sslcert} 2>/dev/null
 --
 SomeState
 SomeCity
@@ -160,6 +163,7 @@
 ${FQDN}
 root@${FQDN}
 EOF
+fi
 
 %preun
 if [ $1 = 0 ]; then
@@ -207,6 +211,9 @@
 %{_localstatedir}/lib/ntop/rrd
 
 %changelog
+* Tue Mar 03 2009 Peter Vrabec <pvrabec at redhat.com> - 3.3.9-2
+- do not create new certificate if there is already one installed
+
 * Fri Feb 27 2009 Peter Vrabec <pvrabec at redhat.com> - 3.3.9-1
 - upgrade
 - invalid certificate fix (#486725)




More information about the fedora-extras-commits mailing list