mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
So on Windows system where there's local DNS running, ctrld could set DNS forwarders correctly after DNS service started.
15 lines
312 B
Go
15 lines
312 B
Go
package cli
|
|
|
|
import "github.com/kardianos/service"
|
|
|
|
func setDependencies(svc *service.Config) {
|
|
if hasLocalDnsServerRunning() {
|
|
svc.Dependencies = []string{"DNS"}
|
|
}
|
|
}
|
|
|
|
func setWorkingDirectory(svc *service.Config, dir string) {
|
|
// WorkingDirectory is not supported on Windows.
|
|
svc.WorkingDirectory = dir
|
|
}
|