full autostart support

git annex assistant --autostart will start separate daemons in each
listed autostart repo

running the webapp outside any git-annex repo will open it on the
first listed autostart repo
This commit is contained in:
Joey Hess 2012-08-02 00:42:33 -04:00
parent 23fe661d37
commit 60da0d6ad2
8 changed files with 134 additions and 23 deletions

View file

@ -16,13 +16,10 @@ def :: [Command]
def = [withOptions [foregroundOption, stopOption] $
command "watch" paramNothing seek "watch for changes"]
mkSeek :: Bool -> [CommandSeek]
mkSeek assistant = [withFlag stopOption $ \stopdaemon ->
withFlag foregroundOption $ \foreground ->
withNothing $ start assistant foreground stopdaemon]
seek :: [CommandSeek]
seek = mkSeek False
seek = [withFlag stopOption $ \stopdaemon ->
withFlag foregroundOption $ \foreground ->
withNothing $ start False foreground stopdaemon]
foregroundOption :: Option
foregroundOption = Option.flag [] "foreground" "do not daemonize"