mirror of
https://github.com/gravitl/netmaker.git
synced 2024-11-13 04:54:48 +08:00
check if networks output is null
This commit is contained in:
parent
ea610281d1
commit
f5ff9b903d
1 changed files with 5 additions and 3 deletions
|
@ -743,9 +743,11 @@ test_connection() {
|
|||
setup_mesh() {
|
||||
|
||||
wait_seconds 5
|
||||
netmakerNet=$(nmctl network list -o json | jq -r '.[] | .netid' | grep -w "netmaker")
|
||||
inetNet=$(nmctl network list -o json | jq -r '.[] | .netid' | grep -w "internet-access-vpn")
|
||||
|
||||
networks=$(nmctl network list -o json)
|
||||
if [[ ${networks} != "null" ]]; then
|
||||
netmakerNet=$(nmctl network list -o json | jq -r '.[] | .netid' | grep -w "netmaker")
|
||||
inetNet=$(nmctl network list -o json | jq -r '.[] | .netid' | grep -w "internet-access-vpn")
|
||||
fi
|
||||
# create netmaker network
|
||||
if [[ ${netmakerNet} = "" ]]; then
|
||||
echo "Creating netmaker network (100.64.0.0/16)"
|
||||
|
|
Loading…
Reference in a new issue