From 44766618179803ab22b5905fae31542d2d3f61d0 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 2 Sep 2014 08:02:21 +0200 Subject: use pgrep --- 40-openvpn | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/40-openvpn b/40-openvpn index e8c21ec..1306113 100644 --- a/40-openvpn +++ b/40-openvpn @@ -1,9 +1,11 @@ #!/bin/sh - + case "${reason}" in BOUND|REBIND|REBOOT|RENEW|TIMEOUT|STATIC) # send openvpn processes SIGUSR1 and make them reconnect - killall -USR1 openvpn + if pgrep -x openvpn >/dev/null; then + kill -USR1 $(pgrep -x openvpn) + fi ;; PREINIT|EXPIRE|INFORM|FAIL|IPV4LL|NAK|NOCARRIER|RELEASE|STOP) # do nothing here... -- cgit v1.2.3-70-g09d2