From 8fe65bd0f70c1cd2fc83469f401c987d69eb4370 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 27 Sep 2016 13:09:30 -0400 Subject: Added --check-servers mode, which is useful both at the command line to see what servers keysafe knows about, and as a cron job. This commit was sponsored by Jake Vosloo on Patreon. --- CmdLine.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'CmdLine.hs') diff --git a/CmdLine.hs b/CmdLine.hs index 6c5bafd..702c97d 100644 --- a/CmdLine.hs +++ b/CmdLine.hs @@ -31,7 +31,7 @@ data CmdLine = CmdLine , chaffMaxDelay :: Maybe Seconds } -data Mode = Backup | Restore | UploadQueued | AutoStart | Server | BackupServer FilePath | RestoreServer FilePath | Chaff HostName | Benchmark | Test +data Mode = Backup | Restore | UploadQueued | AutoStart | Server | BackupServer FilePath | RestoreServer FilePath | Chaff HostName | CheckServers | Benchmark | Test deriving (Show) data ServerConfig = ServerConfig @@ -135,6 +135,10 @@ parseMode = <> metavar "HOSTNAME" <> help "Upload random data to a keysafe server." ) + <|> flag' CheckServers + ( long "check-servers" + <> help "Tries to connect to each server in the server list. Displays the server's MOTD, and the amount of data stored on it. Prints message to stderr and exits nonzero if any of the servers are not accessible." + ) <|> flag' Benchmark ( long "benchmark" <> help "Benchmark speed of keysafe's cryptographic primitives." -- cgit v1.2.3