Skip to content

Commit

Permalink
fix: host ip check
Browse files Browse the repository at this point in the history
  • Loading branch information
thalesmg committed Jul 3, 2024
1 parent f0bbe8d commit a52120c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion couchbase/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ function retry(){
function initializeAddHost(){

# validate if host is part of cluster, then skip
if [[ $(couchbase-cli server-list -c $CLUSTER -u $USER -p $PASS | grep $(hostname --ip-address):$PORT) ]]; then
local host_ip
host_ip="127.0.0.1" # $(hostname --ip-address)
if [[ $(couchbase-cli server-list -c $CLUSTER -u $USER -p $PASS | grep $host_ip:$PORT) ]]; then
echo "server is already part of the cluster. skipping."
return 0;
fi
Expand Down

0 comments on commit a52120c

Please sign in to comment.