amidaware / rmmagent

Tactical RMM Agent
https://github.com/amidaware/tacticalrmm
Other
132 stars 76 forks source link

"Send Command" shell whitespace fix #40

Closed SoarinFerret closed 11 months ago

SoarinFerret commented 1 year ago

If you try to use /usr/bin/env bash as the custom shell in Send Command, no output is returned. This is because gocmd wants the first parameter to be the executable, with everything else being arguments afterwards.

This simple 2 line patch fixes aforementioned issue. This is useful on systems like NixOS, where bash is not in an easily identifiable location, so you have to use the above syntax.

I do not know if this code would be useful in the other cases in the if statement - if so, I could update the patch to include those.

Thanks in advance!

SoarinFerret commented 1 year ago

Not sure what branch to merge this too - I can rebase off devel if need be, or I can alter the PR to merge against master.

wh1te909 commented 1 year ago

thanks please rebase off develop. It looks good but I still need to do full regression testing to make sure it won't break existing functionality of scripts in production. I have already frozen all code for an upcoming release, so I will try to get it into the release after next.

SoarinFerret commented 1 year ago

This has been rebased on develop - let me know if you need anything else!

wh1te909 commented 11 months ago

works great, thanks!