propellor spin
This commit is contained in:
parent
fb1d65125b
commit
56dd639169
|
@ -50,3 +50,13 @@ restarted = cmdProperty "service" ["apache2", "restart"]
|
|||
|
||||
reloaded :: Property
|
||||
reloaded = Service.reloaded "apache2"
|
||||
|
||||
-- | Configure apache to use SNI to differentiate between
|
||||
-- https hosts.
|
||||
multiSSL :: Property
|
||||
multiSSL = "/etc/apache2/conf.d/ssl" `File.hasContent`
|
||||
[ "NameVirtualHost *:443"
|
||||
, "SSLStrictSNIVHostCheck off"
|
||||
]
|
||||
`describe` "apache SNI enabled"
|
||||
`onChange` reloaded
|
||||
|
|
|
@ -65,7 +65,7 @@ gitServer hosts = propertyList "git.kitenet.net setup"
|
|||
, toProp $ Git.daemonRunning "/srv/git"
|
||||
, "/etc/gitweb.conf" `File.containsLines`
|
||||
[ "$projectroot = '/srv/git';"
|
||||
, "@git_base_url_list = ('git://git.kitenet.net', 'http://git.kitenet.net/git', 'ssh://git.kitenet.net/srv/git');"
|
||||
, "@git_base_url_list = ('git://git.kitenet.net', 'http://git.kitenet.net/git', 'https://git.kitenet.net/git', 'ssh://git.kitenet.net/srv/git');"
|
||||
, "# disable snapshot download; overloads server"
|
||||
, "$feature{'snapshot'}{'default'} = [];"
|
||||
]
|
||||
|
@ -99,9 +99,11 @@ type AnnexUUID = String
|
|||
|
||||
-- | A website, with files coming from a git-annex repository.
|
||||
annexWebSite :: [Host] -> Git.RepoUrl -> HostName -> AnnexUUID -> [(String, Git.RepoUrl)] -> Property
|
||||
annexWebSite hosts origin hn uuid remotes = Git.cloned "joey" origin dir Nothing
|
||||
annexWebSite hosts origin hn uuid remotes = propertyList (hn ++" website using git-annex")
|
||||
[ Git.cloned "joey" origin dir Nothing
|
||||
`onChange` setup
|
||||
`onChange` setupapache
|
||||
, setupapache
|
||||
]
|
||||
where
|
||||
dir = "/srv/web/" ++ hn
|
||||
setup = userScriptProperty "joey" setupscript
|
||||
|
|
|
@ -81,6 +81,7 @@ hosts =
|
|||
& File.hasPrivContent "/etc/ssl/private/web.pem"
|
||||
& File.hasPrivContent "/etc/ssl/certs/startssl.pem"
|
||||
& Apache.modEnabled "ssl"
|
||||
& Apache.multiSSL
|
||||
& File.ownerGroup "/srv/web" "joey" "joey"
|
||||
|
||||
& cname "git.kitenet.net"
|
||||
|
|
Loading…
Reference in New Issue