Files
extra/dnscrypt-proxy/remove-go-systemd-support.patch
2025-06-22 20:39:04 -05:00

98 lines
3.9 KiB
Diff

diff --git a/dnscrypt-proxy/config.go b/dnscrypt-proxy/config.go
index 2a195719..731a2155 100644
--- a/dnscrypt-proxy/config.go
+++ b/dnscrypt-proxy/config.go
@@ -572,9 +572,6 @@ func ConfigLoad(proxy *Proxy, flags *ConfigFlags) error {
for _, listenAddrStr := range proxy.localDoHListenAddresses {
proxy.addLocalDoHListener(listenAddrStr)
}
- if err := proxy.addSystemDListeners(); err != nil {
- dlog.Fatal(err)
- }
}
_ = pidfile.Write()
// if 'userName' is set and we are the parent process drop privilege and exit
diff --git a/dnscrypt-proxy/main.go b/dnscrypt-proxy/main.go
index 6f21d083..28fc3cdc 100644
--- a/dnscrypt-proxy/main.go
+++ b/dnscrypt-proxy/main.go
@@ -82,7 +82,6 @@ func main() {
}
app.proxy = NewProxy()
- _ = ServiceManagerStartNotify()
if len(*svcFlag) != 0 {
if svc == nil {
dlog.Fatal("Built-in service installation is not supported on this platform")
diff --git a/dnscrypt-proxy/privilege_linux.go b/dnscrypt-proxy/privilege_linux.go
index 5e73037e..8a525bd4 100644
--- a/dnscrypt-proxy/privilege_linux.go
+++ b/dnscrypt-proxy/privilege_linux.go
@@ -47,10 +47,6 @@ func (proxy *Proxy) dropPrivilege(userStr string, fds []*os.File) {
dlog.Fatal(err)
}
- if err := ServiceManagerReadyNotify(); err != nil {
- dlog.Fatal(err)
- }
-
args = append(args, "-child")
dlog.Notice("Dropping privileges")
diff --git a/dnscrypt-proxy/proxy.go b/dnscrypt-proxy/proxy.go
index 24b406f0..07d038ec 100644
--- a/dnscrypt-proxy/proxy.go
+++ b/dnscrypt-proxy/proxy.go
@@ -228,11 +228,6 @@ func (proxy *Proxy) StartProxy() {
}
if liveServers > 0 {
dlog.Noticef("dnscrypt-proxy is ready - live servers: %d", liveServers)
- if !proxy.child {
- if err := ServiceManagerReadyNotify(); err != nil {
- dlog.Fatal(err)
- }
- }
} else if err != nil {
dlog.Error(err)
dlog.Notice("dnscrypt-proxy is waiting for at least one server to be reachable")
diff --git a/go.mod b/go.mod
index 4ed0460b..2f3c27b5 100644
--- a/go.mod
+++ b/go.mod
@@ -5,7 +5,6 @@ go 1.14
require (
github.com/BurntSushi/toml v0.3.1
github.com/VividCortex/ewma v1.1.1
- github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf
github.com/dchest/safefile v0.0.0-20151022103144-855e8d98f185
github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5 // indirect
github.com/facebookgo/pidfile v0.0.0-20150612191647-f242e2999868
diff --git a/go.sum b/go.sum
index 0356d8d0..e93150b0 100644
--- a/go.sum
+++ b/go.sum
@@ -6,8 +6,6 @@ github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da h1:KjTM2ks9d14ZYCvmH
github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da/go.mod h1:eHEWzANqSiWQsof+nXEI9bUVUyV6F53Fp89EuCh2EAA=
github.com/aead/poly1305 v0.0.0-20180717145839-3fee0db0b635 h1:52m0LGchQBBVqJRyYYufQuIbVqRawmubW3OFGqK1ekw=
github.com/aead/poly1305 v0.0.0-20180717145839-3fee0db0b635/go.mod h1:lmLxL+FV291OopO93Bwf9fQLQeLyt33VJRUg5VJ30us=
-github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf h1:iW4rZ826su+pqaw19uhpSCzhj44qo35pNgKFGqzDKkU=
-github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dchest/safefile v0.0.0-20151022103144-855e8d98f185 h1:3T8ZyTDp5QxTx3NU48JVb2u+75xc040fofcBaN+6jPA=
diff --git a/vendor/modules.txt b/vendor/modules.txt
index c6e8c437..77a18629 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -8,10 +8,6 @@ github.com/VividCortex/ewma
github.com/aead/chacha20/chacha
# github.com/aead/poly1305 v0.0.0-20180717145839-3fee0db0b635
github.com/aead/poly1305
-# github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf
-## explicit
-github.com/coreos/go-systemd/activation
-github.com/coreos/go-systemd/daemon
# github.com/davecgh/go-spew v1.1.1
github.com/davecgh/go-spew/spew
# github.com/dchest/safefile v0.0.0-20151022103144-855e8d98f185