diff options
| author | Joey Hess <joey@kitenet.net> | 2014-05-01 10:49:52 -0300 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-05-01 10:49:52 -0300 |
| commit | 6088df9105a10ef446cc236982c2e30857182a84 (patch) | |
| tree | a407345854637915fca54e61a68819731b375e05 /Propellor/Property | |
| parent | f058e47574603fffffc3f60305bc874b78f7770f (diff) | |
| parent | 2bc9a2a7379f80595f5b8f3dc5475f64d5537cfc (diff) | |
Merge branch 'joeyconfig'
Diffstat (limited to 'Propellor/Property')
| -rw-r--r-- | Propellor/Property/Git.hs | 4 | ||||
| -rw-r--r-- | Propellor/Property/SiteSpecific/JoeySites.hs | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/Propellor/Property/Git.hs b/Propellor/Property/Git.hs index ba370e51..e5df7e48 100644 --- a/Propellor/Property/Git.hs +++ b/Propellor/Property/Git.hs @@ -86,4 +86,8 @@ cloned owner url dir mbranch = check originurl (property desc checkout) [ Just $ "git clone " ++ shellEscape url ++ " " ++ shellEscape dir ++ " < /dev/null" , Just $ "cd " ++ shellEscape dir , ("git checkout " ++) <$> mbranch + -- In case this repo is exposted via the web, + -- although the hook to do this ongoing is not + -- installed here. + , Just "git update-server-info" ] diff --git a/Propellor/Property/SiteSpecific/JoeySites.hs b/Propellor/Property/SiteSpecific/JoeySites.hs index 06865c45..bdc60a5b 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" |
