Skip to content

Commit

Permalink
Modify WPK upgrade script to handle symbols directory (Only Linux) (#…
Browse files Browse the repository at this point in the history
…13015)

* Added the symbol folder backup command.

* Change name symbols folder to be hidden folder.
  • Loading branch information
HanesSciarrone committed Apr 4, 2022
1 parent 8cbb701 commit 6ca7063
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/init/pkg_installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ echo "$(date +"%Y/%m/%d %H:%M:%S") - Generating Backup." >> ./logs/upgrade.log
[ -d "./agentless" ] && FOLDERS_TO_BACKUP+=(${WAZUH_HOME}/agentless)
[ -d "./logs/ossec" ] && FOLDERS_TO_BACKUP+=(${WAZUH_HOME}/logs/ossec)
[ -d "./var/selinux" ] && FOLDERS_TO_BACKUP+=(${WAZUH_HOME}/var/selinux)
[ -d "./.symbols" ] && FOLDERS_TO_BACKUP+=(${WAZUH_HOME}/.symbols)

for dir in "${FOLDERS_TO_BACKUP[@]}"; do
mkdir -p "${TMP_DIR_BACKUP}${dir}"
Expand Down

0 comments on commit 6ca7063

Please sign in to comment.