diff --git a/Makefile b/Makefile index 36e6231e3..3da6a4bec 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 49cee8fbb..5496f4114 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -15,6 +15,7 @@ PREFIX := /usr/local SBINDIR := $(PREFIX)/sbin MANDIR := $(PREFIX)/share/man SYSTEMDUNITDIR := $(PREFIX)/lib/systemd/system/ +LOGROTATEDIR := $(PREFIX)/etc/logrotate.d/ LIBDIR := $(PREFIX)/lib # For recent Debian/Ubuntu with multiarch support DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture \ diff --git a/scripts/logrotate.d/criu-service b/scripts/logrotate.d/criu-service new file mode 100644 index 000000000..3824268f1 --- /dev/null +++ b/scripts/logrotate.d/criu-service @@ -0,0 +1,7 @@ +/var/log/criu-service.log { + weekly + rotate 4 + copytruncate + notifempty + missingok +}