write pid file even when running in foreground
This prevents multiple runs of the assistant in the foreground, and lets --stop stop foregrounded runs too. The webapp firstrun case also now writes a pid file, once it's made the git repo to put it in.
This commit is contained in:
parent
ecc168aba3
commit
8181b38ef6
3 changed files with 15 additions and 10 deletions
|
@ -129,6 +129,7 @@ startDaemon :: Bool -> Bool -> Maybe (Url -> FilePath -> IO ()) -> Annex ()
|
|||
startDaemon assistant foreground webappwaiter
|
||||
| foreground = do
|
||||
showStart (if assistant then "assistant" else "watch") "."
|
||||
liftIO . Utility.Daemon.lockPidFile =<< fromRepo gitAnnexPidFile
|
||||
go id
|
||||
| otherwise = do
|
||||
logfd <- liftIO . openLog =<< fromRepo gitAnnexLogFile
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue