trafficcontrol-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject [incubator-trafficcontrol] branch master updated: Add Grove logrotate rules to rpm. Fixes issue #2206"
Date Tue, 01 May 2018 21:55:25 GMT
This is an automated email from the ASF dual-hosted git repository.

rob pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new 0a942bf  Add Grove logrotate rules to rpm.  Fixes issue #2206"
0a942bf is described below

commit 0a942bfbb8b500500cb46dad4a085fe4668db0d0
Author: John Rushford <jrushford@apache.org>
AuthorDate: Tue May 1 21:43:11 2018 +0000

    Add Grove logrotate rules to rpm.  Fixes issue #2206"
---
 grove/build/build_rpm.sh | 2 +-
 grove/build/grove.spec   | 4 ++++
 grove/grove.cfg          | 3 +++
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/grove/build/build_rpm.sh b/grove/build/build_rpm.sh
index f611100..e22e235 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 ec3389d..abe34d2 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 e9ca358..3f0a3fe 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"
 }

-- 
To stop receiving notification emails like this one, please contact
rob@apache.org.

Mime
View raw message