forked from cjdelisle/cjdns
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
4 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
PIPE_NAME="client-core-$(tr -cd 'a-f0-9' < /dev/urandom | head -c 8)" | ||
(sleep 1 && /usr/bin/env cjdroute core "$PIPE_NAME" > /dev/null) & | ||
nc -lU "/tmp/cjdns_pipe_$PIPE_NAME" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
## How to install | ||
|
||
```bash | ||
mv contrib/systemd/cjdn* /usr/lib/systemd/systemd/ | ||
mv conrtib/bash/cjdns-trap.sh /usr/lib/systemd/scripts/ | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[Unit] | ||
Description=Cjdns activation socket. | ||
|
||
[Socket] | ||
ListenStream=/run/cjdns/cjdns.socket | ||
Accept=true | ||
SocketMode=0600 | ||
|
||
[Install] | ||
WantedBy=sockets.target | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[Unit] | ||
Description=cjdns-multinstant: routing engine designed for security, scalability, speed and ease of use | ||
Wants=network.target | ||
After=network.target | ||
Requires=cjdns.socket | ||
|
||
[Service] | ||
ProtectHome=true | ||
ProtectSystem=true | ||
SyslogIdentifier=cjdroute | ||
|
||
Type=forking | ||
ExecStart=/usr/lib/systemd/scripts/cjdns-trap.sh | ||
StandardInput=socket | ||
StandardOutput=socket | ||
StandardError=journal |