processCmd AddUser{..} = do
  putStrLn "Ghost: adding a new user."
  home <- getHomeDirectory
  -- TODO validate username (forbid "administrator", just in case)
  -- TODO validate key
  -- TODO actually handle more than one key
  let userKeys = home </> "users" </> addUserName </> "keys"
  _ <- createDirectoryIfMissing True $ home </> "users" </> addUserName
  b <- doesFileExist addUserPublicKeyPath
  if b
    then do
      copyFile addUserPublicKeyPath userKeys
    else putStrLn $ "File " ++ addUserPublicKeyPath ++ " not found."
  refreshAuthorizedKeys "/home/ghost/bin/ghost-command"
processCmd AddUser{..} = do
  putStrLn "Ghost: adding a new user."
  home <- getHomeDirectory
  -- TODO validate username (forbid "administrator", just in case)
  -- TODO validate key
  -- TODO actually handle more than one key
  let userKeys = home </> "users" </> addUserName </> "keys"
  _ <- createDirectoryIfMissing True $ home </> "users" </> addUserName
  b <- doesFileExist addUserPublicKeyPath
  if b
    then do
      copyFile addUserPublicKeyPath userKeys
    else putStrLn $ "File " ++ addUserPublicKeyPath ++ " not found."
  refreshAuthorizedKeys "/home/ghost/bin/ghost-command"
processCmd AddUser{..} = do
  putStrLn "Ghost: adding a new user."
  home <- getHomeDirectory
  -- TODO validate username (forbid "administrator", just in case)
  -- TODO validate key
  -- TODO actually handle more than one key
  let userKeys = home </> "users" </> addUserName </> "keys"
  _ <- createDirectoryIfMissing True $ home </> "users" </> addUserName
  b <- doesFileExist addUserPublicKeyPath
  if b
    then do
      copyFile addUserPublicKeyPath userKeys
    else putStrLn $ "File " ++ addUserPublicKeyPath ++ " not found."
  refreshAuthorizedKeys "/home/ghost/bin/ghost-command"