SPECS: nagios.spec - use apache config triggers - rel 2

glen glen at pld-linux.org
Tue Aug 9 12:20:04 CEST 2005


Author: glen                         Date: Tue Aug  9 10:20:04 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use apache config triggers
- rel 2

---- Files affected:
SPECS:
   nagios.spec (1.58 -> 1.59) 

---- Diffs:

================================================================
Index: SPECS/nagios.spec
diff -u SPECS/nagios.spec:1.58 SPECS/nagios.spec:1.59
--- SPECS/nagios.spec:1.58	Tue Aug  9 11:01:26 2005
+++ SPECS/nagios.spec	Tue Aug  9 12:19:58 2005
@@ -11,7 +11,8 @@
 Name:		nagios
 Version:	2.0
 %define	_rc     b4
-Release:	0.%{_rc}.1
+%define	_rel	2
+Release:	0.%{_rc}.%{_rel}
 License:	GPL v2
 Group:		Networking
 Source0:	http://dl.sourceforge.net/nagios/%{name}-%{version}%{_rc}.tar.gz
@@ -35,7 +36,7 @@
 BuildRequires:	libpng-devel
 BuildRequires:	sed >= 4.0
 %endif
-BuildRequires:	rpmbuild(macros) >= 1.202
+BuildRequires:	rpmbuild(macros) >= 1.226
 BuildRequires:	tar >= 1:1.15.1
 PreReq:		%{name}-common = %{version}-%{release}
 PreReq:		rc-scripts
@@ -272,21 +273,6 @@
 %post cgi
 %addusertogroup http nagios-data
 
-# apache1
-if [ -d %{_apache1dir}/conf.d ]; then
-	ln -sf %{_sysconfdir}/apache-%{name}.conf %{_apache1dir}/conf.d/99_%{name}.conf
-	if [ -f /var/lock/subsys/apache ]; then
-		/etc/rc.d/init.d/apache restart 1>&2
-	fi
-fi
-# apache2
-if [ -d %{_apache2dir}/httpd.conf ]; then
-	ln -sf %{_sysconfdir}/apache-%{name}.conf %{_apache2dir}/httpd.conf/99_%{name}.conf
-	if [ -f /var/lock/subsys/httpd ]; then
-		/etc/rc.d/init.d/httpd restart 1>&2
-	fi
-fi
-
 if [ "$1" = 1 ]; then
 %banner %{name} -e <<EOF
 NOTE:
@@ -295,23 +281,17 @@
 EOF
 fi
 
-%preun cgi
-if [ "$1" = "0" ]; then
-	# apache1
-	if [ -d %{_apache1dir}/conf.d ]; then
-		rm -f %{_apache1dir}/conf.d/99_%{name}.conf
-		if [ -f /var/lock/subsys/apache ]; then
-			/etc/rc.d/init.d/apache restart 1>&2
-		fi
-	fi
-	# apache2
-	if [ -d %{_apache2dir}/httpd.conf ]; then
-		rm -f %{_apache2dir}/httpd.conf/99_%{name}.conf
-		if [ -f /var/lock/subsys/httpd ]; then
-			/etc/rc.d/init.d/httpd restart 1>&2
-		fi
-	fi
-fi
+%triggerin cgi -- apache1 >= 1.3.33-2
+%apache_config_install -v 1 -c %{_sysconfdir}/apache-%{name}.conf
+
+%triggerun cgi -- apache1 >= 1.3.33-2
+%apache_config_uninstall -v 1
+
+%triggerin cgi -- apache >= 2.0.0
+%apache_config_install -v 2 -c %{_sysconfdir}/apache-%{name}.conf
+
+%triggerun cgi -- apache >= 2.0.0
+%apache_config_uninstall -v 2
 
 %triggerpostun -- nagios-cgi < 2.0-0.b3.21
 chown root:http %{_sysconfdir}/cgi.cfg
@@ -447,6 +427,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.59  2005/08/09 10:19:58  glen
+- use apache config triggers
+- rel 2
+
 Revision 1.58  2005/08/09 09:01:26  havner
 - 2.0 b4
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/nagios.spec?r1=1.58&r2=1.59&f=u




More information about the pld-cvs-commit mailing list