Skip to content

Instantly share code, notes, and snippets.

@TBK
Created November 23, 2023 21:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TBK/544fc630f32ed87f5c923158f55bda0a to your computer and use it in GitHub Desktop.
Save TBK/544fc630f32ed87f5c923158f55bda0a to your computer and use it in GitHub Desktop.
#!/sbin/openrc-run
name=$RC_SVCNAME
description="Netavark DHCP proxy service"
command="/usr/libexec/podman/netavark"
command_args="dhcp-proxy -a 0"
command_background=true
pidfile="/run/$RC_SVCNAME.pid"
depend() {
need net
}
stop_post() {
if [ -e /run/podman/nv-proxy.sock ]; then
ebegin "Cleaning socket for ${name}"
rm -f /run/podman/nv-proxy.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