Revision 29a30533 htools/Ganeti/Runtime.hs

b/htools/Ganeti/Runtime.hs
92 92
daemonGroup (ExtraGroup  AdminGroup)    = C.adminGroup
93 93

  
94 94
-- | Returns the log file for a daemon.
95
daemonLogFile :: GanetiDaemon -> FilePath
96
daemonLogFile daemon = Path.logDir </> daemonName daemon <.> "log"
95
daemonLogFile :: GanetiDaemon -> IO FilePath
96
daemonLogFile daemon = do
97
  logDir <- Path.logDir
98
  return $ logDir </> daemonName daemon <.> "log"
97 99

  
98 100
-- | Returns the pid file name for a daemon.
99
daemonPidFile :: GanetiDaemon -> FilePath
100
daemonPidFile daemon = Path.runDir </> daemonName daemon <.> "pid"
101
daemonPidFile :: GanetiDaemon -> IO FilePath
102
daemonPidFile daemon = do
103
  runDir <- Path.runDir
104
  return $ runDir </> daemonName daemon <.> "pid"
101 105

  
102 106
-- | All groups list. A bit hacking, as we can't enforce it's complete
103 107
-- at compile time.

Also available in: Unified diff