From 6fc6d54f8a8b6cff9da2f51dc50d29efbada3d5a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 6 Jun 2014 22:46:31 -0400 Subject: propellor spin --- src/Propellor/Property/SiteSpecific/JoeySites.hs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/Propellor/Property/SiteSpecific') diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs index b44401ea..c66c167d 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" + `before` mkdir "/home/joey/backup" + mkrepo r = mkdir ("/home/joey/lib/nackup/" ++ r ++ ".obnam") + mkdir d = File.dirExists d + `before` File.ownerGroup "joey" "joey" d + -- cgit v1.3-2-g0d8e From c3add08491ba90e7efc7856f200baa60531ec7d6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 6 Jun 2014 22:47:42 -0400 Subject: propellor spin --- src/Propellor/Property/SiteSpecific/JoeySites.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Propellor/Property/SiteSpecific') diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs index c66c167d..1055dbfb 100644 --- a/src/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs @@ -345,7 +345,7 @@ obnamRepos rs = propertyList ("obnam repos for " ++ unwords rs) where mkbase = mkdir "/home/joey/lib" `before` mkdir "/home/joey/backup" - mkrepo r = mkdir ("/home/joey/lib/nackup/" ++ r ++ ".obnam") + mkrepo r = mkdir ("/home/joey/lib/backup/" ++ r ++ ".obnam") mkdir d = File.dirExists d - `before` File.ownerGroup "joey" "joey" d + `before` File.ownerGroup d "joey" "joey" -- cgit v1.3-2-g0d8e From a0aac3924479a643abadea1ca85a0e3968eabf4d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 6 Jun 2014 22:49:55 -0400 Subject: propellor spin --- src/Propellor/Property/SiteSpecific/JoeySites.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Propellor/Property/SiteSpecific') diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs index 1055dbfb..120ea611 100644 --- a/src/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs @@ -343,8 +343,8 @@ obnamRepos :: [String] -> Property obnamRepos rs = propertyList ("obnam repos for " ++ unwords rs) (mkbase : map mkrepo rs) where - mkbase = mkdir "/home/joey/lib" - `before` mkdir "/home/joey/backup" + 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" -- cgit v1.3-2-g0d8e