mirror of
https://github.com/safing/portmaster
synced 2025-09-01 10:09:11 +00:00
Remove obsoleted dnscache service check
This commit is contained in:
parent
48b55a88bc
commit
fa58de2e1b
1 changed files with 0 additions and 29 deletions
|
@ -3,9 +3,6 @@ package interception
|
|||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/safing/portbase/log"
|
||||
"github.com/safing/portbase/notifications"
|
||||
"github.com/safing/portbase/utils/osdetail"
|
||||
"github.com/safing/portmaster/firewall/interception/windowskext"
|
||||
"github.com/safing/portmaster/network/packet"
|
||||
"github.com/safing/portmaster/updates"
|
||||
|
@ -33,7 +30,6 @@ func start(ch chan packet.Packet) error {
|
|||
}
|
||||
|
||||
go windowskext.Handler(ch)
|
||||
go checkWindowsDNSCache()
|
||||
|
||||
return nil
|
||||
}
|
||||
|
@ -42,28 +38,3 @@ func start(ch chan packet.Packet) error {
|
|||
func stop() error {
|
||||
return windowskext.Stop()
|
||||
}
|
||||
|
||||
func checkWindowsDNSCache() {
|
||||
status, err := osdetail.GetServiceStatus("dnscache")
|
||||
if err != nil {
|
||||
log.Warningf("firewall/interception: failed to check status of Windows DNS-Client: %s", err)
|
||||
}
|
||||
|
||||
if status == osdetail.StatusStopped {
|
||||
err := osdetail.EnableDNSCache()
|
||||
if err != nil {
|
||||
log.Warningf("firewall/interception: failed to enable Windows Service \"DNS Client\" (dnscache): %s", err)
|
||||
} else {
|
||||
log.Warningf("firewall/interception: successfully enabled the dnscache")
|
||||
notifyRebootRequired()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func notifyRebootRequired() {
|
||||
(¬ifications.Notification{
|
||||
EventID: "interception:windows-dnscache-reboot-required",
|
||||
Message: "Please restart your system to complete Portmaster integration.",
|
||||
Type: notifications.Warning,
|
||||
}).Save()
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue