summaryrefslogtreecommitdiff
path: root/src/Propellor
diff options
context:
space:
mode:
authorJoey Hess2014-05-31 14:15:16 -0400
committerJoey Hess2014-05-31 14:15:16 -0400
commit5a895c21b5a2f43ab74b3514b3c75f1dba09dd97 (patch)
treee2abaeee5418a4af9097a40792de89ce28e16464 /src/Propellor
parent2d740c92c9c392d7799d51140bf8691588fd68df (diff)
propellor spin
Diffstat (limited to 'src/Propellor')
-rw-r--r--src/Propellor/Property/SiteSpecific/JoeySites.hs22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs
index 587e16af..51210819 100644
--- a/src/Propellor/Property/SiteSpecific/JoeySites.hs
+++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs
@@ -317,3 +317,25 @@ ircBouncer = propertyList "IRC bouncer"
]
where
conf = "/home/znc/.znc/configs/znc.conf"
+
+kiteShellBox :: Property
+kiteShellBox = propertyList "kitenet.net shellinabox"
+ [ Apt.installed ["shellinabox"]
+
+ -- Install ssl cert, let shellinabox read it.
+ , File.dirExists certdir
+ , File.ownerGroup certdir "shellinabox" "shellinabox"
+ , File.mode certdir (combineModes [ownerWriteMode, ownerReadMode, ownerExecuteMode])
+ , File.hasPrivContentExposed (certdir </> "certificate.pem")
+
+ , File.hasContent "/etc/default/shellinabox"
+ [ "# Deployed by propellor"
+ , "SHELLINABOX_DAEMON_START=1"
+ , "SHELLINABOX_PORT=443"
+ , "SHELLINABOX_ARGS=\"--no-beep --service=/:SSH:kitenet.net --cert=" ++ certdir ++ "\""
+ ]
+ `onChange` Service.restarted "shellinabox"
+ , Service.running "shellinabox"
+ ]
+ where
+ certdir = "/etc/shellinabox/certs"