diff options
Diffstat (limited to 'Propellor/Property')
| -rw-r--r-- | Propellor/Property/Docker.hs | 15 | ||||
| -rw-r--r-- | Propellor/Property/SiteSpecific/JoeySites.hs | 16 |
2 files changed, 25 insertions, 6 deletions
diff --git a/Propellor/Property/Docker.hs b/Propellor/Property/Docker.hs index e5b8d64a..6757c7cc 100644 --- a/Propellor/Property/Docker.hs +++ b/Propellor/Property/Docker.hs @@ -346,11 +346,18 @@ provisionContainer cid = containerDesc cid $ property "provision" $ liftIO $ do hPutStrLn stderr s hFlush stderr go Nothing rest - Done -> ret lastline - go lastline [] = ret lastline + Done -> do + debug ["reached Done"] + ret lastline + go lastline [] = do + debug ["reached end of output"] + ret lastline - ret lastline = return $ fromMaybe FailedChange $ - readish =<< lastline + ret lastline = do + let v = fromMaybe FailedChange $ + readish =<< lastline + debug ["provisionContainer returning", show v] + return v stopContainer :: ContainerId -> IO Bool stopContainer cid = boolSystem dockercmd [Param "stop", Param $ fromContainerId cid ] diff --git a/Propellor/Property/SiteSpecific/JoeySites.hs b/Propellor/Property/SiteSpecific/JoeySites.hs index bdc60a5b..28b3dffd 100644 --- a/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/Propellor/Property/SiteSpecific/JoeySites.hs @@ -105,7 +105,8 @@ kgbServer = withOS desc $ \o -> case o of mumbleServer :: [Host] -> Property mumbleServer hosts = combineProperties "mumble.debian.net" - [ Obnam.latestVersion + [ Apt.serviceInstalledRunning "mumble-server" + , Obnam.latestVersion , Obnam.backup "/var/lib/mumble-server" "55 5 * * *" [ "--repository=sftp://joey@turtle.kitenet.net/~/lib/backup/mumble.debian.net.obnam" , "--client-name=mumble" @@ -113,7 +114,6 @@ mumbleServer hosts = combineProperties "mumble.debian.net" `requires` Ssh.keyImported SshRsa "root" `requires` Ssh.knownHost hosts "turtle.kitenet.net" "root" , trivial $ cmdProperty "chown" ["-R", "mumble-server:mumble-server", "/var/lib/mumble-server"] - , Apt.serviceInstalledRunning "mumble-server" ] obnamLowMem :: Property @@ -300,3 +300,15 @@ twitRss = combineProperties "twitter rss" crontime = "15 * * * *" feed url desc = Cron.job desc crontime "joey" dir $ "./twitRss " ++ shellEscape url ++ " > " ++ shellEscape ("../" ++ desc ++ ".rss") + +ircBouncer :: Property +ircBouncer = propertyList "IRC bouncer" + [ Apt.installed ["znc"] + , User.accountFor "znc" + , File.hasPrivContent conf + , File.ownerGroup conf "znc" "znc" + , Cron.job "znconboot" "@reboot" "znc" "~" "znc" + , Cron.job "zncrunning" "@hourly" "znc" "~" "znc || true" + ] + where + conf = "/home/znc/.znc/configs/znc.conf" |
