SPECS: nagios.spec - fix webapps migration trigger

glen glen at pld-linux.org
Mon Dec 19 23:32:37 CET 2005


Author: glen                         Date: Mon Dec 19 22:32:36 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- fix webapps migration trigger

---- Files affected:
SPECS:
   nagios.spec (1.64 -> 1.65) 

---- Diffs:

================================================================
Index: SPECS/nagios.spec
diff -u SPECS/nagios.spec:1.64 SPECS/nagios.spec:1.65
--- SPECS/nagios.spec:1.64	Sun Dec 18 22:39:28 2005
+++ SPECS/nagios.spec	Mon Dec 19 23:32:31 2005
@@ -11,7 +11,7 @@
 Name:		nagios
 Version:	2.0
 %define	_rc     b6
-%define	_rel	0.1
+%define	_rel	0.2
 Release:	0.%{_rc}.%{_rel}
 License:	GPL v2
 Group:		Networking
@@ -352,7 +352,7 @@
 #'vim
 
 # webapps trigger
-%triggerpostun cgi -- %{name}-cgi < 2.0-0.b4.3.8
+%triggerpostun cgi -- %{name}-cgi < 2.0-0.b6.0.2
 for i in cgi.cfg group passwd; do
 	if [ -f /etc/nagios/$i.rpmsave ]; then
 		mv -f %{_webapps}/%{_webapp}/$i{,.rpmnew}
@@ -381,27 +381,27 @@
 fi
 
 # place new config location, as trigger puts config only on first install, do it here.
-# apache1
-if [ -d /etc/apache/webapps.d ]; then
-	/usr/sbin/webapp register apache %{_webapp}
+if [ -L /etc/apache/conf.d/99_%{name}.conf ]; then
+	rm -f /etc/apache/conf.d/99_%{name}.conf
 	apache_reload=1
 fi
-# apache2
-if [ -d /etc/httpd/webapps.d ]; then
-	/usr/sbin/webapp register httpd %{_webapp}
+if [ -L /etc/httpd/httpd.conf/99_%{name}.conf ]; then
+	rm -f /etc/httpd/httpd.conf/99_%{name}.conf
 	httpd_reload=1
 fi
 
-if [ "$httpd_reload" ]; then
-	if [ -f /var/lock/subsys/httpd ]; then
-		/etc/rc.d/init.d/httpd reload 1>&2
-	fi
-fi
 if [ "$apache_reload" ]; then
+	/usr/sbin/webapp register apache %{_webapp}
 	if [ -f /var/lock/subsys/apache ]; then
 		/etc/rc.d/init.d/apache reload 1>&2
 	fi
 fi
+if [ "$httpd_reload" ]; then
+	/usr/sbin/webapp register httpd %{_webapp}
+	if [ -f /var/lock/subsys/httpd ]; then
+		/etc/rc.d/init.d/httpd reload 1>&2
+	fi
+fi
 
 %files
 %defattr(644,root,root,755)
@@ -475,6 +475,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.65  2005/12/19 22:32:31  glen
+- fix webapps migration trigger
+
 Revision 1.64  2005/12/18 21:39:28  djrzulf
 - started update do b6, STBR AC-TEST, please,
 
================================================================

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




More information about the pld-cvs-commit mailing list