File tree Expand file tree Collapse file tree 2 files changed +9
-18
lines changed
distribution/packages/src/common/scripts Expand file tree Collapse file tree 2 files changed +9
-18
lines changed Original file line number Diff line number Diff line change @@ -95,19 +95,15 @@ chown -R root:elasticsearch /etc/elasticsearch
9595chmod g+s /etc/elasticsearch
9696chmod 0750 /etc/elasticsearch
9797
98- if [ -f /etc/default/elasticsearch ]; then
99- chown root:elasticsearch /etc/default/elasticsearch
98+ if [ -f ${path.env} ]; then
99+ chown root:elasticsearch ${path.env}
100100fi
101101
102- if [ -f /etc/sysconfig/elasticsearch ]; then
103- chown root:elasticsearch /etc/sysconfig/elasticsearch
104- fi
105-
106- if [ ! -f "$ES_PATH_CONF"/elasticsearch.keystore ]; then
102+ if [ ! -f /etc/elasticsearch/elasticsearch.keystore ]; then
107103 /usr/share/elasticsearch/bin/elasticsearch-keystore create
108- chown root:elasticsearch "$ES_PATH_CONF" /elasticsearch.keystore
109- chmod 660 "$ES_PATH_CONF" /elasticsearch.keystore
110- md5sum "$ES_PATH_CONF"/ elasticsearch.keystore > "$ES_PATH_CONF" /.elasticsearch.keystore.initial_md5sum
104+ chown root:elasticsearch /etc/elasticsearch /elasticsearch.keystore
105+ chmod 660 /etc/elasticsearch /elasticsearch.keystore
106+ md5sum /etc/ elasticsearch/elasticsearch .keystore > /etc/elasticsearch /.elasticsearch.keystore.initial_md5sum
111107fi
112108
113109${scripts.footer}
Original file line number Diff line number Diff line change @@ -42,11 +42,6 @@ case "$1" in
4242 ;;
4343esac
4444
45- ES_ENV_FILE="${path.env}"
46- if [ -f "$ES_ENV_FILE" ]; then
47- . "$ES_ENV_FILE"
48- fi
49-
5045# Stops the service
5146if [ "$STOP_REQUIRED" = "true" ]; then
5247 echo -n "Stopping elasticsearch service..."
@@ -70,9 +65,9 @@ if [ "$STOP_REQUIRED" = "true" ]; then
7065 echo " OK"
7166fi
7267
73- if [ -f "$ES_PATH_CONF" /elasticsearch.keystore ]; then
74- if md5sum --status -c "$ES_PATH_CONF" /.elasticsearch.keystore.initial_md5sum; then
75- rm "$ES_PATH_CONF"/ elasticsearch.keystore "$ES_PATH_CONF" /.elasticsearch.keystore.initial_md5sum
68+ if [ -f /etc/elasticsearch /elasticsearch.keystore ]; then
69+ if md5sum --status -c /etc/elasticsearch /.elasticsearch.keystore.initial_md5sum; then
70+ rm /etc/ elasticsearch/elasticsearch .keystore /etc/elasticsearch /.elasticsearch.keystore.initial_md5sum
7671 fi
7772fi
7873
You can’t perform that action at this time.
0 commit comments