mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-07-02 02:51:55 +00:00
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
|
||
|
}
|