summaryrefslogtreecommitdiff
path: root/Propellor
diff options
context:
space:
mode:
authorJoey Hess2014-04-30 20:55:12 -0400
committerJoey Hess2014-04-30 20:55:12 -0400
commitaf4055beff14ece34490736c67e1110fa84bbf0d (patch)
tree6890ca3ea6faf54411ea7534ca4022287c1b1f77 /Propellor
parent6a172a5e74469e4ff6d45839008c1393754208c1 (diff)
propellor spin
Diffstat (limited to 'Propellor')
-rw-r--r--Propellor/Property/SiteSpecific/JoeySites.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Propellor/Property/SiteSpecific/JoeySites.hs b/Propellor/Property/SiteSpecific/JoeySites.hs
index 06865c45..5b518d17 100644
--- a/Propellor/Property/SiteSpecific/JoeySites.hs
+++ b/Propellor/Property/SiteSpecific/JoeySites.hs
@@ -15,6 +15,7 @@ import qualified Propellor.Property.User as User
import qualified Propellor.Property.Obnam as Obnam
import qualified Propellor.Property.Apache as Apache
import Utility.SafeCommand
+import Utility.FileMode
import Data.List
import System.Posix.Files
@@ -183,10 +184,16 @@ annexWebSite :: [Host] -> Git.RepoUrl -> HostName -> AnnexUUID -> [(String, Git.
annexWebSite hosts origin hn uuid remotes = propertyList (hn ++" website using git-annex")
[ Git.cloned "joey" origin dir Nothing
`onChange` setup
+ , postupdatehook `File.hasContent`
+ [ "!/bin/sh"
+ , "exec git update-server-info"
+ ] `onChange`
+ (postupdatehook `File.mode` (combineModes (ownerWriteMode:readModes ++ executeModes)))
, setupapache
]
where
dir = "/srv/web/" ++ hn
+ postupdatehook = dir </> ".git/hooks/post-update"
setup = userScriptProperty "joey" setupscript
`requires` Ssh.keyImported SshRsa "joey"
`requires` Ssh.knownHost hosts "turtle.kitenet.net" "joey"