SPECS: monit-rc-apache.spec - install as httpd.monitrc

qboosh qboosh at pld-linux.org
Tue Nov 21 13:27:04 CET 2006


Author: qboosh                       Date: Tue Nov 21 12:27:04 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- install as httpd.monitrc

---- Files affected:
SPECS:
   monit-rc-apache.spec (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: SPECS/monit-rc-apache.spec
diff -u SPECS/monit-rc-apache.spec:1.2 SPECS/monit-rc-apache.spec:1.3
--- SPECS/monit-rc-apache.spec:1.2	Tue Nov 21 13:23:23 2006
+++ SPECS/monit-rc-apache.spec	Tue Nov 21 13:26:59 2006
@@ -25,7 +25,8 @@
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_sysconfdir}/monit
-install %{SOURCE0} $RPM_BUILD_ROOT%{_sysconfdir}/monit
+
+install %{SOURCE0} $RPM_BUILD_ROOT%{_sysconfdir}/monit/httpd.monitrc
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -36,6 +37,13 @@
 %postun
 %service -q monit restart
 
+%triggerpostun -- apache < 2.2.0
+# rename monitrc to be service name like other files
+if [ -f /etc/monit/apache.monitrc.rpmsave ]; then
+	mv -f /etc/monit/httpd.monitrc{,.rpmnew}
+	mv -f /etc/monit/{apache.monitrc.rpmsave,httpd.monitrc}
+fi
+
 %files
 %defattr(644,root,root,755)
 %{_sysconfdir}/monit/*.monitrc
@@ -46,6 +54,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.3  2006/11/21 12:26:59  qboosh
+- install as httpd.monitrc
+
 Revision 1.2  2006/11/21 12:23:23  qboosh
 - setup not needed
 - Requires(post,postun): monit (for restart)
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/monit-rc-apache.spec?r1=1.2&r2=1.3&f=u



More information about the pld-cvs-commit mailing list