File tree Expand file tree Collapse file tree 7 files changed +49
-14
lines changed Expand file tree Collapse file tree 7 files changed +49
-14
lines changed Original file line number Diff line number Diff line change 10
10
# Drop root privileges if we are running elasticsearch
11
11
# allow the container to be started with `--user`
12
12
if [ " $1 " = ' elasticsearch' -a " $( id -u) " = ' 0' ]; then
13
- # Change the ownership of /usr/share/elasticsearch/data to elasticsearch
14
- chown -R elasticsearch:elasticsearch /usr/share/elasticsearch/data
13
+ # Change the ownership of user-mutable directories to elasticsearch
14
+ for path in \
15
+ /usr/share/elasticsearch/data \
16
+ /usr/share/elasticsearch/logs \
17
+ ; do
18
+ chown -R elasticsearch:elasticsearch " $path "
19
+ done
15
20
16
21
set -- su-exec elasticsearch " $@ "
17
22
# exec su-exec elasticsearch "$BASH_SOURCE" "$@"
Original file line number Diff line number Diff line change 10
10
# Drop root privileges if we are running elasticsearch
11
11
# allow the container to be started with `--user`
12
12
if [ " $1 " = ' elasticsearch' -a " $( id -u) " = ' 0' ]; then
13
- # Change the ownership of /usr/share/elasticsearch/data to elasticsearch
14
- chown -R elasticsearch:elasticsearch /usr/share/elasticsearch/data
13
+ # Change the ownership of user-mutable directories to elasticsearch
14
+ for path in \
15
+ /usr/share/elasticsearch/data \
16
+ /usr/share/elasticsearch/logs \
17
+ ; do
18
+ chown -R elasticsearch:elasticsearch " $path "
19
+ done
15
20
16
21
set -- gosu elasticsearch " $@ "
17
22
# exec gosu elasticsearch "$BASH_SOURCE" "$@"
Original file line number Diff line number Diff line change 10
10
# Drop root privileges if we are running elasticsearch
11
11
# allow the container to be started with `--user`
12
12
if [ " $1 " = ' elasticsearch' -a " $( id -u) " = ' 0' ]; then
13
- # Change the ownership of /usr/share/elasticsearch/data to elasticsearch
14
- chown -R elasticsearch:elasticsearch /usr/share/elasticsearch/data
13
+ # Change the ownership of user-mutable directories to elasticsearch
14
+ for path in \
15
+ /usr/share/elasticsearch/data \
16
+ /usr/share/elasticsearch/logs \
17
+ ; do
18
+ chown -R elasticsearch:elasticsearch " $path "
19
+ done
15
20
16
21
set -- su-exec elasticsearch " $@ "
17
22
# exec su-exec elasticsearch "$BASH_SOURCE" "$@"
Original file line number Diff line number Diff line change 10
10
# Drop root privileges if we are running elasticsearch
11
11
# allow the container to be started with `--user`
12
12
if [ " $1 " = ' elasticsearch' -a " $( id -u) " = ' 0' ]; then
13
- # Change the ownership of /usr/share/elasticsearch/data to elasticsearch
14
- chown -R elasticsearch:elasticsearch /usr/share/elasticsearch/data
13
+ # Change the ownership of user-mutable directories to elasticsearch
14
+ for path in \
15
+ /usr/share/elasticsearch/data \
16
+ /usr/share/elasticsearch/logs \
17
+ ; do
18
+ chown -R elasticsearch:elasticsearch " $path "
19
+ done
15
20
16
21
set -- gosu elasticsearch " $@ "
17
22
# exec gosu elasticsearch "$BASH_SOURCE" "$@"
Original file line number Diff line number Diff line change 10
10
# Drop root privileges if we are running elasticsearch
11
11
# allow the container to be started with `--user`
12
12
if [ " $1 " = ' elasticsearch' -a " $( id -u) " = ' 0' ]; then
13
- # Change the ownership of /usr/share/elasticsearch/data to elasticsearch
14
- chown -R elasticsearch:elasticsearch /usr/share/elasticsearch/data
13
+ # Change the ownership of user-mutable directories to elasticsearch
14
+ for path in \
15
+ /usr/share/elasticsearch/data \
16
+ /usr/share/elasticsearch/logs \
17
+ ; do
18
+ chown -R elasticsearch:elasticsearch " $path "
19
+ done
15
20
16
21
set -- su-exec elasticsearch " $@ "
17
22
# exec su-exec elasticsearch "$BASH_SOURCE" "$@"
Original file line number Diff line number Diff line change 10
10
# Drop root privileges if we are running elasticsearch
11
11
# allow the container to be started with `--user`
12
12
if [ " $1 " = ' elasticsearch' -a " $( id -u) " = ' 0' ]; then
13
- # Change the ownership of /usr/share/elasticsearch/data to elasticsearch
14
- chown -R elasticsearch:elasticsearch /usr/share/elasticsearch/data
13
+ # Change the ownership of user-mutable directories to elasticsearch
14
+ for path in \
15
+ /usr/share/elasticsearch/data \
16
+ /usr/share/elasticsearch/logs \
17
+ ; do
18
+ chown -R elasticsearch:elasticsearch " $path "
19
+ done
15
20
16
21
set -- gosu elasticsearch " $@ "
17
22
# exec gosu elasticsearch "$BASH_SOURCE" "$@"
Original file line number Diff line number Diff line change 10
10
# Drop root privileges if we are running elasticsearch
11
11
# allow the container to be started with `--user`
12
12
if [ " $1 " = ' elasticsearch' -a " $( id -u) " = ' 0' ]; then
13
- # Change the ownership of /usr/share/elasticsearch/data to elasticsearch
14
- chown -R elasticsearch:elasticsearch /usr/share/elasticsearch/data
13
+ # Change the ownership of user-mutable directories to elasticsearch
14
+ for path in \
15
+ /usr/share/elasticsearch/data \
16
+ /usr/share/elasticsearch/logs \
17
+ ; do
18
+ chown -R elasticsearch:elasticsearch " $path "
19
+ done
15
20
16
21
set -- gosu elasticsearch " $@ "
17
22
# exec gosu elasticsearch "$BASH_SOURCE" "$@"
You can’t perform that action at this time.
0 commit comments