Skip to content

Commit

Permalink
Update init-influxdb.sh
Browse files Browse the repository at this point in the history
Loop when try to create the database with parameters :

Example :
{code}
+ for i in '{30..0}'
+ influx -host 127.0.0.1 -port 8086 -execute 'CREATE DATABASE database'
+ echo 'influxdb init process in progress...'
influxdb init process in progress...
+ sleep 1
+ for i in '{30..0}'
+ influx -host 127.0.0.1 -port 8086 -execute 'CREATE DATABASE database'
influxdb init process in progress...
+ echo 'influxdb init process in progress...'
+ sleep 1
{code}
  • Loading branch information
osmufe authored Mar 13, 2018
1 parent 57a5ac9 commit 1321f0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion influxdb/1.5/alpine/init-influxdb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ INIT_USERS=$([ ! -z "$AUTH_ENABLED" ] && [ ! -z "$INFLUXDB_ADMIN_USER" ] && echo
if ( [ ! -z "$INIT_USERS" ] || [ ! -z "$INFLUXDB_DB" ] || [ "$(ls -A /docker-entrypoint-initdb.d 2> /dev/null)" ] ) && [ ! "$(ls -d /var/lib/influxdb/meta 2>/dev/null)" ]; then

INIT_QUERY=""
CREATE_DB_QUERY="CREATE DATABASE $INFLUXDB_DB"
CREATE_DB_QUERY="CREATE DATABASE \"$INFLUXDB_DB\""

if [ ! -z "$INIT_USERS" ]; then

Expand Down

1 comment on commit 1321f0d

@zaaraameera2014
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tq

Please sign in to comment.