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
|
@ -64,20 +64,13 @@ start' allowauto = do
|
|||
liftIO $ isJust <$> checkDaemon pidfile
|
||||
checkshim f = liftIO $ doesFileExist f
|
||||
|
||||
{- When run without a repo, see if there is an autoStartFile,
|
||||
- and if so, start the first available listed repository.
|
||||
- If not, it's our first time being run! -}
|
||||
{- When run without a repo, start the first available listed repository in
|
||||
- the autostart file. If not, it's our first time being run! -}
|
||||
startNoRepo :: IO ()
|
||||
startNoRepo = do
|
||||
autostartfile <- autoStartFile
|
||||
ifM (doesFileExist autostartfile) ( autoStart autostartfile , firstRun )
|
||||
|
||||
autoStart :: FilePath -> IO ()
|
||||
autoStart autostartfile = do
|
||||
dirs <- nub . lines <$> readFile autostartfile
|
||||
edirs <- filterM doesDirectoryExist dirs
|
||||
case edirs of
|
||||
[] -> firstRun -- what else can I do? Nothing works..
|
||||
dirs <- liftIO $ filterM doesDirectoryExist =<< readAutoStartFile
|
||||
case dirs of
|
||||
[] -> firstRun
|
||||
(d:_) -> do
|
||||
changeWorkingDirectory d
|
||||
state <- Annex.new =<< Git.CurrentRepo.get
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue