Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request tomhillable#20 from tomhillable/logrotate_on_el6
Browse files Browse the repository at this point in the history
logrotate logfile on EL6 - fixes #14 & #15
  • Loading branch information
duritong committed Nov 12, 2015
2 parents 2b44b7b + 79d1637 commit 6ceda49
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
9 changes: 9 additions & 0 deletions SOURCES/consul.logrotate
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/var/log/consul {
daily
missingok
rotate 7
compress
copytruncate
notifempty
create 600 consul consul
}
11 changes: 10 additions & 1 deletion SPECS/consul.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Name: consul
Version: 0.5.2
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Consul is a tool for service discovery and configuration. Consul is distributed, highly available, and extremely scalable.

Group: System Environment/Daemons
Expand All @@ -13,11 +13,14 @@ Source3: %{name}.init
Source4: https://releases.hashicorp.com/%{name}/%{version}/%{name}_%{version}_web_ui.zip
Source5: %{name}.json
Source6: %{name}-ui.json
Source7: %{name}.logrotate
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)

%if 0%{?fedora} >= 14 || 0%{?rhel} >= 7
BuildRequires: systemd-units
Requires: systemd
%else
Requires: logrotate
%endif
Requires(pre): shadow-utils

Expand Down Expand Up @@ -57,7 +60,9 @@ mkdir -p %{buildroot}/%{_unitdir}
cp %{SOURCE2} %{buildroot}/%{_unitdir}/
%else
mkdir -p %{buildroot}/%{_initrddir}
mkdir -p %{buildroot}/%{_sysconfdir}/logrotate.d
cp %{SOURCE3} %{buildroot}/%{_initrddir}/consul
cp %{SOURCE7} %{buildroot}/%{_sysconfdir}/logrotate.d/%{name}
%endif

%pre
Expand Down Expand Up @@ -101,6 +106,7 @@ rm -rf %{buildroot}
%{_unitdir}/%{name}.service
%else
%{_initrddir}/%{name}
%{_sysconfdir}/logrotate.d/%{name}
%endif
%attr(755, root, root) %{_bindir}/consul

Expand All @@ -113,6 +119,9 @@ rm -rf %{buildroot}


%changelog
* Sun Oct 18 2015 mh <mh@immerda.ch>
- logrotate logfile on EL6 - fixes #14 & #15

* Tue May 19 2015 nathan r. hruby <nhruby@gmail.com>
- Bump to v0.5.2

Expand Down

0 comments on commit 6ceda49

Please sign in to comment.