From cd781bf1b860685dfd207a4884f00fb5053866e0 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 1 Sep 2014 17:06:17 +0200 Subject: dhcpcd-hook: just kill if process is running --- dhcpcd/80-pacredir | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dhcpcd/80-pacredir b/dhcpcd/80-pacredir index b67af4e..b5651be 100755 --- a/dhcpcd/80-pacredir +++ b/dhcpcd/80-pacredir @@ -1,9 +1,11 @@ #!/bin/sh - + case "${reason}" in BOUND|REBIND|REBOOT|RENEW|TIMEOUT|STATIC) # inform pacredir about reestablished connection - kill -HUP $(pgrep pacredir) + if pgrep -x pacredir >/dev/null; then + kill -HUP $(pgrep pacredir) + fi ;; PREINIT|EXPIRE|INFORM|FAIL|IPV4LL|NAK|NOCARRIER|RELEASE|STOP) # do nothing here... -- cgit v1.2.3-70-g09d2