Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logrotate logfile on EL6 - fixes #14 & #15 #20

Merged
merged 1 commit into from
Nov 12, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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://dl.bintray.com/mitchellh/%{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