From 5a895c21b5a2f43ab74b3514b3c75f1dba09dd97 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 31 May 2014 14:15:16 -0400 Subject: propellor spin --- src/Propellor/Property/SiteSpecific/JoeySites.hs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/Propellor/Property/SiteSpecific') 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" -- cgit v1.3-2-g0d8e From 8e57f0bbfb45777b3d4a786381fc2c549dc52e7d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 31 May 2014 14:19:46 -0400 Subject: propellor spin --- src/Propellor/Property/SiteSpecific/JoeySites.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Propellor/Property/SiteSpecific') diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs index 51210819..fd536ad4 100644 --- a/src/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs @@ -322,11 +322,11 @@ kiteShellBox :: Property kiteShellBox = propertyList "kitenet.net shellinabox" [ Apt.installed ["shellinabox"] - -- Install ssl cert, let shellinabox read it. + -- Set up certs directory, allowing shellinabox write access. + -- It will create its own self-signed cert. , 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" -- cgit v1.3-2-g0d8e From c7b74717783a997ea646bde8cc8bbcca22d94e52 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 31 May 2014 14:28:12 -0400 Subject: propellor spin --- src/Propellor/Property/SiteSpecific/JoeySites.hs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/Propellor/Property/SiteSpecific') diff --git a/src/Propellor/Property/SiteSpecific/JoeySites.hs b/src/Propellor/Property/SiteSpecific/JoeySites.hs index fd536ad4..f6e1e37f 100644 --- a/src/Propellor/Property/SiteSpecific/JoeySites.hs +++ b/src/Propellor/Property/SiteSpecific/JoeySites.hs @@ -321,21 +321,12 @@ ircBouncer = propertyList "IRC bouncer" kiteShellBox :: Property kiteShellBox = propertyList "kitenet.net shellinabox" [ Apt.installed ["shellinabox"] - - -- Set up certs directory, allowing shellinabox write access. - -- It will create its own self-signed cert. - , File.dirExists certdir - , File.ownerGroup certdir "shellinabox" "shellinabox" - , File.mode certdir (combineModes [ownerWriteMode, ownerReadMode, ownerExecuteMode]) - , 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 ++ "\"" + , "SHELLINABOX_ARGS=\"--no-beep --service=/:SSH:kitenet.net\"" ] `onChange` Service.restarted "shellinabox" , Service.running "shellinabox" ] - where - certdir = "/etc/shellinabox/certs" -- cgit v1.3-2-g0d8e