mirror of
https://github.com/kairos-io/provider-kairos.git
synced 2025-08-19 07:47:41 +00:00
22 lines
385 B
Go
22 lines
385 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/.kairos/deployed"); err == nil {
|
|
return true
|
|
}
|
|
return false
|
|
}
|
|
|
|
func CreateSentinel() error {
|
|
return ioutil.WriteFile("/usr/local/.kairos/deployed", []byte{}, os.ModePerm)
|
|
}
|