mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-04-27 19:28:59 +00:00
20 lines
294 B
Go
20 lines
294 B
Go
package hook
|
|
|
|
import (
|
|
config "github.com/kairos-io/kairos/pkg/config"
|
|
"github.com/kairos-io/kairos/pkg/utils"
|
|
)
|
|
|
|
type Lifecycle struct{}
|
|
|
|
func (s Lifecycle) Run(c config.Config) error {
|
|
if c.Install.Reboot {
|
|
utils.Reboot()
|
|
}
|
|
|
|
if c.Install.Poweroff {
|
|
utils.PowerOFF()
|
|
}
|
|
return nil
|
|
}
|