diff options
-rw-r--r-- | modules/mirror/manifests/init.pp | 22 | ||||
-rw-r--r-- | modules/mirror/templates/cron | 3 | ||||
-rw-r--r-- | modules/mirror/templates/update_timestamp | 5 |
3 files changed, 30 insertions, 0 deletions
diff --git a/modules/mirror/manifests/init.pp b/modules/mirror/manifests/init.pp new file mode 100644 index 00000000..6adce9e1 --- /dev/null +++ b/modules/mirror/manifests/init.pp @@ -0,0 +1,22 @@ +class mirror { + + file { "update_timestamp": + path => "/home/mirror/bin/update_timestamp", + ensure => present, + owner => mirror, + group => mirror, + mode => 755, + content => template("mirror/update_timestamp") + } + + file { "mirror.cron": + path => "/etc/cron.d/mirror", + ensure => present, + owner => root, + group => root, + mode => 644, + require => File["update_timestamp"], + content => template("mirror/cron") + } + +} diff --git a/modules/mirror/templates/cron b/modules/mirror/templates/cron new file mode 100644 index 00000000..771ab5de --- /dev/null +++ b/modules/mirror/templates/cron @@ -0,0 +1,3 @@ +# $Id$ +14 10 * * * mirror ~mirror/bin/update_timestamp + diff --git a/modules/mirror/templates/update_timestamp b/modules/mirror/templates/update_timestamp new file mode 100644 index 00000000..a037d10d --- /dev/null +++ b/modules/mirror/templates/update_timestamp @@ -0,0 +1,5 @@ +#!/bin/sh + +# $id$ + +date +%s%n%c > /distrib/mirror/mageia_timestamp |