mirror of
https://github.com/kairos-io/kairos-sdk.git
synced 2025-07-19 09:39:13 +00:00
This had some side effects: - Have to add some utils from the kairos/machine modules, which IMHO should not be there, they should be here if the are generic enough - Dropping the sdk dir, just have the modules in the root dir Signed-off-by: Itxaka <itxaka.garcia@spectrocloud.com>
19 lines
248 B
Go
19 lines
248 B
Go
package bus
|
|
|
|
import (
|
|
"os"
|
|
"os/exec"
|
|
)
|
|
|
|
func RunHookScript(s string) error {
|
|
_, err := os.Stat(s)
|
|
if err != nil {
|
|
return nil
|
|
}
|
|
cmd := exec.Command(s)
|
|
cmd.Stdout = os.Stdout
|
|
cmd.Stderr = os.Stderr
|
|
cmd.Stdin = os.Stdin
|
|
return cmd.Run()
|
|
}
|