limpiar daemon

This commit is contained in:
Cat /dev/Nulo 2023-06-03 12:16:24 -03:00
parent 5bc228f7ab
commit 87e1a509a8

View file

@ -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
}