OCSInventory-NG / UnixAgent

This is the OCS unified agent for Unix operating systems
http://www.ocsinventory-ng.org/en/
GNU General Public License v2.0
89 stars 84 forks source link

error sh bashscript.sh MacOS Agent #429

Open PeLbmaN opened 1 year ago

PeLbmaN commented 1 year ago

I tried to deploy the bash script on the mac, but when it downloads it, it gives an Err_execute error and immediately deletes the package. The script is 100% working, I tried various methods to upload the script and then run it, and just run it. What shall I do? Wed Feb 22 17:19:56 2023][debug] [download] Building of 1677058871... Success.

[Wed Feb 22 17:19:56 2023][debug] [download] Execute sh bashscript.sh ...

[Wed Feb 22 17:19:56 2023][debug] [download] Sending message for 1677058871, code=ERR_EXECUTE.

[Wed Feb 22 17:19:56 2023][info] [download] Cleaning 1677058871 package.

charleneauger commented 1 year ago

Hi @PeLbmaN ,

Can you tell me what your script does? Does it run install commands, update, etc..?

Best regards, Charlene

PeLbmaN commented 1 year ago

Hi, @charleneauger I tried a lot of options and came to the point that I deploy through max OS and a custom package, there I execute a command that downloads the script through curl and executes it and get SUCCESS. But I still can't get the script to run if I build it via Deploy > mac os > bash script

charleneauger commented 1 year ago

Hi @PeLbmaN ,

Thanks for all this information.

Can you try to create a custom package, select your bash script in the File field, select Execute a file in Action field and set the filename in Filename field ?

Next try to deploy on your mac.

Regards, Charlene

PeLbmaN commented 1 year ago

@charleneauger it give me success_n but but did nothing