summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Systemd.hs
diff options
context:
space:
mode:
authorJoey Hess2015-06-01 16:12:21 -0400
committerJoey Hess2015-06-01 16:13:44 -0400
commit85c3d110882f0f9d70316235221ba8b20754661f (patch)
tree49e2ba8b16791ed9fd51a230478fab0207736131 /src/Propellor/Property/Systemd.hs
parenta50edc3d9f1fc630ba5f72aba6cfec9aca71c204 (diff)
reorganize Port type for systemd can use it
Diffstat (limited to 'src/Propellor/Property/Systemd.hs')
-rw-r--r--src/Propellor/Property/Systemd.hs9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/Propellor/Property/Systemd.hs b/src/Propellor/Property/Systemd.hs
index 34e51ba9..9e5ca432 100644
--- a/src/Propellor/Property/Systemd.hs
+++ b/src/Propellor/Property/Systemd.hs
@@ -1,5 +1,3 @@
-{-# LANGUAGE TypeSynonymInstances #-}
-
module Propellor.Property.Systemd (
-- * Services
module Propellor.Property.Systemd.Core,
@@ -24,11 +22,11 @@ module Propellor.Property.Systemd (
-- * Container configuration
containerCfg,
resolvConfed,
- Publishable(..),
privateNetwork,
ForwardedPort(..),
Proto(..),
PortSpec(..),
+ Publishable,
publish,
bind,
bindRo,
@@ -39,7 +37,6 @@ import Propellor.Types.Chroot
import qualified Propellor.Property.Chroot as Chroot
import qualified Propellor.Property.Apt as Apt
import qualified Propellor.Property.File as File
-import Propellor.Property.Firewall (Port)
import Propellor.Property.Systemd.Core
import Utility.FileMode
@@ -297,7 +294,7 @@ class Publishable a where
toPublish :: a -> String
instance Publishable Port where
- toPublish p = show p
+ toPublish (Port n) = show n
data ForwardedPort = ForwardedPort
{ hostPort :: Port
@@ -305,7 +302,7 @@ data ForwardedPort = ForwardedPort
}
instance Publishable ForwardedPort where
- toPublish fp = show (hostPort fp) ++ ":" ++ show (containerPort fp)
+ toPublish fp = toPublish (hostPort fp) ++ ":" ++ toPublish (containerPort fp)
data Proto = TCP | UDP