summaryrefslogtreecommitdiffhomepage
path: root/CmdLine.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-09-27 12:36:37 -0400
committerJoey Hess <joeyh@joeyh.name>2016-09-27 12:36:37 -0400
commitd154002e063c1c3af5aba13cf05a11df8b8f9897 (patch)
tree86ebc67990feb68fe50862c58c34e47b8ff30779 /CmdLine.hs
parent90ff9f8872b0b4157a7e755e00eedf88907c98f1 (diff)
downloadkeysafe-d154002e063c1c3af5aba13cf05a11df8b8f9897.tar.gz
Server: --motd can be used to provide a Message Of The Day.
This commit was sponsored by Anthony DeRobertis on Patreon.
Diffstat (limited to 'CmdLine.hs')
-rw-r--r--CmdLine.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/CmdLine.hs b/CmdLine.hs
index bb68623..6c5bafd 100644
--- a/CmdLine.hs
+++ b/CmdLine.hs
@@ -38,6 +38,7 @@ data ServerConfig = ServerConfig
{ serverPort :: Port
, serverAddress :: String
, monthsToFillHalfDisk :: Integer
+ , serverMotd :: Maybe T.Text
}
parse :: Parser CmdLine
@@ -185,6 +186,11 @@ parseServerConfig = ServerConfig
<> showDefault
<> help "Server rate-limits requests and requires proof of work, to avoid too many objects being stored. This is an lower bound on how long it could possibly take for half of the current disk space to be filled."
)
+ <*> optional (T.pack <$> strOption
+ ( long "motd"
+ <> metavar "MESSAGE"
+ <> help "The server's Message Of The Day."
+ ))
get :: IO CmdLine
get = execParser opts