Safe HaskellSafe-Infered



Implementation of the runtime configuration details.



data MiscGroup Source




Bounded MiscGroup 
Enum MiscGroup 
Eq MiscGroup 
Ord MiscGroup 
Show MiscGroup 

type RuntimeEnts = (Map GanetiDaemon UserID, Map GanetiGroup GroupID)Source

daemonName :: GanetiDaemon -> StringSource

Returns the daemon name for a given daemon.

daemonOnlyOnMaster :: GanetiDaemon -> BoolSource

Returns whether the daemon only runs on the master node.

daemonLogBase :: GanetiDaemon -> StringSource

Returns the log file base for a daemon.

daemonUser :: GanetiDaemon -> StringSource

Returns the configured user name for a daemon.

daemonGroup :: GanetiGroup -> StringSource

Returns the configured group for a daemon.

daemonsExtraLogbase :: GanetiDaemon -> ExtraLogReason -> StringSource

Some daemons might require more than one logfile. Specifically, right now only the Haskell http library snap, used by the monitoring daemon, requires multiple log files.

daemonLogFile :: GanetiDaemon -> IO FilePathSource

Returns the log file for a daemon.

daemonsExtraLogFile :: GanetiDaemon -> ExtraLogReason -> IO FilePathSource

Returns the extra log files for a daemon.

daemonPidFile :: GanetiDaemon -> IO FilePathSource

Returns the pid file name for a daemon.

getEnts :: IO (Result RuntimeEnts)Source

Computes the group/user maps.

verifyDaemonUser :: GanetiDaemon -> RuntimeEnts -> IO ()Source

Checks whether a daemon runs as the right user.

checkUidMatch :: String -> UserID -> UserID -> IO ()Source