mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-06-25 07:41:43 +00:00
* ✨ Add grub_options to config Split post-install into hooks * 🤖 Adapt test to latest releases
20 lines
286 B
Go
20 lines
286 B
Go
package hook
|
|
|
|
import (
|
|
config "github.com/c3os-io/c3os/pkg/config"
|
|
"github.com/c3os-io/c3os/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
|
|
}
|