From 1a8a90a82f464490cd8c30b9d51347c36325d5ac Mon Sep 17 00:00:00 2001 From: Rafael Date: Mon, 25 Apr 2022 20:22:42 +0200 Subject: [PATCH] fix os check for rhel8 --- extras/deploy-scripts/pandora_agent_deploy.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extras/deploy-scripts/pandora_agent_deploy.sh b/extras/deploy-scripts/pandora_agent_deploy.sh index 74db9d7c72..9be1edf00f 100644 --- a/extras/deploy-scripts/pandora_agent_deploy.sh +++ b/extras/deploy-scripts/pandora_agent_deploy.sh @@ -4,7 +4,7 @@ # define variables PANDORA_AGENT_CONF=/etc/pandora/pandora_agent.conf -S_VERSION='2021100601' +S_VERSION='2022042501' LOGFILE="/tmp/pandora-agent-deploy-$(date +%F).log" # Ansi color code variables @@ -83,6 +83,7 @@ execute_cmd "[ $PANDORA_SERVER_IP ]" 'Check Server IP Address' 'Please define e OS=$([[ $(grep '^ID_LIKE=' /etc/os-release) ]] && grep ^ID_LIKE= /etc/os-release | cut -d '=' -f2 | tr -d '"' || grep ^ID= /etc/os-release | cut -d '=' -f2 | tr -d '"') [[ $OS =~ 'rhel' ]] && OS_RELEASE=$OS +[[ $OS =~ 'fedora' ]] && OS_RELEASE=$OS [[ $OS =~ 'debian' ]] && OS_RELEASE=$OS #[[ $OS == 'rhel fedora' ]] && OS_RELEASE=$OS #[[ $OS == 'centos rhel fedora' ]] && OS_RELEASE=$OS @@ -113,7 +114,7 @@ execute_cmd "cd $HOME/pandora_deploy_tmp" "Moving to workspace: $HOME/pandora_d # Downloading and installing packages -if [[ $OS_RELEASE =~ 'rhel' ]]; then +if [[ $OS_RELEASE =~ 'rhel' ]] || [[ $OS_RELEASE =~ 'fedora' ]]; then yum install -y perl wget curl perl-Sys-Syslog unzip &>> $LOGFILE echo -e "${cyan}Instaling agent dependencies...${reset}" ${green}OK${reset}