diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-08-22 12:24:06 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-08-22 12:24:06 -0400 |
commit | 9762ac8da9b938a40423b79966b35be080686620 (patch) | |
tree | 63e1744818830ab2c15908bd753c0e74349ec662 /CmdLine.hs | |
parent | 1e12f0574214cd68b2d201889ff15e79a5cc0076 (diff) | |
download | keysafe-9762ac8da9b938a40423b79966b35be080686620.tar.gz |
--server needs a port
Diffstat (limited to 'CmdLine.hs')
-rw-r--r-- | CmdLine.hs | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -11,6 +11,7 @@ import qualified Gpg import Options.Applicative import qualified Data.ByteString.UTF8 as BU8 import System.Directory +import Network.Wai.Handler.Warp (Port) data CmdLine = CmdLine { mode :: Maybe Mode @@ -21,7 +22,7 @@ data CmdLine = CmdLine , customShareParams :: Maybe ShareParams } -data Mode = Backup | Restore | UploadQueued | Server | Benchmark +data Mode = Backup | Restore | UploadQueued | Server Port | Benchmark deriving (Show) parse :: Parser CmdLine @@ -45,8 +46,9 @@ parse = CmdLine ( long "uploadqueued" <> help "Upload any data to servers that was queued by a previous --backup run." ) - server = flag' Server + server = Server <$> option auto ( long "server" + <> metavar "PORT" <> help "Run as a keysafe server, accepting objects and storing them to ~/.keysafe/objects/local/" ) benchmark = flag' Benchmark |