Skip to content

Commit

Permalink
Update data directory owner to elasticsearch (#68)
Browse files Browse the repository at this point in the history
Co-authored-by: pritamdas99 <[email protected]>
  • Loading branch information
raihankhan and pritamdas99 committed Dec 1, 2023
1 parent ce03ca4 commit 316c0ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
9 changes: 4 additions & 5 deletions scripts/config-merger.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ NODE_ROLES=${NODE_ROLES:-""}
# Make a list of roles
IFS=',' read -ra ROLES <<<"$NODE_ROLES"

echo "changing the ownership of data folder: /usr/share/elasticsearch/data"
chown -R "$ELASTICSEARCH_UID":"$ELASTICSEARCH_UID" /usr/share/elasticsearch/data
if [[ "$(id -u)" == "0" ]]; then
echo "changing the ownership of data folder: /usr/share/elasticsearch/data"
chown -R "$ELASTICSEARCH_UID":"$ELASTICSEARCH_UID" /usr/share/elasticsearch/data
fi

# load default config files to config directory
cp -f -R $DEFAULT_CONFIG_DIR/* $CONFIG_DIR
Expand Down Expand Up @@ -101,9 +103,6 @@ for FILE_DIR in "$CONFIG_DIR"/*; do
fi
done
fi

# restore original file permission
chmod "$ORIGINAL_PERMISSION" "$FILE_DIR"
done

##----------------------------------------Elasticsearch Keystore------------------------------------
Expand Down
3 changes: 0 additions & 3 deletions scripts/dashboard-config-merger.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,5 @@ for FILE_DIR in "$CONFIG_DIR"/*; do
fi

fi

# restore original file permission
chmod "$ORIGINAL_PERMISSION" "$FILE_DIR"
done

0 comments on commit 316c0ff

Please sign in to comment.