#!/bin/sh
IFACE="$1"
PID="$(cat "/run/odhcp6c.$IFACE.pid" 2>/dev/null)"

# Was a pid recorded and does the process still exist?
# XXX should check process name too
if [ -n "$PID" ] && kill -0 $PID; then
	# XXX this doesn't currently remove the pid file
	kill $PID
else
	rm -f "/run/odhcp6c.$IFACE.pid"
fi
