webapp: New preferences page allows enabling/disabling debug logging at runtime, as well as configuring numcopies and diskreserve.
This commit is contained in:
parent
d7ad02f893
commit
08bdea7e52
13 changed files with 174 additions and 58 deletions
|
@ -50,21 +50,17 @@ checkAutoStart = ifM (elem "--autostart" <$> getArgs)
|
|||
|
||||
autoStart :: IO ()
|
||||
autoStart = do
|
||||
autostartfile <- autoStartFile
|
||||
let nothing = error $ "Nothing listed in " ++ autostartfile
|
||||
ifM (doesFileExist autostartfile)
|
||||
( do
|
||||
dirs <- nub . lines <$> readFile autostartfile
|
||||
program <- readProgramFile
|
||||
when (null dirs) nothing
|
||||
forM_ dirs $ \d -> do
|
||||
putStrLn $ "git-annex autostart in " ++ d
|
||||
ifM (catchBoolIO $ go program d)
|
||||
( putStrLn "ok"
|
||||
, putStrLn "failed"
|
||||
)
|
||||
, nothing
|
||||
)
|
||||
dirs <- liftIO readAutoStartFile
|
||||
when (null dirs) $ do
|
||||
f <- autoStartFile
|
||||
error $ "Nothing listed in " ++ f
|
||||
program <- readProgramFile
|
||||
forM_ dirs $ \d -> do
|
||||
putStrLn $ "git-annex autostart in " ++ d
|
||||
ifM (catchBoolIO $ go program d)
|
||||
( putStrLn "ok"
|
||||
, putStrLn "failed"
|
||||
)
|
||||
where
|
||||
go program dir = do
|
||||
changeWorkingDirectory dir
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue