killChild() is not needed any more; update config example by the way
This commit is contained in:
parent
a74c0fedeb
commit
9f1be6e079
|
@ -41,12 +41,7 @@ listen_addresses = ['127.0.0.1:53', '[::1]:53']
|
||||||
max_clients = 250
|
max_clients = 250
|
||||||
|
|
||||||
|
|
||||||
## Switch to a non-privileged system user after listening sockets have been created.
|
## Switch to a different system user after listening sockets have been created.
|
||||||
## Two processes will be running.
|
|
||||||
## The first one will keep root privileges, but is only a supervisor, that does nothing
|
|
||||||
## except create the sockets, manage the service, and restart it if it crashes.
|
|
||||||
## The second process is the service itself, and that one will always run as a different
|
|
||||||
## user.
|
|
||||||
## Note (1): this feature is currently unsupported on Windows.
|
## Note (1): this feature is currently unsupported on Windows.
|
||||||
## Note (2): this feature is not compatible with systemd socket activation.
|
## Note (2): this feature is not compatible with systemd socket activation.
|
||||||
|
|
||||||
|
@ -491,6 +486,15 @@ cache_neg_max_ttl = 600
|
||||||
refresh_delay = 72
|
refresh_delay = 72
|
||||||
prefix = ''
|
prefix = ''
|
||||||
|
|
||||||
|
## Quad9 over DNSCrypt - https://quad9.net/
|
||||||
|
|
||||||
|
# [sources.quad9-resolvers]
|
||||||
|
# urls = ["https://www.quad9.net/quad9-resolvers.md"]
|
||||||
|
# minisign_key = "RWQBphd2+f6eiAqBsvDZEBXBGHQBJfeG6G+wJPPKxCZMoEQYpmoysKUN"
|
||||||
|
# cache_file = "quad9-resolvers.md"
|
||||||
|
# refresh_delay = 72
|
||||||
|
# prefix = "quad9"
|
||||||
|
|
||||||
## Another example source, with resolvers censoring some websites not appropriate for children
|
## Another example source, with resolvers censoring some websites not appropriate for children
|
||||||
## This is a subset of the `public-resolvers` list, so enabling both is useless
|
## This is a subset of the `public-resolvers` list, so enabling both is useless
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,6 @@ func (app *App) Stop(service service.Service) error {
|
||||||
if pidFilePath := pidfile.GetPidfilePath(); len(pidFilePath) > 1 {
|
if pidFilePath := pidfile.GetPidfilePath(); len(pidFilePath) > 1 {
|
||||||
os.Remove(pidFilePath)
|
os.Remove(pidFilePath)
|
||||||
}
|
}
|
||||||
killChild()
|
|
||||||
dlog.Notice("Stopped.")
|
dlog.Notice("Stopped.")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,11 +84,3 @@ func (proxy *Proxy) dropPrivilege(userStr string, fds []*os.File) {
|
||||||
dlog.Fatalf("Unable to reexecute [%s]", path)
|
dlog.Fatalf("Unable to reexecute [%s]", path)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
func killChild() {
|
|
||||||
if cmd != nil {
|
|
||||||
if err := cmd.Process.Kill(); err != nil {
|
|
||||||
dlog.Fatal("Failed to kill child process.")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -86,11 +86,3 @@ func (proxy *Proxy) dropPrivilege(userStr string, fds []*os.File) {
|
||||||
dlog.Fatalf("Unable to reexecute [%s]", path)
|
dlog.Fatalf("Unable to reexecute [%s]", path)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
func killChild() {
|
|
||||||
if cmd != nil {
|
|
||||||
if err := cmd.Process.Kill(); err != nil {
|
|
||||||
dlog.Fatal("Failed to kill child process.")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -3,4 +3,3 @@ package main
|
||||||
import "os"
|
import "os"
|
||||||
|
|
||||||
func (proxy *Proxy) dropPrivilege(userStr string, fds []*os.File) {}
|
func (proxy *Proxy) dropPrivilege(userStr string, fds []*os.File) {}
|
||||||
func killChild() {}
|
|
||||||
|
|
Loading…
Reference in New Issue