diff options
author | Olivier Thauvin <nanardon@mageia.org> | 2011-03-20 00:19:39 +0000 |
---|---|---|
committer | Olivier Thauvin <nanardon@mageia.org> | 2011-03-20 00:19:39 +0000 |
commit | a7f1a366769372ec3c3ef0d5a3c809aac3b5726c (patch) | |
tree | 5dce5841ce15b394c23093c1fd807c4bc01791ba | |
parent | a445115697678b153d246ce315e3471213757e5d (diff) | |
download | mgamirrors-a7f1a366769372ec3c3ef0d5a3c809aac3b5726c.tar mgamirrors-a7f1a366769372ec3c3ef0d5a3c809aac3b5726c.tar.gz mgamirrors-a7f1a366769372ec3c3ef0d5a3c809aac3b5726c.tar.bz2 mgamirrors-a7f1a366769372ec3c3ef0d5a3c809aac3b5726c.tar.xz mgamirrors-a7f1a366769372ec3c3ef0d5a3c809aac3b5726c.zip |
- provide crontab for mirror checks
-rw-r--r-- | MANIFEST | 1 | ||||
-rw-r--r-- | Makefile.PL | 17 | ||||
-rw-r--r-- | etc/crontab | 1 | ||||
-rw-r--r-- | mga-mirrors.spec.in | 1 |
4 files changed, 20 insertions, 0 deletions
@@ -90,3 +90,4 @@ t/controller_Validate.t t/model_Mirrors.t t/view_GraphViz.t t/view_TT.t +etc/crontab diff --git a/Makefile.PL b/Makefile.PL index f7777b6..eb796b9 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -32,6 +32,23 @@ WriteAll; package MY; +sub install { + my ($self) = @_; + + my $install = $self->SUPER::install; + + $install =~ s/^(install ::.*)/$1 cron_install/m; + + $install .= <<EOF; + +cron_install :: +\t[ -d \$(DESTDIR)/etc/cron.d ] || mkdir -p \$(DESTDIR)/etc/cron.d +\tinstall -m644 etc/crontab \$(DESTDIR)/etc/cron.d/mga_mirrors +EOF + + $install +} + sub postamble { " diff --git a/etc/crontab b/etc/crontab new file mode 100644 index 0000000..77a0ef4 --- /dev/null +++ b/etc/crontab @@ -0,0 +1 @@ +0 * * * * apache /usr/bin/check_mirror diff --git a/mga-mirrors.spec.in b/mga-mirrors.spec.in index 801176f..04b0f5e 100644 --- a/mga-mirrors.spec.in +++ b/mga-mirrors.spec.in @@ -75,6 +75,7 @@ rm -rf %buildroot %defattr(-,root,root) %doc Changes README %attr(0640,root,apache) %config(noreplace) %_sysconfdir/mga-mirrors.ini +%_sysconfdir/cron.d/mga_mirrors %_bindir/* %_var/www/cgi-bin/mga_mirrors_cgi.pl %{_mandir}/man3/* |