propellor-5.3.3: property-based host configuration management in haskell

Safe Haskell | None
Language | Haskell98

Propellor.Property.Service

Synopsis

- type ServiceName = String
- running :: ServiceName -> Property DebianLike
- restarted :: ServiceName -> Property DebianLike
- reloaded :: ServiceName -> Property DebianLike
- signaled :: String -> Desc -> ServiceName -> Property DebianLike
- noServices :: RevertableProperty (HasInfo + UnixLike) UnixLike
- servicesDisabled :: Propellor Bool
- data NoServices = NoServices

# Documentation

type ServiceName = String Source #

running :: ServiceName -> Property DebianLike Source #

Ensures that a service is running. Does not ensure that any package providing that service is installed. See Apt.serviceInstalledRunning

Note that due to the general poor state of init scripts, the best we can do is try to start the service, and if it fails, assume this means it's already running.

restarted :: ServiceName -> Property DebianLike Source #

reloaded :: ServiceName -> Property DebianLike Source #

signaled :: String -> Desc -> ServiceName -> Property DebianLike Source #

noServices :: RevertableProperty (HasInfo + UnixLike) UnixLike Source #

This property prevents daemons and other services from being started, which is often something you want to prevent when building a chroot.

When this is set, `running` and `restarted` will not start services.

On Debian this installs a /usr/sbin/policy-rc.d script to further prevent any packages that get installed from starting daemons. Reverting the property removes the script.

servicesDisabled :: Propellor Bool Source #

Check if the noServices property is in effect.

data NoServices Source #

Constructors

NoServices |

Instances

Eq NoServices Source # |
Methods (==) :: NoServices -> NoServices -> Bool (/=) :: NoServices -> NoServices -> Bool
Show NoServices Source # |
Methods showsPrec :: Int -> NoServices -> ShowS show :: NoServices -> String showList :: [NoServices] -> ShowS