Add logrotate script.

Add creation of log dir, otherwise iaxmodem fails starting.
1.2
Andreas Granig 15 years ago
parent d93bc7c2af
commit 5be4fc0ab1

8
debian/rules vendored

@ -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

@ -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
}
Loading…
Cancel
Save