5 dh_installcron - install cron scripts into etc/cron.*
10 use Debian::Debhelper::Dh_Lib;
14 B<dh_installcron> [S<B<debhelper options>>] [B<--name=>I<name>]
18 dh_installcron is a debhelper program that is responsible for installing
19 cron scripts into etc/cron.*/ in package build directories. The files
20 debian/package.cron.daily, debian/package.cron.weekly,
21 debian/package.cron.monthly, debian/package.cron.hourly, and
22 debian/package.cron.d are installed.
28 =item B<--name=>I<name>
30 Look for files named debian/package.name.cron.* and install them as
31 etc/cron.*/name, instead of using the usual files and installing them
40 foreach my $package (@{$dh{DOPACKAGES}}) {
41 my $tmp=tmpdir($package);
42 foreach my $type (qw{hourly daily weekly monthly}) {
43 my $cron=pkgfile($package,"cron.$type");
45 if (! -d "$tmp/etc/cron.$type") {
46 doit("install","-o",0,"-g",0,"-d","$tmp/etc/cron.$type");
48 doit("install",$cron,"$tmp/etc/cron.$type/".pkgfilename($package));
51 # Seperate because this needs to be mode 644.
52 my $cron=pkgfile($package,"cron.d");
54 if (! -d "$tmp/etc/cron.d") {
55 doit("install","-o",0,"-g",0,"-d","$tmp/etc/cron.d");
57 doit("install","-m",644,$cron,"$tmp/etc/cron.d/".pkgfilename($package));
65 This program is a part of debhelper.
69 Joey Hess <joeyh@debian.org>