propellor spin

This commit is contained in:
Joey Hess 2015-03-11 22:18:50 -04:00
parent 9fb5bc823e
commit bd8efb76a3
Failed to extract signature
2 changed files with 8 additions and 5 deletions

View File

@ -26,7 +26,7 @@ scrollBox :: Property HasInfo
scrollBox = propertyList "scroll shell box" $ props
& alias "scroll.joeyh.name"
& User.accountFor "scroll"
& Git.cloned "scroll" (d </> "scroll") "git://git.kitenet.net/scroll" Nothing
& Git.cloned "scroll" "git://git.kitenet.net/scroll" (d </> "scroll") Nothing
& Apt.installed ["ghc", "make", "cabal-install", "libghc-vector-dev",
"libghc-bytestring-dev", "libghc-mtl-dev", "libghc-ncurses-dev",
"libghc-random-dev", "libghc-monad-loops-dev",
@ -46,14 +46,16 @@ scrollBox = propertyList "scroll shell box" $ props
, "rm -f \"$t\""
, "mkdir \"$t\""
, "cd \"$t\""
, "script -c ../scroll/scroll -t timing"
, "timeout 1d script -c ../scroll/scroll -t timing"
, "echo Thanks for playing scroll!"
, "echo Your game was recorded, as ID:\"$t\", if you would like to talk about how it went."
, "echo Your game was recorded, as ID:$(basename \"$t\"), if you would like to talk about how it went."
, "echo scroll@joeyh.name / http://joeyh.name/code/scroll/"
] `onChange` (s `File.mode` (combineModes (ownerWriteMode:readModes ++ executeModes)))
-- prevent port forwarding etc by not letting scroll log in via ssh
& Ssh.setSshdConfig "DenyUsers scroll" True
& cmdProperty "passwd" ["-d", "scroll"]
& Ssh.sshdConfig `File.containsLine` ("DenyUsers scroll")
`onChange` Ssh.restarted
& cmdProperty "chsh" ["scroll", "-s", s]
& User.hasPassword "scroll"
& Apt.serviceInstalledRunning "telnetd"
where
d = "/home/scroll"

View File

@ -1,5 +1,6 @@
module Propellor.Property.Ssh (
PubKeyText,
sshdConfig,
setSshdConfig,
permitRootLogin,
passwordAuthentication,