Skip to content

Commit

Permalink
Rename vd.tar.xz to vd_1.0.0_vd_4.8.0.tar.xz
Browse files Browse the repository at this point in the history
  • Loading branch information
diegodfrf committed Dec 21, 2023
1 parent 47b4a2c commit 3cfce23
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions debs/SPECS/wazuh-manager/debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ case "$1" in
OSMYSHELL="/sbin/nologin"
SCRIPTS_DIR="${WAZUH_GLOBAL_TMP_DIR}/manager_installation_scripts"
SCA_BASE_DIR="${SCRIPTS_DIR}/sca"
VD_FILENAME='vd_1.0.0_vd_4.8.0.tar.xz'

if [ -d /run/systemd/system ]; then
rm -f /etc/init.d/wazuh-manager
Expand Down Expand Up @@ -71,11 +72,11 @@ case "$1" in
chown ${USER}:${GROUP} ${DIR}/queue/db/global.db*
fi

if [ -f "${DIR}/vd.tar.xz" ]; then
tar -xf ${DIR}/vd.tar.xz -C ${DIR}
if [ -f "${DIR}/${VD_FILENAME}" ]; then
tar -xf ${DIR}/${VD_FILENAME} -C ${DIR}
chown ${USER}:${GROUP} ${DIR}/queue/vd
chown ${USER}:${GROUP} ${DIR}/queue/vd-updater
rm -rf ${DIR}/vd.tar.xz
rm -rf ${DIR}/${VD_FILENAME}
fi

# Delete uncompatible DBs versions
Expand Down
7 changes: 4 additions & 3 deletions rpms/SPECS/wazuh-manager.spec
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,12 @@ if [ $1 = 2 ]; then
fi
fi

if [ -f "%{_localstatedir}/vd.tar.xz" ]; then
tar -xf %{_localstatedir}/vd.tar.xz -C %{_localstatedir}
VD_FILENAME='vd_1.0.0_vd_4.8.0.tar.xz'
if [ -f "%{_localstatedir}/${VD_FILENAME}" ]; then
tar -xf %{_localstatedir}/${VD_FILENAME} -C %{_localstatedir}
chown wazuh:wazuh %{_localstatedir}/queue/vd
chown wazuh:wazuh %{_localstatedir}/queue/vd-updater
rm -rf tar -xf %{_localstatedir}/vd.tar.xz
rm -rf tar -xf %{_localstatedir}/${VD_FILENAME}
fi

# Fresh install code block
Expand Down

0 comments on commit 3cfce23

Please sign in to comment.