]> git.decadent.org.uk Git - odhcp6c.git/blob - debian/odhcp6c.ppp.ipv6-down
Add preliminary PPP hook scripts
[odhcp6c.git] / debian / odhcp6c.ppp.ipv6-down
1 #!/bin/sh
2 IFACE="$1"
3 PID="$(cat "/run/odhcp6c.$IFACE.pid" 2>/dev/null)"
4
5 # Was a pid recorded and does the process still exist?
6 # XXX should check process name too
7 if [ -n "$PID" ] && kill -0 $PID; then
8         # XXX this doesn't currently remove the pid file
9         kill $PID
10 else
11         rm -f "/run/odhcp6c.$IFACE.pid"
12 fi