diff options
author | Joey Hess <joey@kitenet.net> | 2012-08-01 16:29:38 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-08-01 16:30:53 -0400 |
commit | 8181b38ef6060103953ce464d03e9cfd75c45663 (patch) | |
tree | 0ec9cc7219dd80590cff0cdfdac817b72728dc68 /Assistant.hs | |
parent | ecc168aba30a0477381bcd2037c8d301368f3449 (diff) |
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.
Diffstat (limited to 'Assistant.hs')
-rw-r--r-- | Assistant.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Assistant.hs b/Assistant.hs index be84fab55..21414e721 100644 --- a/Assistant.hs +++ b/Assistant.hs @@ -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 |