Skip to content

Commit

Permalink
fix: fixed install script
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane-segning committed Sep 16, 2024
1 parent ba323e8 commit 3751bae
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/setup-agent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,31 @@ WAZUH_AGENT_VERSION=${WAZUH_AGENT_VERSION:-'4.8.2-1'}
WAZUH_AGENT_NAME=${WAZUH_AGENT_NAME:-}

# Step 0: Ensure Curl and JQ are installed
if ! (curl -SL --progress-bar https://raw.githubusercontent.com/ADORSYS-GIS/wazuh-agent/main/scripts/deps.sh | sh) >/dev/null 2>&1; then
if ! (curl -SL --progress-bar https://raw.githubusercontent.com/ADORSYS-GIS/wazuh-agent/main/scripts/deps.sh | sudo sh) >/dev/null 2>&1; then
echo "Failed to ensure deps"
exit 1
fi

# Step 1: Download and install Wazuh agent
if ! (curl -SL --progress-bar https://raw.githubusercontent.com/ADORSYS-GIS/wazuh-agent/main/scripts/install.sh | LOG_LEVEL=$LOG_LEVEL OSSEC_CONF_PATH=$OSSEC_CONF_PATH WAZUH_MANAGER=$WAZUH_MANAGER sh) >/dev/null 2>&1; then
if ! (curl -SL --progress-bar https://raw.githubusercontent.com/ADORSYS-GIS/wazuh-agent/main/scripts/install.sh | LOG_LEVEL=$LOG_LEVEL OSSEC_CONF_PATH=$OSSEC_CONF_PATH WAZUH_MANAGER=$WAZUH_MANAGER sudo sh) >/dev/null 2>&1; then
echo "Failed to install wazuh-agent"
exit 1
fi

# Step 2: Download and install wazuh-cert-oauth2-client
if ! (curl -SL --progress-bar https://raw.githubusercontent.com/ADORSYS-GIS/wazuh-cert-oauth2/main/scripts/install.sh | LOG_LEVEL=$LOG_LEVEL OSSEC_CONF_PATH=$OSSEC_CONF_PATH APP_NAME=$APP_NAME WOPS_VERSION=$WOPS_VERSION sh) >/dev/null 2>&1; then
if ! (curl -SL --progress-bar https://raw.githubusercontent.com/ADORSYS-GIS/wazuh-cert-oauth2/main/scripts/install.sh | LOG_LEVEL=$LOG_LEVEL OSSEC_CONF_PATH=$OSSEC_CONF_PATH APP_NAME=$APP_NAME WOPS_VERSION=$WOPS_VERSION sudo sh) >/dev/null 2>&1; then
echo "Failed to install 'wazuh-cert-oauth2-client'"
exit 1
fi

# Step 3: Download and install yara
if ! (curl -SL --progress-bar https://raw.githubusercontent.com/ADORSYS-GIS/wazuh-yara/main/scripts/install.sh | sh) >/dev/null 2>&1; then
if ! (curl -SL --progress-bar https://raw.githubusercontent.com/ADORSYS-GIS/wazuh-yara/main/scripts/install.sh | sudo sh) >/dev/null 2>&1; then
echo "Failed to install 'yara'"
exit 1
fi

# Step 4: Download and install snort
if ! (curl -SL --progress-bar https://raw.githubusercontent.com/ADORSYS-GIS/wazuh-snort/main/scripts/install.sh | sh) >/dev/null 2>&1; then
if ! (curl -SL --progress-bar https://raw.githubusercontent.com/ADORSYS-GIS/wazuh-snort/main/scripts/install.sh | sudo sh) >/dev/null 2>&1; then
echo "Failed to install 'snort'"
exit 1
fi

0 comments on commit 3751bae

Please sign in to comment.