diff --git a/install/beckn-onix.sh b/install/beckn-onix.sh index cdc9b25..e05d260 100755 --- a/install/beckn-onix.sh +++ b/install/beckn-onix.sh @@ -103,7 +103,11 @@ install_registry() { echo "Registry installation successful" #Update Role Permission for registry. - bash scripts/registry_role_permissions.sh + if [[ $1 ]]; then + bash scripts/registry_role_permissions.sh $1 + else + bash scripts/registry_role_permissions.sh + fi } # Function to install Layer2 Config @@ -355,7 +359,7 @@ get_np_domain() { local login_url="${registry_url%/subscribers}" read -p "Enter the domain name for $1 : " np_domain domain_present=$(curl -s -H "ApiKey:$api_key" --header 'Content-Type: application/json' $login_url/network_domains/index | jq -r '.[].name' | tr '\n' ' ') - if echo "$domain_present" | grep -qw "$np_domain"; then + if echo ":$domain_present:" | grep -qw ":$np_domain:"; then return 0 else echo "${BoldRed}The domain '$np_domain' is NOT present in the network domains.${NC}"