[packages/nginx/dev-dynamic] just one monitrc config

glen glen at pld-linux.org
Wed Oct 19 20:34:31 CEST 2016


commit 7f97359cc730b99b7a01f41c6ab17cff4847cf90
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Wed Oct 19 21:32:54 2016 +0300

    just one monitrc config

 nginx-light.monitrc                     | 33 ---------------------------------
 nginx-mail.monitrc                      | 32 --------------------------------
 nginx-perl.monitrc                      | 33 ---------------------------------
 nginx-standard.monitrc => nginx.monitrc |  0
 nginx.spec                              | 11 ++++-------
 5 files changed, 4 insertions(+), 105 deletions(-)
---
diff --git a/nginx.spec b/nginx.spec
index 2629420..31fab82 100644
--- a/nginx.spec
+++ b/nginx.spec
@@ -48,13 +48,10 @@ Source1:	http://nginx.net/favicon.ico
 Source2:	proxy.conf
 Source3:	%{name}.logrotate
 Source4:	%{name}.mime
-Source6:	%{name}-light.monitrc
+Source6:	%{name}.monitrc
 Source7:	%{name}.init
 Source8:	%{name}-mail.conf
-Source9:	%{name}-mail.monitrc
-Source12:	%{name}-perl.monitrc
 Source14:	%{name}.conf
-Source15:	%{name}-standard.monitrc
 Source17:	%{name}-mime.types.sh
 Source18:	%{name}.service
 Source22:	http://www.modsecurity.org/tarball/%{modsecurity_version}/modsecurity-%{modsecurity_version}.tar.gz
@@ -441,9 +438,9 @@ install -d $RPM_BUILD_ROOT/etc/rc.d/init.d \
 
 %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/*.default
 
-cp -p %{_sourcedir}/%{name}.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
-cp -p %{_sourcedir}/%{name}.service $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
-cp -p %{_sourcedir}/%{name}-standard.monitrc $RPM_BUILD_ROOT/etc/monit/%{name}.monitrc
+cp -p %{_sourcedir}/%{name}.conf $RPM_BUILD_ROOT%{_sysconfdir}
+cp -p %{_sourcedir}/%{name}.service $RPM_BUILD_ROOT%{systemdunitdir}
+cp -p %{_sourcedir}/%{name}.monitrc $RPM_BUILD_ROOT/etc/monit
 install -p %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
 
 cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
diff --git a/nginx-light.monitrc b/nginx-light.monitrc
deleted file mode 100644
index 356c4a6..0000000
--- a/nginx-light.monitrc
+++ /dev/null
@@ -1,33 +0,0 @@
-check process nginx-light with pidfile /var/run/nginx-light.pid
-	group www
-	start program = "/etc/rc.d/init.d/nginx-light start"
-	stop program = "/etc/rc.d/init.d/nginx-light stop"
-	if failed url http://localhost/ timeout 10 seconds then restart
-#	if failed host 192.168.1.1 port 443 type TCPSSL
-#		certmd5 12-34-56-78-90-AB-CD-EF-12-34-56-78-90-AB-CD-EF
-#		protocol HTTP request /monit/token  then restart
-	if 5 restarts within 5 cycles then timeout
-#	alert root at localhost
-#	alert 123456 at sms on { timeout }
-	depends on nginx-light_bin
-	depends on nginx-light_rc
-
-check file nginx-light_bin with path /usr/sbin/nginx-light
-	group nginx
-	if failed checksum then unmonitor
-	if failed permission 755 then unmonitor
-	if failed uid root then unmonitor
-	if failed gid root then unmonitor
-#	alert root at localhost
-
-check file nginx-light_rc with path /etc/rc.d/init.d/nginx-light
-	group nginx
-	if failed checksum then unmonitor
-	if failed permission 754 then unmonitor
-	if failed uid root then unmonitor
-	if failed gid root then unmonitor
-#	alert root at localhost
-
-check file nginx-light.conf path /etc/nginx/nginx-light.conf
-	if changed sha1 checksum 
-	then exec "/etc/init.d/nginx-light graceful"
diff --git a/nginx-mail.monitrc b/nginx-mail.monitrc
deleted file mode 100644
index 8d5d973..0000000
--- a/nginx-mail.monitrc
+++ /dev/null
@@ -1,32 +0,0 @@
-check host nginx-mail with address 127.0.0.1
-	group nginx
-	if failed host 127.0.0.1 port 25 type TCP protocol smtp for 2 cycles then alert
-	if failed host 127.0.0.1 port 110 type TCP protocol pop3 for 2 cycles then alert
-	if failed host 127.0.0.1 port 143 type TCP proto tcp for 2 cycles then alert
-#	if failed icmp type echo with timeout 20 seconds for 5 cycles then alert
-#	alert root at localhost
-#	alert 123456 at sms on { timeout }
-	depends on nginx-mail_bin
-	depends on nginx-mail_rc
-
-
-
-check file nginx-mail_bin with path /usr/sbin/nginx-mail
-	group nginx
-	if failed checksum then unmonitor
-	if failed permission 755 then unmonitor
-	if failed uid root then unmonitor
-	if failed gid root then unmonitor
-#	alert root at localhost
-
-check file nginx-mail_rc with path /etc/rc.d/init.d/nginx-mail
-	group nginx
-	if failed checksum then unmonitor
-	if failed permission 754 then unmonitor
-	if failed uid root then unmonitor
-	if failed gid root then unmonitor
-#	alert root at localhost
-
-check file nginx-mail.conf path /etc/nginx/nginx-mail.conf
-	if changed sha1 checksum 
-	then exec "/etc/init.d/nginx-mail graceful"
diff --git a/nginx-perl.monitrc b/nginx-perl.monitrc
deleted file mode 100644
index fb70946..0000000
--- a/nginx-perl.monitrc
+++ /dev/null
@@ -1,33 +0,0 @@
-check process nginx-perl with pidfile /var/run/nginx-perl.pid
-	group www
-	start program = "/etc/rc.d/init.d/nginx-perl start"
-	stop program = "/etc/rc.d/init.d/nginx-perl stop"
-	if failed url http://localhost/ timeout 10 seconds then restart
-#	if failed host 192.168.1.1 port 443 type TCPSSL
-#		certmd5 12-34-56-78-90-AB-CD-EF-12-34-56-78-90-AB-CD-EF
-#		protocol HTTP request /monit/token  then restart
-	if 5 restarts within 5 cycles then timeout
-#	alert root at localhost
-#	alert 123456 at sms on { timeout }
-	depends on nginx-perl_bin
-	depends on nginx-perl_rc
-
-check file nginx-perl_bin with path /usr/sbin/nginx-perl
-	group nginx
-	if failed checksum then unmonitor
-	if failed permission 755 then unmonitor
-	if failed uid root then unmonitor
-	if failed gid root then unmonitor
-#	alert root at localhost
-
-check file nginx-standard_rc with path /etc/rc.d/init.d/nginx-perl
-	group perl
-	if failed checksum then unmonitor
-	if failed permission 754 then unmonitor
-	if failed uid root then unmonitor
-	if failed gid root then unmonitor
-#	alert root at localhost
-
-check file nginx-perl.conf path /etc/nginx/nginx-perl.conf
-	if changed sha1 checksum 
-	then exec "/etc/init.d/nginx-perl graceful"
diff --git a/nginx-standard.monitrc b/nginx.monitrc
similarity index 100%
rename from nginx-standard.monitrc
rename to nginx.monitrc
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nginx.git/commitdiff/478bc5b00396acda847e32f4d7efd85e3c5a9d94



More information about the pld-cvs-commit mailing list