Merge pull request #18503 from dakrone/remove-mkdir
Don't mkdir directly in deb init script
This commit is contained in:
commit
ca033b42a9
|
@ -116,15 +116,6 @@ case "$1" in
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Prepare environment
|
|
||||||
# Check $DATA_DIR for a comma
|
|
||||||
if [ "${DATA_DIR#*,}" != "$DATA_DIR" ]; then
|
|
||||||
# $DATA_DIR contains a comma, so we should not mkdir it
|
|
||||||
mkdir -p "$LOG_DIR" && chown "$ES_USER":"$ES_GROUP" "$LOG_DIR"
|
|
||||||
else
|
|
||||||
mkdir -p "$LOG_DIR" "$DATA_DIR" && chown "$ES_USER":"$ES_GROUP" "$LOG_DIR" "$DATA_DIR"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Ensure that the PID_DIR exists (it is cleaned at OS startup time)
|
# Ensure that the PID_DIR exists (it is cleaned at OS startup time)
|
||||||
if [ -n "$PID_DIR" ] && [ ! -e "$PID_DIR" ]; then
|
if [ -n "$PID_DIR" ] && [ ! -e "$PID_DIR" ]; then
|
||||||
mkdir -p "$PID_DIR" && chown "$ES_USER":"$ES_GROUP" "$PID_DIR"
|
mkdir -p "$PID_DIR" && chown "$ES_USER":"$ES_GROUP" "$PID_DIR"
|
||||||
|
|
Loading…
Reference in New Issue