diff --git a/haproxy.service b/haproxy.service index 64f1cc6..5a3585a 100644 --- a/haproxy.service +++ b/haproxy.service @@ -3,7 +3,8 @@ Description=HAProxy Load Balancer After=syslog.target network.target [Service] -ExecStart=/usr/sbin/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid +EnvironmentFile=/etc/sysconfig/haproxy +ExecStart=/usr/sbin/haproxy-systemd-wrapper $HAPROXY_OPTIONS ExecReload=/bin/kill -USR2 $MAINPID [Install] diff --git a/haproxy.spec b/haproxy.spec index c7e9718..1446965 100644 --- a/haproxy.spec +++ b/haproxy.spec @@ -8,7 +8,7 @@ Name: haproxy Version: 1.5.11 -Release: 2%{?dist} +Release: 3%{?dist} Summary: HAProxy reverse proxy for high availability environments Group: System Environment/Daemons @@ -19,7 +19,8 @@ Source0: http://www.haproxy.org/download/1.5/src/haproxy-%{version}.tar.g Source1: %{name}.service Source2: %{name}.cfg Source3: %{name}.logrotate -Source4: halog.1 +Source4: %{name}.sysconfig +Source5: halog.1 Patch0: halog-unused-variables.patch Patch1: iprange-return-type.patch @@ -82,7 +83,8 @@ popd %{__install} -p -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service %{__install} -p -D -m 0644 %{SOURCE2} %{buildroot}%{haproxy_confdir}/%{name}.cfg %{__install} -p -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} -%{__install} -p -D -m 0644 %{SOURCE4} %{buildroot}%{_mandir}/man1/halog.1 +%{__install} -p -D -m 0644 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/%{name} +%{__install} -p -D -m 0644 %{SOURCE5} %{buildroot}%{_mandir}/man1/halog.1 %{__install} -d -m 0755 %{buildroot}%{haproxy_home} %{__install} -d -m 0755 %{buildroot}%{haproxy_datadir} %{__install} -d -m 0755 %{buildroot}%{_bindir} @@ -132,6 +134,7 @@ exit 0 %{haproxy_datadir}/* %config(noreplace) %{haproxy_confdir}/%{name}.cfg %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} +%config(noreplace) %{_sysconfdir}/sysconfig/%{name} %{_unitdir}/%{name}.service %{_sbindir}/%{name} %{_sbindir}/%{name}-systemd-wrapper @@ -141,6 +144,9 @@ exit 0 %attr(-,%{haproxy_user},%{haproxy_group}) %dir %{haproxy_home} %changelog +* Wed Feb 11 2015 Ryan O'Hara - 1.5.11-3 +- Add sysconfig file + * Tue Feb 10 2015 Ryan O'Hara - 1.5.11-2 - Add tcp-ut bind option to set TCP_USER_TIMEOUT (#1190783) diff --git a/haproxy.sysconfig b/haproxy.sysconfig new file mode 100644 index 0000000..7c66885 --- /dev/null +++ b/haproxy.sysconfig @@ -0,0 +1 @@ +HAPROXY_OPTIONS="-f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid"