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

Safe HaskellNone

Propellor.Property.Cmd

Synopsis

Documentation

cmdProperty :: String -> [String] -> PropertySource

A property that can be satisfied by running a command.

The command must exit 0 on success.

cmdProperty' :: String -> [String] -> [(String, String)] -> PropertySource

A property that can be satisfied by running a command, with added environment.

scriptProperty :: [String] -> PropertySource

A property that can be satisfied by running a series of shell commands.

userScriptProperty :: UserName -> [String] -> PropertySource

A property that can satisfied by running a series of shell commands, as user (staring in their home directory).

serviceRunning :: String -> PropertySource

Ensures that a service is running.

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.