webapp is no longer a daemon
Remove --foreground and --stop options from it.
This commit is contained in:
parent
ca512f1450
commit
d7a2600edd
2 changed files with 6 additions and 11 deletions
|
@ -16,7 +16,6 @@ import Assistant.Threads.WebApp
|
||||||
import Utility.WebApp
|
import Utility.WebApp
|
||||||
import Utility.Daemon (checkDaemon, lockPidFile)
|
import Utility.Daemon (checkDaemon, lockPidFile)
|
||||||
import Init
|
import Init
|
||||||
import qualified Command.Watch
|
|
||||||
import qualified Git.CurrentRepo
|
import qualified Git.CurrentRepo
|
||||||
import qualified Annex
|
import qualified Annex
|
||||||
|
|
||||||
|
@ -25,18 +24,14 @@ import Control.Concurrent.STM
|
||||||
|
|
||||||
def :: [Command]
|
def :: [Command]
|
||||||
def = [oneShot $ noRepo firstRun $ dontCheck repoExists $
|
def = [oneShot $ noRepo firstRun $ dontCheck repoExists $
|
||||||
withOptions [Command.Watch.stopOption] $
|
|
||||||
command "webapp" paramNothing seek "launch webapp"]
|
command "webapp" paramNothing seek "launch webapp"]
|
||||||
|
|
||||||
seek :: [CommandSeek]
|
seek :: [CommandSeek]
|
||||||
seek = [withFlag Command.Watch.stopOption $ \stopdaemon ->
|
seek = [withNothing start]
|
||||||
withNothing $ start stopdaemon]
|
|
||||||
|
|
||||||
start :: Bool -> CommandStart
|
start :: CommandStart
|
||||||
start stopdaemon = notBareRepo $ do
|
start = notBareRepo $ do
|
||||||
if stopdaemon
|
ifM (isInitialized) ( go , liftIO firstRun )
|
||||||
then stopDaemon
|
|
||||||
else ifM (isInitialized) ( go , liftIO firstRun )
|
|
||||||
stop
|
stop
|
||||||
where
|
where
|
||||||
go = do
|
go = do
|
||||||
|
|
|
@ -192,8 +192,8 @@ subdirectories).
|
||||||
|
|
||||||
* webapp
|
* webapp
|
||||||
|
|
||||||
Opens a web browser, viewing the git-annex assistant's web app.
|
Runs a web app, that allows easy setup of a git-annex repository,
|
||||||
(If the assistant is not already running, it will be automatically started.)
|
and control of the git-annex assistant.
|
||||||
|
|
||||||
# REPOSITORY SETUP COMMANDS
|
# REPOSITORY SETUP COMMANDS
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue