Skip to content

Commit

Permalink
add logrotate configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
jriguera committed Jul 21, 2016
1 parent ab64ce5 commit 4030c0d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ tmp/go-carbon.tar.gz: go-carbon
cp go-carbon tmp/go-carbon/go-carbon
./go-carbon --config-print-default > tmp/go-carbon/go-carbon.conf
cp deploy/go-carbon.init.centos tmp/go-carbon/go-carbon.init
cp deploy/go-carbon.logrotate.centos tmp/go-carbon/go-carbon.logrotate
cd tmp && tar czf go-carbon.tar.gz go-carbon/

rpm: tmp/go-carbon.tar.gz
Expand Down
8 changes: 8 additions & 0 deletions debian/go-carbon.logrotate
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/var/log/go-carbon/go-carbon.log {
weekly
rotate 4
compress
missingok
notifempty
nocreate
}
8 changes: 8 additions & 0 deletions deploy/go-carbon.logrotate.centos
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/var/log/go-carbon/go-carbon.log {
weekly
rotate 4
compress
missingok
notifempty
nocreate
}
4 changes: 3 additions & 1 deletion deploy/go-carbon.spec.centos
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ rm -rf %{buildroot}
%{__install} -pD -m 755 %{name} %{buildroot}/%{__bindir}/%{name}
%{__install} -pD -m 644 %{name}.conf %{buildroot}/%{__etcdir}/%{name}.conf
%{__install} -pD -m 755 %{name}.init %{buildroot}/etc/init.d/%{name}
%{__install} -d -m 755 %{buildroot}/etc/logrotate.d
%{__install} -pD -m 644 %{name}.logrotate %{buildroot}/etc/logrotate.d/%{name}

This comment has been minimized.

Copy link
@towolf

towolf Jul 20, 2017

This is not 644 anymore, when installed through the debian package. @lomik.


%clean
rm -rf $RPM_BUILD_ROOT
Expand All @@ -43,7 +45,7 @@ rm -rf $RPM_BUILD_ROOT
%{__bindir}/%{name}
/etc/init.d/*
%config(noreplace) %{__etcdir}/%{name}.conf

/etc/logrotate.d/*

%changelog

0 comments on commit 4030c0d

Please sign in to comment.