summaryrefslogtreecommitdiffstats
path: root/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates
diff options
context:
space:
mode:
Diffstat (limited to 'asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates')
-rw-r--r--asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/create_cassandra_user.sh.erb10
-rw-r--r--asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/create_dox_keyspace.sh.erb2
2 files changed, 6 insertions, 6 deletions
diff --git a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/create_cassandra_user.sh.erb b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/create_cassandra_user.sh.erb
index 426eed83df..9fa3130542 100644
--- a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/create_cassandra_user.sh.erb
+++ b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/create_cassandra_user.sh.erb
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
CASSANDRA_IP=<%= @cassandra_ip %>
CASSANDRA_PORT=<%= @cassandra_port %>
@@ -12,17 +12,17 @@ retry_num=1
is_up=0
while [ $is_up -eq 0 -a $retry_num -le 100 ]; do
- echo "exit" | cqlsh -u cassandra -p $CS_PASSWORD $CASSANDRA_IP $CASSANDRA_PORT > /dev/null 2>&1
+ echo "exit" | cqlsh -u cassandra -p $CS_PASSWORD $CASSANDRA_IP $CASSANDRA_PORT
res1=$?
if [ $res1 -eq 0 ]; then
- echo "`date` --- cqlsh is enabled to connect."
+ echo "`date` --- cqlsh is able to connect."
is_up=1
else
- echo "`date` --- cqlsh is NOT enabled to connect yet. sleep 5"
+ echo "`date` --- cqlsh is NOT able to connect yet. sleep 5"
sleep 5
fi
- let "retry_num++"
+ retry_num=$((retry_num+1))
done
cassandra_user_exist=`echo "list users;" | cqlsh -u cassandra -p $CS_PASSWORD $CASSANDRA_IP $CASSANDRA_PORT | grep -c $SDC_USER`
diff --git a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/create_dox_keyspace.sh.erb b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/create_dox_keyspace.sh.erb
index e9d10af10e..9b20c6f15c 100644
--- a/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/create_dox_keyspace.sh.erb
+++ b/asdctool/sdc-cassandra-init/chef-repo/cookbooks/cassandra-actions/templates/default/create_dox_keyspace.sh.erb
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
CASSANDRA_USER='<%= @cassandra_usr %>'
CASSANDRA_PASS='<%= @cassandra_pwd %>'