-
Notifications
You must be signed in to change notification settings - Fork 17
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
Create systemd socket activation. #81
base: master
Are you sure you want to change the base?
Conversation
3f12e84
to
a31f27b
Compare
using |
@@ -0,0 +1,4 @@ | |||
#!/usr/bin/env sh | |||
PIPE_NAME="client-core-$(tr -cd 'a-f0-9' < /dev/urandom | head -c 8)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonder if it'd be nicer to use openssl rand -hex 8
instead of shelling out to two utils?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
both those utils are available in basic installation.
Either way I will be swapping this script with a C program.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's part of the systemd stuff, it should be in contrib/systemd/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's to support inetd-style socket activation, so not systemd-specific.
a31f27b
to
e1d772c
Compare
In future the socket activation IMHO should be standard way of starting cjdns. Thanks to that configurators don't have to know anything about cjdroute placement to start cjdns.
This solves netcat incompatiblity issues.
e1d772c
to
24cdea6
Compare
The trap was reworked to be C program. I'd need some external configuration to test it (or I might have to start writing my own). |
In future the socket activation IMHO should be standard way of starting
cjdns. Thanks to that configurators don't have to know anything about
cjdroute placement to start cjdns and it makes starting it much much easier,
I would like to hear your input about socket activation in general.
In this scheme configurator would connect
/run/cjdns/cjdns.socket
UNIX socket which causes new instance of cjdns to start. It then has to send initial configuration (admin info and private key) and switch to admin port.This is experimental and needs yet to be tested. (possibly by allowing current configurator to be stand-alone).
Implementation for
initd
systems is possible (inetd
).