summaryrefslogtreecommitdiff
path: root/dh_installlogrotate
blob: 4f04ed742261109bc9068b88cf70c31998ef863e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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");
	}
}