Created
November 23, 2023 21:48
-
-
Save TBK/4e6434ded8f48aadc9e222afb9eac94b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/sbin/openrc-run | |
name="CNI DHCP" | |
description="CNI DHCP service" | |
command="/usr/libexec/cni/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 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment