mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-11-16 16:29:23 +01:00
etc/systemd/system: add cjdns/
This commit is contained in:
parent
35f12ae35c
commit
06d5ff55d0
1
etc/systemd/system/cjdns/README.md
Normal file
1
etc/systemd/system/cjdns/README.md
Normal file
@ -0,0 +1 @@
|
||||
These files are copied from https://github.com/cjdelisle/cjdns/tree/master/contrib/systemd/ and in case of cjdns.service the pathes are adjusted to how I am likely to be run it.
|
10
etc/systemd/system/cjdns/cjdns-resume.service
Normal file
10
etc/systemd/system/cjdns/cjdns-resume.service
Normal file
@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Restart cjdns on resume from sleep
|
||||
After=sleep.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/bin/systemctl restart cjdns
|
||||
|
||||
[Install]
|
||||
WantedBy=sleep.target
|
20
etc/systemd/system/cjdns/cjdns.service
Normal file
20
etc/systemd/system/cjdns/cjdns.service
Normal file
@ -0,0 +1,20 @@
|
||||
[Unit]
|
||||
Description=cjdns: routing engine designed for security, scalability, speed and ease of use
|
||||
Wants=network.target
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ProtectHome=true
|
||||
ProtectSystem=true
|
||||
SyslogIdentifier=cjdroute
|
||||
ExecStartPre=/bin/sh -ec "if ! test -s /opt/cjdns/cjdroute.conf; \
|
||||
then umask 077; \
|
||||
/opt/cjdns/cjdroute --genconf > /opt/cjdns/cjdroute.conf; \
|
||||
echo 'WARNING: A new /opt/cjdns/cjdroute.conf file has been generated.'; \
|
||||
fi"
|
||||
ExecStart=/bin/sh -c "exec /opt/cjdns/cjdroute --nobg < /opt/cjdns/cjdroute.conf"
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Also=cjdns-resume.service
|
Loading…
Reference in New Issue
Block a user