Logo
Explore Help
Register Sign In
kairos/kairos-agent
1
0
Fork 0
You've already forked kairos-agent
mirror of https://github.com/kairos-io/kairos-agent.git synced 2025-08-30 23:56:14 +00:00
Code Issues Packages Projects Releases Wiki Activity
Files
63cd28d1cb88bbf715ffd5b3ea0031fa293db851
kairos-agent/internal/role/common.go

22 lines
381 B
Go
Raw Normal View History

Split off cli into separate binaries (#37) * :art: Split off cli into separate binaries This commit splits off the cli into 3 binaries: - agent - cli - provider The provider now is a separate component that can be tested by itself and have its own lifecycle. This paves the way to a ligher c3os variant, HA support and other features that can be provided on runtime. This is working, but still there are low hanging fruit to care about. Fixes #14 * :robot: Add provider bin to releases * :gear: Handle signals * :gear: Reduce buildsize footprint * :art: Scan for providers also in /system/providers * :robot: Run goreleaser * :art: Refactoring
2022-07-04 22:39:34 +02:00
package role
import (
"io/ioutil"
"os"
service "github.com/mudler/edgevpn/api/client/service"
)
type Role func(*service.RoleConfig) error
func SentinelExist() bool {
if _, err := os.Stat("/usr/local/.c3os/deployed"); err == nil {
return true
}
return false
}
func CreateSentinel() error {
return ioutil.WriteFile("/usr/local/.c3os/deployed", []byte{}, os.ModePerm)
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.5 Page: 1113ms Template: 108ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API