#!/usr/bin/perl -w # # Install cron scripts into the appropriate places. use strict; use Debian::Debhelper::Dh_Lib; init(); foreach my $package (@{$dh{DOPACKAGES}}) { my $tmp=tmpdir($package); foreach my $type (qw{daily weekly monthly}) { my $cron=pkgfile($package,"cron.$type"); if ($cron) { if (! -d "$tmp/etc/cron.$type") { doit("install","-o",0,"-g",0,"-d","$tmp/etc/cron.$type"); } doit("install",$cron,"$tmp/etc/cron.$type/$package"); } } # Seperate because this needs to be mode 644. my $cron=pkgfile($package,"cron.d"); if ($cron) { if (! -d "$tmp/etc/cron.d") { doit("install","-o",0,"-g",0,"-d","$tmp/etc/cron.d"); } doit("install","-m",644,$cron,"$tmp/etc/cron.d/$package"); } }