Add systemd unit file to activate socket with systemd
This changes to add sample systemd unit files to activate socket with systemd. Fix #156.
This commit is contained in:
parent
afd7391938
commit
b1814d7f9a
11
plugins/ipam/dhcp/systemd/cni-dhcp.service
Normal file
11
plugins/ipam/dhcp/systemd/cni-dhcp.service
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=CNI DHCP service
|
||||||
|
Documentation=https://github.com/containernetworking/plugins/tree/master/plugins/ipam/dhcp
|
||||||
|
After=network.target cni-dhcp.socket
|
||||||
|
Requires=cni-dhcp.socket
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/opt/cni/bin/dhcp daemon
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
14
plugins/ipam/dhcp/systemd/cni-dhcp.socket
Normal file
14
plugins/ipam/dhcp/systemd/cni-dhcp.socket
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=CNI DHCP service socket
|
||||||
|
Documentation=https://github.com/containernetworking/plugins/tree/master/plugins/ipam/dhcp
|
||||||
|
PartOf=cni-dhcp.service
|
||||||
|
|
||||||
|
[Socket]
|
||||||
|
ListenStream=/run/cni/dhcp.sock
|
||||||
|
SocketMode=0660
|
||||||
|
SocketUser=root
|
||||||
|
SocketGroup=root
|
||||||
|
RemoveOnStop=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=sockets.target
|
Loading…
x
Reference in New Issue
Block a user