Skip to content

Commit

Permalink
check_vpn: improved openvpn runtime device detection
Browse files Browse the repository at this point in the history
  • Loading branch information
danfruehauf committed Nov 13, 2013
1 parent e89ce4b commit 2c2c8ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion check_vpn/check_vpn_plugins/openvpn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ _openvpn_vpn_device() {
local pid
for pid in $pids; do
if ps -p $pid --no-header -o cmd | grep -q "remote $lns"; then
local device=`ps -p $pid --no-header -o cmd | grep -o -e "dev $DEVICE_PREFIX[0-9]\+" | cut -d' ' -f2`
local openvpn_command_line=`ps -p $pid --no-header -o cmd`
local device=`_openvpn_parse_arg_from_extra_options dev $openvpn_command_line`
devices="$devices $device"
fi
done
Expand Down

0 comments on commit 2c2c8ec

Please sign in to comment.