summaryrefslogtreecommitdiffstats
path: root/40-openvpn
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2014-09-02 08:02:21 +0200
committerGravatar Christian Hesse <mail@eworm.de>2014-09-02 08:02:21 +0200
commit44766618179803ab22b5905fae31542d2d3f61d0 (patch)
tree919decfd6fe820d81a272e70a273e714f345b594 /40-openvpn
parentfad14f92ae45ffc7343c8d0c175a8f5b33553262 (diff)
downloaddhcpcd-hook-openvpn-413c9cfb05b6c6987b705f67d7e3014e8bff7c97.tar.gz
dhcpcd-hook-openvpn-413c9cfb05b6c6987b705f67d7e3014e8bff7c97.tar.zst
use pgrep0.2.0
Diffstat (limited to '40-openvpn')
-rw-r--r--40-openvpn6
1 files 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...