[CRIU] [PATCH 2/2] install: install criu-service logrotate config

Ruslan Kuprieiev kupruser at gmail.com
Thu Feb 13 08:44:31 PST 2014


Thank Vladimir Davydov <vdavidov at parallels.com> for help and config.

Signed-off-by: Ruslan Kuprieiev <kupruser at gmail.com>
---
 Makefile                         | 1 +
 Makefile.inc                     | 1 +
 scripts/logrotate.d/criu-service | 7 +++++++
 3 files changed, 9 insertions(+)
 create mode 100644 scripts/logrotate.d/criu-service

diff --git a/Makefile b/Makefile
index 36e6231..4f373cf 100644
--- a/Makefile
+++ b/Makefile
@@ -250,6 +250,7 @@ install: $(PROGRAM) install-man
 	$(Q) mkdir -p $(DESTDIR)$(SYSTEMDUNITDIR)
 	$(Q) install -m 644 scripts/sd/criu.socket $(DESTDIR)$(SYSTEMDUNITDIR)
 	$(Q) install -m 644 scripts/sd/criu.service $(DESTDIR)$(SYSTEMDUNITDIR)
+	$(Q) install -m 644 scripts/logrotate.d/criu-service $(DESTDIR)$(LOGROTATEDIR)
 
 install-man:
 	$(Q) $(MAKE) -C Documentation install
diff --git a/Makefile.inc b/Makefile.inc
index 49cee8f..3162e43 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -16,6 +16,7 @@ SBINDIR		:= $(PREFIX)/sbin
 MANDIR		:= $(PREFIX)/share/man
 SYSTEMDUNITDIR	:= $(PREFIX)/lib/systemd/system/
 LIBDIR		:= $(PREFIX)/lib
+LOGROTATEDIR	:= $(PREFIX)/etc/logrotate.d/
 # For recent Debian/Ubuntu with multiarch support
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture \
 			-qDEB_HOST_MULTIARCH 2>/dev/null)
diff --git a/scripts/logrotate.d/criu-service b/scripts/logrotate.d/criu-service
new file mode 100644
index 0000000..3824268
--- /dev/null
+++ b/scripts/logrotate.d/criu-service
@@ -0,0 +1,7 @@
+/var/log/criu-service.log {
+     weekly
+     rotate 4
+     copytruncate
+     notifempty
+     missingok
+}
-- 
1.8.3.2



More information about the CRIU mailing list