summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/SiteSpecific/JoeySites.hs
diff options
context:
space:
mode:
authorJoey Hess2014-06-09 12:32:15 -0400
committerJoey Hess2014-06-09 12:32:15 -0400
commit70ab611efdaf8bba6becc42bef14cc47486d42a6 (patch)
treea5e5a10056601d90a1a3fbd05c397bf484540c8a /src/Propellor/Property/SiteSpecific/JoeySites.hs
parentbfbe9b2c9aaeb4e923dedabd8f5a53a0bd9c3acf (diff)
parenta1341ccb315a98e407a25bf25411759b6f8f58d2 (diff)
Merge branch 'joeyconfig'
Diffstat (limited to 'src/Propellor/Property/SiteSpecific/JoeySites.hs')
-rw-r--r--src/Propellor/Property/SiteSpecific/JoeySites.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs
index b44401ea..120ea611 100644
--- a/src/Propellor/Property/SiteSpecific/JoeySites.hs
+++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs
@@ -338,3 +338,14 @@ githubBackup = propertyList "github-backup box"
in File.hasPrivContent f
`onChange` File.ownerGroup f "joey" "joey"
]
+
+obnamRepos :: [String] -> Property
+obnamRepos rs = propertyList ("obnam repos for " ++ unwords rs)
+ (mkbase : map mkrepo rs)
+ where
+ mkbase = mkdir "/home/joey/lib/backup"
+ `requires` mkdir "/home/joey/lib"
+ mkrepo r = mkdir ("/home/joey/lib/backup/" ++ r ++ ".obnam")
+ mkdir d = File.dirExists d
+ `before` File.ownerGroup d "joey" "joey"
+