File tree 2 files changed +9
-18
lines changed
distribution/packages/src/common/scripts
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
95
95
chmod g+s /etc/elasticsearch
96
96
chmod 0750 /etc/elasticsearch
97
97
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}
100
100
fi
101
101
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
107
103
/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
111
107
fi
112
108
113
109
${scripts.footer}
Original file line number Diff line number Diff line change @@ -42,11 +42,6 @@ case "$1" in
42
42
;;
43
43
esac
44
44
45
- ES_ENV_FILE="${path.env}"
46
- if [ -f "$ES_ENV_FILE" ]; then
47
- . "$ES_ENV_FILE"
48
- fi
49
-
50
45
# Stops the service
51
46
if [ "$STOP_REQUIRED" = "true" ]; then
52
47
echo -n "Stopping elasticsearch service..."
@@ -70,9 +65,9 @@ if [ "$STOP_REQUIRED" = "true" ]; then
70
65
echo " OK"
71
66
fi
72
67
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
76
71
fi
77
72
fi
78
73
You can’t perform that action at this time.
0 commit comments