clustvirt/daemon/control.go

19 lines
257 B
Go
Raw Normal View History

2024-03-31 10:17:00 +00:00
package daemon
import (
"fmt"
"os"
log "git.staur.ca/stobbsm/simplelog"
2024-03-31 10:17:00 +00:00
)
func Start() {
pid := pid()
if err := os.WriteFile(PIDFile, []byte(fmt.Sprint(pid)), 0666); err != nil {
log.Error("daemon.Start").
Err(err).
Send()
os.Exit(1)
}
}