package home
import (
"github.com/joomcode/errorx"
)
func startDHCPServer() error {
if !config.DHCP.Enabled {
// not enabled, don't do anything
return nil
}
err := Context.dhcpServer.Init(config.DHCP)
if err != nil {
return errorx.Decorate(err, "Couldn't init DHCP server")
err = Context.dhcpServer.Start()
return errorx.Decorate(err, "Couldn't start DHCP server")
func stopDHCPServer() error {
err := Context.dhcpServer.Stop()
return errorx.Decorate(err, "Couldn't stop DHCP server")