Action command not working for shell script

Hi All,

I would like to deploy shell script using BIGFIX fixlet action command like below

wait “./var/opt/BESClient/__BESData/actionsite/__Download/install_ncpa_rhel.sh” value1 value2

but after ran the fixlet i can see exit code “0” and command status as completed, but the command not executed in endpoints

Endpoint - RHEL 6 and 7,
sh file purpose - Nagios agent installation,

(I have tried below action format also but not working,

1.wait /bin/sh -c sh ./install_ncpa_rhel.sh value1 value2,
2. wait sudo - root -c “/var/opt/BESClient/__BESData/actionsite/__Download/install_ncpa_rhel.sh” value1 value2,
3. waithidden /var/opt/BESClient/__BESData/actionsite/__Download/install_ncpa_rhel.sh value1 value2 )

is there any other way to run the .sh file ?

Thanks,
Nagarajan,

Putting full paths can cause a problem but there are two issues I can see

  1. a downloaded file doesn’t have the execute bit turned on and not all systems CAN have the execute bit turned on in the /var system
  2. using the path may be wrong depending on where the fixlet source is as the download might be not where you think

The best would be to do the following presuming the shell script is downloaded and not constructed by the action

wait /bin/sh __Download/install_ncpa_rhel.sh value1 value2

Hi @AlanM Thanks for your updates,

we used like below

wait chmod 777 /var/opt/BESClient/__BESData/actionsite/__Download/install_ncpa_rhel.sh
wait /bin/sh -c "(cd /var/opt/BESClient/__BESData/actionsite/__Download && ./install_ncpa_rhel.sh value1 value2,

it is working in my infra,

Thanks,
Nagarajan,