From d36291d8e589150cecbd7586df54264dfe085c64 Mon Sep 17 00:00:00 2001 From: jjh Date: Sat, 17 Oct 2009 21:20:16 +0000 Subject: [PATCH] update to 1.3.22 and add logrotate script --- .cvsignore | 1 + haproxy.cfg | 17 +++++++++++++++++ haproxy.logrotate | 12 ++++++++++++ haproxy.spec | 9 ++++++++- sources | 1 + 5 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 haproxy.logrotate diff --git a/.cvsignore b/.cvsignore index eee51f3..210cf3d 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,3 +1,4 @@ haproxy-1.3.19.tar.gz haproxy-1.3.20.tar.gz haproxy-1.3.21.tar.gz +haproxy-1.3.22.tar.gz diff --git a/haproxy.cfg b/haproxy.cfg index 22a7b41..a35d08c 100644 --- a/haproxy.cfg +++ b/haproxy.cfg @@ -10,7 +10,21 @@ # Global settings #--------------------------------------------------------------------- global + # to have these messages end up in /var/log/haproxy.log you will + # need to: + # + # 1) configure syslog to accept network log events. This is done + # by adding the '-r' option to the SYSLOGD_OPTIONS in + # /etc/sysconfig/syslog + # + # 2) configure local2 events to go to the /var/log/haproxy.log + # file. A line like the following can be added to + # /etc/sysconfig/syslog + # + # local2.* /var/log/haproxy.log + # log 127.0.0.1 local2 + chroot /var/lib/haproxy pidfile /var/run/haproxy.pid maxconn 4000 @@ -18,6 +32,9 @@ global group haproxy daemon + # turn on stats unix socket + stats socket /var/lib/haproxy/stats + #--------------------------------------------------------------------- # common defaults that all the 'listen' and 'backend' sections will # use if not designated in their block diff --git a/haproxy.logrotate b/haproxy.logrotate new file mode 100644 index 0000000..96544e0 --- /dev/null +++ b/haproxy.logrotate @@ -0,0 +1,12 @@ +/var/log/haproxy.log { + daily + rotate 10 + missingok + notifempty + compress + sharedscripts + postrotate + /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true + /bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true + endscript +} diff --git a/haproxy.spec b/haproxy.spec index 0453911..250bdf7 100644 --- a/haproxy.spec +++ b/haproxy.spec @@ -5,7 +5,7 @@ %define haproxy_datadir %{_datadir}/haproxy Name: haproxy -Version: 1.3.21 +Version: 1.3.22 Release: 1%{?dist} Summary: HA-Proxy is a TCP/HTTP reverse proxy for high availability environments @@ -16,6 +16,7 @@ URL: http://haproxy.1wt.eu/ Source0: http://haproxy.1wt.eu/download/1.3/src/haproxy-%{version}.tar.gz Source1: %{name}.init Source2: %{name}.cfg +Source3: %{name}.logrotate BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: pcre-devel @@ -63,6 +64,7 @@ make install-man DESTDIR=%{buildroot} PREFIX=%{_prefix} %{__install} -p -D -m 0755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name} %{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{haproxy_confdir}/%{name}.cfg +%{__install} -p -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} %{__install} -d -m 0755 %{buildroot}%{haproxy_home} %{__install} -d -m 0755 %{buildroot}%{haproxy_datadir} @@ -120,6 +122,7 @@ fi %dir %{haproxy_datadir}/* %dir %{haproxy_confdir} %config(noreplace) %{haproxy_confdir}/%{name}.cfg +%config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %{_initrddir}/%{name} %{_sbindir}/%{name} %{_mandir}/man1/%{name}.1.gz @@ -127,6 +130,10 @@ fi %changelog +* Sat Oct 17 2009 Jeremy Hinegardner - 1.3.22-1 +- update to 1.3.22 +- added logrotate configuration + * Mon Oct 12 2009 Jeremy Hinegardner - 1.3.21-1 - update to 1.3.21 diff --git a/sources b/sources index 06021b0..0e601b7 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ d591cc9aca0b81ea8ccda8db958c1f44 haproxy-1.3.21.tar.gz +b84e0935cfea99eda43645d53bb82367 haproxy-1.3.22.tar.gz