]> git.pld-linux.org Git - packages/monit-rc-apache1.git/commitdiff
- add sample cron job to add apache back to monitoring state in case it forgotten AC-branch auto/ac/monit-rc-apache1-1.2-1 auto/th/monit-rc-apache1-1.2-1
authorElan Ruusamäe <glen@delfi.ee>
Mon, 24 Sep 2012 09:33:02 +0000 (12:33 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Mon, 24 Sep 2012 09:33:02 +0000 (12:33 +0300)
apache1.cron [new file with mode: 0644]
monit-rc-apache1.spec

diff --git a/apache1.cron b/apache1.cron
new file mode 100644 (file)
index 0000000..52ea238
--- /dev/null
@@ -0,0 +1,7 @@
+MAILTO=root
+
+# try to monitor again Apache
+
+# needed in cases when restarts get timeout and later problem is fixed by
+# sysadmin. something needs to give a kick to get apache back to monitoring.
+#55 */3 * * * root /usr/sbin/monit monitor apache
index f1dccb747c2274a705b5322ab030286e9495b231..8f19a364c907f55bdbbc21014ae81712072cc750 100644 (file)
@@ -1,15 +1,17 @@
 Summary:       monitrc file for monitoring Apache 1.x web server
 Summary(pl.UTF-8):     Plik monitrc do monitorowania serwera WWW Apache 1.x
 Name:          monit-rc-apache1
-Version:       1.1
-Release:       2
+Version:       1.2
+Release:       1
 License:       GPL
 Group:         Applications/System
 Source0:       apache1.monitrc
+Source1:       apache1.cron
 BuildRequires: rpmbuild(macros) >= 1.268
 Requires(post,postun): monit
 Requires:      apache1-base >= 1.3.39-2
 Requires:      monit
+Suggests:      crondaemon
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -23,9 +25,10 @@ Plik monitrc do monitorowania serwera WWW Apache 1.x.
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_sysconfdir}/monit
+install -d $RPM_BUILD_ROOT{%{_sysconfdir}/monit,/etc/cron.d}
 
-install %{SOURCE0} $RPM_BUILD_ROOT%{_sysconfdir}/monit/apache.monitrc
+cp -p %{SOURCE0} $RPM_BUILD_ROOT%{_sysconfdir}/monit/apache.monitrc
+cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/cron.d/%{name}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -46,3 +49,4 @@ fi
 %files
 %defattr(644,root,root,755)
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/monit/*.monitrc
+%config(noreplace) %verify(not md5 mtime size) /etc/cron.d/%{name}
This page took 0.085847 seconds and 4 git commands to generate.