123456789101112131415161718192021222324 |
- package control
- import (
- "os"
- "os/exec"
- "syscall"
- log "github.com/Sirupsen/logrus"
- "github.com/codegangsta/cli"
- )
- func recoveryInitAction(c *cli.Context) error {
- if err := writeRespawn("root", false, true); err != nil {
- log.Error(err)
- }
- respawnBinPath, err := exec.LookPath("respawn")
- if err != nil {
- return err
- }
- return syscall.Exec(respawnBinPath, []string{"respawn", "-f", "/etc/respawn.conf"}, os.Environ())
- }
|