Skip to content

Commit

Permalink
Move new functions after service restart
Browse files Browse the repository at this point in the history
  • Loading branch information
tsarquis88 committed Dec 12, 2023
1 parent ac7d65c commit 1631708
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions debs/SPECS/wazuh-manager/debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -264,19 +264,6 @@ case "$1" in
fi
fi

if [ ! -z "$2" ]; then
if [ -f ${WAZUH_TMP_DIR}/wazuh.restart ] ; then
if command -v systemctl > /dev/null 2>&1 && systemctl > /dev/null 2>&1; then
systemctl daemon-reload > /dev/null 2>&1
systemctl restart wazuh-manager.service > /dev/null 2>&1
elif command -v service > /dev/null 2>&1 ; then
service wazuh-manager restart > /dev/null 2>&1
else
${DIR}/bin/wazuh-control restart > /dev/null 2>&1
fi
fi
fi

# Function that checks if the old (< v4.8) VD configuration is present.
is_old_vulndet_config_present()
{
Expand Down Expand Up @@ -327,6 +314,19 @@ case "$1" in
fi
echo "D"

if [ ! -z "$2" ]; then
if [ -f ${WAZUH_TMP_DIR}/wazuh.restart ] ; then
if command -v systemctl > /dev/null 2>&1 && systemctl > /dev/null 2>&1; then
systemctl daemon-reload > /dev/null 2>&1
systemctl restart wazuh-manager.service > /dev/null 2>&1
elif command -v service > /dev/null 2>&1 ; then
service wazuh-manager restart > /dev/null 2>&1
else
${DIR}/bin/wazuh-control restart > /dev/null 2>&1
fi
fi
fi

#Delete obsolete files
if [ -f /etc/ossec-init.conf ]; then
rm -f /etc/ossec-init.conf
Expand Down

0 comments on commit 1631708

Please sign in to comment.