You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2018/05/01 21:55:25 UTC

[GitHub] rob05c closed pull request #2208: Add Grove logrotate rules to rpm.

rob05c closed pull request #2208: Add Grove logrotate rules to rpm.  
URL: https://github.com/apache/incubator-trafficcontrol/pull/2208
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/grove/build/build_rpm.sh b/grove/build/build_rpm.sh
index f6111009f..e22e2352a 100755
--- a/grove/build/build_rpm.sh
+++ b/grove/build/build_rpm.sh
@@ -25,7 +25,7 @@ echo "$BUILDDIR" > ~/.rpmmacros
 go build -v -ldflags "-X main.Version=$VERSION"
 
 # tar
-tar -cvzf $BUILDDIR/SOURCES/grove-${VERSION}.tgz grove conf/grove.cfg build/grove.init
+tar -cvzf $BUILDDIR/SOURCES/grove-${VERSION}.tgz grove conf/grove.cfg build/grove.init build/grove.logrotate
 
 # build RPM
 rpmbuild --define "version ${VERSION}" -ba build/grove.spec
diff --git a/grove/build/grove.spec b/grove/build/grove.spec
index ec3389d15..abe34d2ee 100644
--- a/grove/build/grove.spec
+++ b/grove/build/grove.spec
@@ -48,6 +48,9 @@ mkdir -p -m 777 %{buildroot}/var/log/%{name}
 mkdir -p -m 777 %{buildroot}/etc/init.d/
 cp -p  build/%{name}.init %{buildroot}/etc/init.d/%{name}
 
+mkdir -p -m 777 %{buildroot}/etc/logrotate.d/
+cp -p build/%{name}.logrotate %{buildroot}/etc/logrotate.d/%{name}
+
 %clean
 echo "cleaning"
 rm -r -f %{buildroot}
@@ -56,4 +59,5 @@ rm -r -f %{buildroot}
 /usr/sbin/%{name}
 /var/log/%{name}
 %config(noreplace) /etc/%{name}
+%config(noreplace) /etc/logrotate.d/%{name}
 /etc/init.d/%{name}
diff --git a/grove/grove.cfg b/grove/grove.cfg
index e9ca358ed..3f0a3fedb 100644
--- a/grove/grove.cfg
+++ b/grove/grove.cfg
@@ -3,4 +3,7 @@
   "port": 8080,
   "cache_size_bytes": 50000,
   "remap_rules_file": "./remap.json"
+  "log_location_error": "/var/log/grove/grove.log",
+  "log_location_event": "/var/log/grove/access.log",
+  "log_location_warn": "/var/log/grove/grove.log"
 }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services