gentoo-ebuilds/app-containers/cni-plugins/files/cni-dhcp.initd
William Hubbs 3d7978052d
net-misc/cni-plugins: move to app-containers/cni-plugins
Closes: https://github.com/gentoo/gentoo/pull/25627
Thanks-to: Randall T. Vasquez <ran.dall@icloud.com>
Signed-off-by: William Hubbs <williamh@gentoo.org>
2022-07-16 16:39:22 -05:00

20 lines
376 B
Text

#!/sbin/openrc-run
name="CNI-DHCP"
description="virtual dhcp server for containers"
command="/opt/cni/bin/dhcp"
command_args="daemon"
command_background=true
pidfile="/run/${RC_SVCNAME}.pid"
depend() {
need net
}
stop_post() {
if [ -e /run/cni/dhcp.sock ]; then
ebegin "Cleaning socket for ${name}"
rm -f /run/cni/dhcp.sock
eend $? "Failed to cleanup socket"
fi
}