Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add systemd notify support #164

Open
cognifloyd opened this issue May 27, 2020 · 0 comments
Open

Add systemd notify support #164

cognifloyd opened this issue May 27, 2020 · 0 comments

Comments

@cognifloyd
Copy link

It would be helpful to add systemd notify support to make it easier to daemonize the server and client processes.

The notification would happen once the tunnel is up and running, ready to forward the TCP traffic.
So, the server would notify when clients can start connecting, and clients would notify when the connection to the server has been established and forwarded ports can start accepting traffic.

We can do this with github.com/coreos/go-systemd/daemon.

import (
  "github.com/coreos/go-systemd/daemon"
)

func whatever() {
  // get ready to accept connections then tell systemd when ready
  daemon.SdNotify(false, "READY=1")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants