From db81f467fd474ffe8adbf8c09f8a72220eb527f8 Mon Sep 17 00:00:00 2001 From: Dylane Bengono Date: Thu, 19 Sep 2024 13:58:59 +0100 Subject: [PATCH] fix: Update install script to create a temporary directory The install script has been updated to create a temporary directory using the "mktemp -d" command. This ensures that the directory is created correctly and avoids any potential issues with file operations. Additionally, a success message is now displayed after the Wazuh agent installation is completed. --- scripts/install.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 6d12607..b5cb10d 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -117,7 +117,7 @@ installation() { BASE_URL="https://packages.wazuh.com/4.x/macos" PKG_NAME="wazuh-agent-4.9.0-1.${ARCH}64.pkg" PKG_URL="$BASE_URL/$PKG_NAME" - TMP_DIR="$(mktemp)" + TMP_DIR="$(mktemp -d)" mkdir -p "$TMP_DIR" if [ ! -f "$TMP_DIR/$PKG_NAME" ]; then curl -o "$TMP_DIR/$PKG_NAME" "$PKG_URL" @@ -174,10 +174,11 @@ start_agent() { info_message "Wazuh agent started successfully." } - +# Main execution import_keys installation -# disable_repo disable_repo config -start_agent \ No newline at end of file +start_agent +info_message "Wazuh agent installation completed successfully." +# End of script \ No newline at end of file