Ejemplo n.º 1
0
func init() {
	dir := filepath.Join(config.Dir(), "installer")
	keysDir = filepath.Join(dir, "keys")
	dbPath = filepath.Join(dir, "data.db")
}
Ejemplo n.º 2
0
	"runtime"
	"time"

	cfg "github.com/flynn/flynn/cli/config"
	"github.com/flynn/flynn/pkg/random"
	"github.com/flynn/flynn/pkg/tufutil"
	"github.com/flynn/flynn/pkg/version"
	tuf "github.com/flynn/go-tuf/client"
	tufdata "github.com/flynn/go-tuf/data"
	"github.com/kardianos/osext"
	"gopkg.in/inconshreveable/go-update.v0"
)

const upcktimePath = "cktime"

var updateDir = filepath.Join(cfg.Dir(), "update")
var updater *Updater

func runUpdate() error {
	if updater == nil || !version.Tagged() {
		return errors.New("Dev builds don't support auto-updates")
	}
	return updater.update()
}

type Updater struct {
	repo     string
	rootKeys []*tufdata.Key
}

func (u *Updater) backgroundRun() {
Ejemplo n.º 3
0
func caCertDir() string {
	return filepath.Join(cfg.Dir(), "ca-certs")
}