From 5be4fc0ab196ea53f7f4e835e104fdfdbc9de58f Mon Sep 17 00:00:00 2001 From: Andreas Granig Date: Thu, 7 Jul 2011 10:19:47 +0000 Subject: [PATCH] Add logrotate script. Add creation of log dir, otherwise iaxmodem fails starting. --- debian/rules | 8 ++++---- logrotate.conf | 13 +++++++++++++ 2 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 logrotate.conf diff --git a/debian/rules b/debian/rules index 160e516..81cb83c 100755 --- a/debian/rules +++ b/debian/rules @@ -43,12 +43,11 @@ install: build dh_testdir dh_testroot dh_clean -k - dh_installdirs usr/bin + dh_installdirs usr/sbin var/log/iaxmodem etc/logrotate.d # Add here commands to install the package into debian/ngcp-iaxmodem. - mkdir -p $(CURDIR)/debian/ngcp-iaxmodem/usr/sbin/ - install -m 755 iaxmodem $(CURDIR)/debian/ngcp-iaxmodem/usr/sbin/ngcp-iaxmodem - + install -m 755 iaxmodem debian/ngcp-iaxmodem/usr/sbin/ngcp-iaxmodem + install -m 644 logrotate.conf debian/ngcp-iaxmodem/etc/logrotate.d/ngcp-iaxmodem # Build architecture-independent files here. binary-indep: build install @@ -70,6 +69,7 @@ binary-arch: build install dh_fixperms dh_installdeb dh_shlibdeps + dh_installdebconf dh_gencontrol dh_md5sums dh_builddeb diff --git a/logrotate.conf b/logrotate.conf new file mode 100644 index 0000000..52d5a7b --- /dev/null +++ b/logrotate.conf @@ -0,0 +1,13 @@ +/var/log/iaxmodem/*.log { + rotate 93 + daily + missingok + ifempty + compress + olddir old + dateext + sharedscripts + postrotate + /bin/kill -HUP `cat /var/run/iaxmodem.pid` || true + endscript +}