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 --daemon flag / pid file #40

Open
synfinatic opened this issue Oct 19, 2020 · 8 comments
Open

Add --daemon flag / pid file #40

synfinatic opened this issue Oct 19, 2020 · 8 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@synfinatic
Copy link
Owner

Would be nice if udp-proxy-2020 supported running as a daemon and writing a pid file to /var/run/udp-proxy-2020.pid or other user defined path.

@synfinatic synfinatic added enhancement New feature or request good first issue Good for newcomers labels Oct 19, 2020
@tiehfood
Copy link

I successfully build your site-to-site version for the Unifiy UDM and it works very well 👍 . A daemonized version as you suggested would be a really nice feature

@synfinatic
Copy link
Owner Author

FWIW, I have no idea how the UDM starts services on boot, but pretty much everything nowadays (upstart, systemd) don't require a "daemon" mode. If you do figure it out, i'd be curious to hear how you did it so I can document it for others.

@synfinatic
Copy link
Owner Author

Quick note: Apparently daemonizing go apps is non-traditional because of how go works. But this library seems the most popular way of doing so: https://github.com/sevlyar/go-daemon

@tiehfood
Copy link

As far as I know there's no easy way to run a persistent daemon on the UDM/UDMP besides a more or less hacky way abusing the way package installations are handled on these machines. But for my purpose it would be sufficient enough to start the daemon by hand every time the UDM/UDMP reboots.

@tiehfood
Copy link

So my idea: ssh into the UDM/UDMP and start your tool as a daemon :)

@tiehfood
Copy link

Unfortunately I have no experience in programming with go

@synfinatic
Copy link
Owner Author

Sadly the UDM series is really limited right now. That said, it is just linux and so you should be able to write a startup script to do it for you.

@tiehfood
Copy link

Yeah, got it running. Thanks again for the great tool :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants