diff --git a/cert_tool/certFunctions.sh b/cert_tool/certFunctions.sh index 580d157..d6f76b0 100644 --- a/cert_tool/certFunctions.sh +++ b/cert_tool/certFunctions.sh @@ -368,7 +368,7 @@ function cert_readConfig() { for ip in "${all_ips[@]}"; do isIP=$(echo "${ip}" | grep -P "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$") - isDNS=$(echo "${ip}" | grep -P "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])\.([A-Za-z]{2,})$" ) + isDNS=$(echo "${ip}" | grep -P "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])\.([A-Za-z]{2,})$" ) if [[ -n "${isIP}" ]]; then if ! cert_checkPrivateIp "$ip"; then common_logger -e "The IP ${ip} is public." diff --git a/cert_tool/certMain.sh b/cert_tool/certMain.sh index c851eaf..fbb746c 100644 --- a/cert_tool/certMain.sh +++ b/cert_tool/certMain.sh @@ -193,8 +193,7 @@ function main() { common_logger "Wazuh dashboard certificates created." fi cert_cleanFiles - cert_setpermisions - eval "mv ${cert_tmp_path} ${base_path}/wazuh-certificates ${debug}" + cert_setDirectory fi if [[ -n "${ca}" ]]; then diff --git a/install_functions/installCommon.sh b/install_functions/installCommon.sh index 93e5005..dc4ad43 100644 --- a/install_functions/installCommon.sh +++ b/install_functions/installCommon.sh @@ -858,6 +858,7 @@ function installCommon_removeAssistantDependencies(){ fi } + function installCommon_yumInstall() { package="${1}" diff --git a/passwords_tool/passwordsFunctions.sh b/passwords_tool/passwordsFunctions.sh index 52e5ecd..78195f6 100644 --- a/passwords_tool/passwordsFunctions.sh +++ b/passwords_tool/passwordsFunctions.sh @@ -464,7 +464,7 @@ For Wazuh API users, the file must have this format: fi done - if [ -n "${adminUser}" ] && [ -n "${adminPassword}" ]; then + if { [ -n "${adminUser}" ] && [ -n "${adminPassword}" ]; } || { [ -z "${wazuh_installed}" ] && [ -n "${dashboard_installed}" ]; } then for j in "${!fileapiusers[@]}"; do supported=false for i in "${!api_users[@]}"; do