mirror of
https://github.com/pivpn/pivpn.git
synced 2024-12-18 19:00:15 +00:00
Leave the loop once we match
This commit is contained in:
parent
faaabe4c0e
commit
752d0cc3af
1 changed files with 2 additions and 1 deletions
|
@ -86,10 +86,11 @@ fi
|
||||||
while read -r line || [ -n "${line}" ]; do
|
while read -r line || [ -n "${line}" ]; do
|
||||||
STATUS=$(echo "$line" | awk '{print $1}')
|
STATUS=$(echo "$line" | awk '{print $1}')
|
||||||
|
|
||||||
if [[ "${STATUS}" = "V" ]]; then
|
if [ "${STATUS}" == "V" ]; then
|
||||||
CERT=$(echo "$line" | sed -e 's:.*/CN=::')
|
CERT=$(echo "$line" | sed -e 's:.*/CN=::')
|
||||||
if [ "${CERT}" == "${NAME}" ]; then
|
if [ "${CERT}" == "${NAME}" ]; then
|
||||||
INUSE="1"
|
INUSE="1"
|
||||||
|
break
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done <${INDEX}
|
done <${INDEX}
|
||||||
|
|
Loading…
Reference in a new issue