AdGuard Home as a system service
1. Reworked working with command-line arguments 2. Added service control actions: install/uninstall/start/stop/status 3. Added log settings to the configuration file 4. Updated the README file
This commit is contained in:
17
dhcp.go
17
dhcp.go
@@ -165,3 +165,20 @@ func startDHCPServer() error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func stopDHCPServer() error {
|
||||
if !config.DHCP.Enabled {
|
||||
return nil
|
||||
}
|
||||
|
||||
if !dhcpServer.Enabled {
|
||||
return nil
|
||||
}
|
||||
|
||||
err := dhcpServer.Stop()
|
||||
if err != nil {
|
||||
return errorx.Decorate(err, "Couldn't stop DHCP server")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user