aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Taggart <taggart@riseup.net>2012-04-17 18:52:52 -0700
committerMatt Taggart <taggart@riseup.net>2012-04-17 18:52:52 -0700
commitbe0c0b17970685524bc83469fa3f1cf7623e17fc (patch)
treef255f227b0dea66e5fff19a895a8416cc18a58f9
parentf87e000678ce02f98e8268ef59bb0b8a388e15ff (diff)
downloadpuppet-backupninja-be0c0b17970685524bc83469fa3f1cf7623e17fc.tar.gz
puppet-backupninja-be0c0b17970685524bc83469fa3f1cf7623e17fc.tar.bz2
attempt to set when based on a calculation using the hostname, thanks to jessib for the code. I hope this works.
-rw-r--r--templates/sys.conf.erb7
1 files changed, 7 insertions, 0 deletions
diff --git a/templates/sys.conf.erb b/templates/sys.conf.erb
index a684e8b..2ca7250 100644
--- a/templates/sys.conf.erb
+++ b/templates/sys.conf.erb
@@ -9,6 +9,13 @@
end
end -%>
+when = everyday at <%= i = 0
+ total = 0
+ until i == hostname.length
+ total += (hostname[i] - 96) / (2.9 * (10 ** (i + 1)))
+ i += 1
+ end
+ (total*60).to_i -%>
packages = <%= packages ? 'yes' : 'no' %>
partitions = <%= partitions ? 'yes' : 'no' %>
dosfdisk = <%= dosfdisk ? 'yes' : 'no' %>