mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-08-28 21:01:46 +00:00
* 🎨 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 * 🤖 Add provider bin to releases * ⚙️ Handle signals * ⚙️ Reduce buildsize footprint * 🎨 Scan for providers also in /system/providers * 🤖 Run goreleaser * 🎨 Refactoring
22 lines
381 B
Go
22 lines
381 B
Go
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)
|
|
}
|