File tree Expand file tree Collapse file tree 14 files changed +125
-14
lines changed Expand file tree Collapse file tree 14 files changed +125
-14
lines changed Original file line number Diff line number Diff line change 11
11
12
12
INIT_USERS=$( [ ! -z " $AUTH_ENABLED " ] && [ ! -z " $INFLUXDB_ADMIN_USER " ] && echo 1 || echo)
13
13
14
- 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
14
+ # Check if an environment variable for where to put meta is set.
15
+ # If so, then use that directory, otherwise use the default.
16
+ if [ -z " $INFLUXDB_META_DIR " ]; then
17
+ META_DIR=" /var/lib/influxdb/meta"
18
+ else
19
+ META_DIR=" $INFLUXDB_META_DIR "
20
+ fi
21
+
22
+ if ( [ ! -z " $INIT_USERS " ] || [ ! -z " $INFLUXDB_DB " ] || [ " $( ls -A /docker-entrypoint-initdb.d 2> /dev/null) " ] ) && [ ! " $( ls -d " $META_DIR " 2> /dev/null) " ]; then
15
23
16
24
INIT_QUERY=" "
17
25
CREATE_DB_QUERY=" CREATE DATABASE $INFLUXDB_DB "
Original file line number Diff line number Diff line change 11
11
12
12
INIT_USERS=$( [ ! -z " $AUTH_ENABLED " ] && [ ! -z " $INFLUXDB_ADMIN_USER " ] && echo 1 || echo)
13
13
14
- 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
14
+ # Check if an environment variable for where to put meta is set.
15
+ # If so, then use that directory, otherwise use the default.
16
+ if [ -z " $INFLUXDB_META_DIR " ]; then
17
+ META_DIR=" /var/lib/influxdb/meta"
18
+ else
19
+ META_DIR=" $INFLUXDB_META_DIR "
20
+ fi
21
+
22
+ if ( [ ! -z " $INIT_USERS " ] || [ ! -z " $INFLUXDB_DB " ] || [ " $( ls -A /docker-entrypoint-initdb.d 2> /dev/null) " ] ) && [ ! " $( ls -d " $META_DIR " 2> /dev/null) " ]; then
15
23
16
24
INIT_QUERY=" "
17
25
CREATE_DB_QUERY=" CREATE DATABASE $INFLUXDB_DB "
Original file line number Diff line number Diff line change 11
11
12
12
INIT_USERS=$( [ ! -z " $AUTH_ENABLED " ] && [ ! -z " $INFLUXDB_ADMIN_USER " ] && echo 1 || echo)
13
13
14
- 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
14
+ # Check if an environment variable for where to put meta is set.
15
+ # If so, then use that directory, otherwise use the default.
16
+ if [ -z " $INFLUXDB_META_DIR " ]; then
17
+ META_DIR=" /var/lib/influxdb/meta"
18
+ else
19
+ META_DIR=" $INFLUXDB_META_DIR "
20
+ fi
21
+
22
+ if ( [ ! -z " $INIT_USERS " ] || [ ! -z " $INFLUXDB_DB " ] || [ " $( ls -A /docker-entrypoint-initdb.d 2> /dev/null) " ] ) && [ ! " $( ls -d " $META_DIR " 2> /dev/null) " ]; then
15
23
16
24
INIT_QUERY=" "
17
25
CREATE_DB_QUERY=" CREATE DATABASE $INFLUXDB_DB "
Original file line number Diff line number Diff line change 11
11
12
12
INIT_USERS=$( [ ! -z " $AUTH_ENABLED " ] && [ ! -z " $INFLUXDB_ADMIN_USER " ] && echo 1 || echo)
13
13
14
- 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
14
+ # Check if an environment variable for where to put meta is set.
15
+ # If so, then use that directory, otherwise use the default.
16
+ if [ -z " $INFLUXDB_META_DIR " ]; then
17
+ META_DIR=" /var/lib/influxdb/meta"
18
+ else
19
+ META_DIR=" $INFLUXDB_META_DIR "
20
+ fi
15
21
22
+ if ( [ ! -z " $INIT_USERS " ] || [ ! -z " $INFLUXDB_DB " ] || [ " $( ls -A /docker-entrypoint-initdb.d 2> /dev/null) " ] ) && [ ! " $( ls -d " $META_DIR " 2> /dev/null) " ]; then
16
23
INIT_QUERY=" "
17
24
CREATE_DB_QUERY=" CREATE DATABASE $INFLUXDB_DB "
18
25
Original file line number Diff line number Diff line change 11
11
12
12
INIT_USERS=$( [ ! -z " $AUTH_ENABLED " ] && [ ! -z " $INFLUXDB_ADMIN_USER " ] && echo 1 || echo)
13
13
14
- 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
14
+ # Check if an environment variable for where to put meta is set.
15
+ # If so, then use that directory, otherwise use the default.
16
+ if [ -z " $INFLUXDB_META_DIR " ]; then
17
+ META_DIR=" /var/lib/influxdb/meta"
18
+ else
19
+ META_DIR=" $INFLUXDB_META_DIR "
20
+ fi
21
+
22
+ if ( [ ! -z " $INIT_USERS " ] || [ ! -z " $INFLUXDB_DB " ] || [ " $( ls -A /docker-entrypoint-initdb.d 2> /dev/null) " ] ) && [ ! " $( ls -d " $META_DIR " 2> /dev/null) " ]; then
15
23
16
24
INIT_QUERY=" "
17
25
CREATE_DB_QUERY=" CREATE DATABASE $INFLUXDB_DB "
Original file line number Diff line number Diff line change 11
11
12
12
INIT_USERS=$( [ ! -z " $AUTH_ENABLED " ] && [ ! -z " $INFLUXDB_ADMIN_USER " ] && echo 1 || echo)
13
13
14
- 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
14
+ # Check if an environment variable for where to put meta is set.
15
+ # If so, then use that directory, otherwise use the default.
16
+ if [ -z " $INFLUXDB_META_DIR " ]; then
17
+ META_DIR=" /var/lib/influxdb/meta"
18
+ else
19
+ META_DIR=" $INFLUXDB_META_DIR "
20
+ fi
21
+
22
+ if ( [ ! -z " $INIT_USERS " ] || [ ! -z " $INFLUXDB_DB " ] || [ " $( ls -A /docker-entrypoint-initdb.d 2> /dev/null) " ] ) && [ ! " $( ls -d " $META_DIR " 2> /dev/null) " ]; then
15
23
16
24
INIT_QUERY=" "
17
25
CREATE_DB_QUERY=" CREATE DATABASE $INFLUXDB_DB "
Original file line number Diff line number Diff line change 11
11
12
12
INIT_USERS=$( [ ! -z " $AUTH_ENABLED " ] && [ ! -z " $INFLUXDB_ADMIN_USER " ] && echo 1 || echo)
13
13
14
- 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
14
+ # Check if an environment variable for where to put meta is set.
15
+ # If so, then use that directory, otherwise use the default.
16
+ if [ -z " $INFLUXDB_META_DIR " ]; then
17
+ META_DIR=" /var/lib/influxdb/meta"
18
+ else
19
+ META_DIR=" $INFLUXDB_META_DIR "
20
+ fi
21
+
22
+ if ( [ ! -z " $INIT_USERS " ] || [ ! -z " $INFLUXDB_DB " ] || [ " $( ls -A /docker-entrypoint-initdb.d 2> /dev/null) " ] ) && [ ! " $( ls -d " $META_DIR " 2> /dev/null) " ]; then
15
23
16
24
INIT_QUERY=" "
17
25
CREATE_DB_QUERY=" CREATE DATABASE $INFLUXDB_DB "
Original file line number Diff line number Diff line change 11
11
12
12
INIT_USERS=$( [ ! -z " $AUTH_ENABLED " ] && [ ! -z " $INFLUXDB_ADMIN_USER " ] && echo 1 || echo)
13
13
14
- 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
14
+ # Check if an environment variable for where to put meta is set.
15
+ # If so, then use that directory, otherwise use the default.
16
+ if [ -z " $INFLUXDB_META_DIR " ]; then
17
+ META_DIR=" /var/lib/influxdb/meta"
18
+ else
19
+ META_DIR=" $INFLUXDB_META_DIR "
20
+ fi
21
+
22
+ if ( [ ! -z " $INIT_USERS " ] || [ ! -z " $INFLUXDB_DB " ] || [ " $( ls -A /docker-entrypoint-initdb.d 2> /dev/null) " ] ) && [ ! " $( ls -d " $META_DIR " 2> /dev/null) " ]; then
15
23
16
24
INIT_QUERY=" "
17
25
CREATE_DB_QUERY=" CREATE DATABASE $INFLUXDB_DB "
Original file line number Diff line number Diff line change 11
11
12
12
INIT_USERS=$( [ ! -z " $AUTH_ENABLED " ] && [ ! -z " $INFLUXDB_ADMIN_USER " ] && echo 1 || echo)
13
13
14
- 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
14
+ # Check if an environment variable for where to put meta is set.
15
+ # If so, then use that directory, otherwise use the default.
16
+ if [ -z " $INFLUXDB_META_DIR " ]; then
17
+ META_DIR=" /var/lib/influxdb/meta"
18
+ else
19
+ META_DIR=" $INFLUXDB_META_DIR "
20
+ fi
21
+
22
+ if ( [ ! -z " $INIT_USERS " ] || [ ! -z " $INFLUXDB_DB " ] || [ " $( ls -A /docker-entrypoint-initdb.d 2> /dev/null) " ] ) && [ ! " $( ls -d " $META_DIR " 2> /dev/null) " ]; then
15
23
16
24
INIT_QUERY=" "
17
25
CREATE_DB_QUERY=" CREATE DATABASE $INFLUXDB_DB "
Original file line number Diff line number Diff line change 11
11
12
12
INIT_USERS=$( [ ! -z " $AUTH_ENABLED " ] && [ ! -z " $INFLUXDB_ADMIN_USER " ] && echo 1 || echo)
13
13
14
- 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
14
+ # Check if an environment variable for where to put meta is set.
15
+ # If so, then use that directory, otherwise use the default.
16
+ if [ -z " $INFLUXDB_META_DIR " ]; then
17
+ META_DIR=" /var/lib/influxdb/meta"
18
+ else
19
+ META_DIR=" $INFLUXDB_META_DIR "
20
+ fi
21
+
22
+ if ( [ ! -z " $INIT_USERS " ] || [ ! -z " $INFLUXDB_DB " ] || [ " $( ls -A /docker-entrypoint-initdb.d 2> /dev/null) " ] ) && [ ! " $( ls -d " $META_DIR " 2> /dev/null) " ]; then
15
23
16
24
INIT_QUERY=" "
17
25
CREATE_DB_QUERY=" CREATE DATABASE $INFLUXDB_DB "
You can’t perform that action at this time.
0 commit comments