From 9eeb584342d1f29415065efc5ba34a7045b2259b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 22 Sep 2016 11:55:10 -0400 Subject: Added --autostart mode and install FDO autostart file --autostart mode currently only uploads queued keys, but it will later be expanded to do more. Including checking the BackupRecord for problems when necessary. The autostart file is installed by keysafe --backup, so that when keysafe is installed with stack, and used, it will make sure it autostarts in the future. The autostart file is installed by the Makefile too. This will later let --autostart check for keys that have not been backed up and prompt about backing them up. This way, the user won't need to remember to run keysafe to back things up. Reused Utility.FreeDesktop from git-annex, and had to add some stuff it depends on. This commit was sponsored by Fernando Jimenez 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 f4a6b92..99414ff 100644 --- a/CmdLine.hs +++ b/CmdLine.hs @@ -29,7 +29,7 @@ data CmdLine = CmdLine , serverConfig :: ServerConfig } -data Mode = Backup | Restore | UploadQueued | Server | GenBackup FilePath | RestoreBackup FilePath | Chaff HostName | Benchmark | Test +data Mode = Backup | Restore | UploadQueued | AutoStart | Server | GenBackup FilePath | RestoreBackup FilePath | Chaff HostName | Benchmark | Test deriving (Show) data ServerConfig = ServerConfig @@ -113,6 +113,10 @@ parseMode = ( long "uploadqueued" <> help "Upload any data to servers that was queued by a previous --backup run." ) + <|> flag' AutoStart + ( long "autostart" + <> help "Run automatically on login by desktop autostart file." + ) <|> flag' Server ( long "server" <> help "Run as a keysafe server, accepting objects and storing them to ~/.keysafe/objects/local/" -- cgit v1.2.3