Skip to content

Commit

Permalink
Add debug lines to post inst for debian
Browse files Browse the repository at this point in the history
  • Loading branch information
QU3B1M committed Dec 23, 2024
1 parent 07a81e0 commit 5cf8c11
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion distribution/packages/src/common/scripts/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ case "$1" in

# Debian ####################################################
configure)

echo "Configuring wazuh-indexer"
# If $1=configure and $2 is set, this is an upgrade
if [ -n $2 ]; then
IS_UPGRADE=true
Expand Down Expand Up @@ -58,6 +58,7 @@ if command -v systemctl > /dev/null; then
fi

if [ "x$IS_UPGRADE" != "xtrue" ]; then
echo -n "Daemon reloading..."
if command -v systemctl >/dev/null; then
echo "### NOT starting on installation, please execute the following statements to configure wazuh-indexer service to start automatically using systemd"
echo " sudo systemctl daemon-reload"
Expand Down Expand Up @@ -104,6 +105,7 @@ fi

# the equivalent code for rpm is in posttrans
if [ "$PACKAGE" = "deb" ]; then
echo "Setting up wazuh-indexer keystore"
if [ ! -f "${OPENSEARCH_PATH_CONF}"/opensearch.keystore ]; then
/usr/share/wazuh-indexer/bin/opensearch-keystore create
chown wazuh-indexer:wazuh-indexer "${OPENSEARCH_PATH_CONF}"/opensearch.keystore
Expand All @@ -119,4 +121,6 @@ if [ "$PACKAGE" = "deb" ]; then
fi
fi

echo "POST INSTALL DONE"
echo "Footer: ${scripts.footer}"
${scripts.footer}

0 comments on commit 5cf8c11

Please sign in to comment.