limpiar daemon
This commit is contained in:
parent
5bc228f7ab
commit
87e1a509a8
1 changed files with 4 additions and 3 deletions
7
main.go
7
main.go
|
@ -82,15 +82,16 @@ func startVM() (string, agentConfig, *firecracker.Machine) {
|
|||
VcpuCount: firecracker.Int64(1),
|
||||
MemSizeMib: firecracker.Int64(1024),
|
||||
},
|
||||
KernelArgs: "fireactions.secret=" + secret,
|
||||
// TODO: setup jailer
|
||||
KernelArgs: "console=ttyS0 reboot=k panic=1 pci=off fireactions.secret=" + secret,
|
||||
}
|
||||
|
||||
// TODO: change stdout/stderr files
|
||||
stdoutPath := "/tmp/stdout.log"
|
||||
stdout, err := os.OpenFile(stdoutPath, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0644)
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("failed to create stdout file: %v", err))
|
||||
}
|
||||
|
||||
stderrPath := "/tmp/stderr.log"
|
||||
stderr, err := os.OpenFile(stderrPath, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0644)
|
||||
if err != nil {
|
||||
|
@ -169,7 +170,7 @@ func (a agentConfig) run(script []byte) error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
log.Println(string(byt))
|
||||
log.Println("[QIOdLqxLoKIMQ0uGoxNuu]", string(byt))
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue