diff options
Diffstat (limited to 'dh_installlogrotate')
-rwxr-xr-x | dh_installlogrotate | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/dh_installlogrotate b/dh_installlogrotate new file mode 100755 index 00000000..4f04ed74 --- /dev/null +++ b/dh_installlogrotate @@ -0,0 +1,17 @@ +#!/usr/bin/perl -w +# +# Install logrotate config files. + +use Debian::Debhelper::Dh_Lib; +init(); + +foreach $PACKAGE (@{$dh{DOPACKAGES}}) { + $TMP=tmpdir($PACKAGE); + $file=pkgfile($PACKAGE,"logrotate"); + if ($file) { + if (! -d "$TMP/etc/logrotate.d") { + doit("install","-o",0,"-g",0,"-d","$TMP/etc/logrotate.d"); + } + doit("install","-m",644,$file,"$TMP/etc/logrotate.d/$PACKAGE"); + } +} |