github.com/keybase/client/go@v0.0.0-20240309051027-028f7c731f8b/service/ctl_nix.go (about)

     1  // Copyright 2015 Keybase, Inc. All rights reserved. Use of
     2  // this source code is governed by the included BSD license.
     3  
     4  //go:build !darwin
     5  // +build !darwin
     6  
     7  package service
     8  
     9  import (
    10  	"github.com/keybase/client/go/install"
    11  	keybase1 "github.com/keybase/client/go/protocol/keybase1"
    12  	"golang.org/x/net/context"
    13  )
    14  
    15  func (c *CtlHandler) SetOnLoginStartup(_ context.Context, enabled bool) (err error) {
    16  	return install.ToggleAutostart(c.G(), enabled, false)
    17  }
    18  
    19  func (c *CtlHandler) GetOnLoginStartup(_ context.Context) (keybase1.OnLoginStartupStatus, error) {
    20  	return install.GetAutostart(c.G()), nil
    21  }