netvolt / LinuxRMM-Script

To help users that want to add Linux Agents to Tactical RMM, without need to pay upfront for code signed agents. Thanks to @ZoLuSs for the initial commit. If this solution works for you, consider contributing to Tactical RMM project!
MIT License
89 stars 39 forks source link

Unzip not found (installed tho) #4

Closed nopam-og closed 1 year ago

nopam-og commented 1 year ago

Hi! For some reason when running your script, I get the error unzip could not be found. Though I checked, it is installed, and in the $PATH variable. image

nopam-og commented 1 year ago

Here you can see, unzip works perfectly. image

Also when I remove the -v tag from the top of the script, it runs unzip, and shows me the output.

netvolt commented 1 year ago

Updated code for a new kind of check for unzip. Please check and advise. We checked in CentOS and Debian flavors.

nopam-og commented 1 year ago

Updated code for a new kind of check for unzip. Please check and advise. We checked in CentOS and Debian flavors.

Cool! Now I get a different output: image

nopam-og commented 1 year ago

Is there supposed to be a ZIP in the directory of the script?

netvolt commented 1 year ago

Is there supposed to be a ZIP in the directory of the script?

No, it just need to be installed as root. Are you running script as root? What is your flavor and version?

nopam-og commented 1 year ago

Is there supposed to be a ZIP in the directory of the script?

No, it just need to be installed as root. Are you running script as root? What is your flavor and version?

Okay, the script is in /root and I'm running it with the root user:. I'm currently on Debian 11.

netvolt commented 1 year ago

can you post the script call code just like you are running it? (replace important IDs with X's)

nopam-og commented 1 year ago

Owner

sudo sh ./rmmagent-linux.sh install amd64 "https://mesh.xxxxx.com/meshagents?id=xxxxxxxxxxxxxxxxxx&installflags=0&meshinstall=6" "https://api.xxxxx.com" 1 1 "XXXXXXXXXXXXXX" server

netvolt commented 1 year ago

Try this format of installation

sudo ./rmmagent-linux.sh install 'amd64' 'https://mesh.xxxxx.com/meshagents?id=xxxxxxxxxxxxxxxxxx&installflags=0&meshinstall=6' 'https://api.xxxxx.com' '1' '1' 'XXXXXXXXXXXXXX' 'server' Usually calling a bash script is not necessary to use "sh" before the "./script.sh", that might be the problem in your case.

nopam-og commented 1 year ago

Try this format of installation

sudo ./rmmagent-linux.sh install 'amd64' 'https://mesh.xxxxx.com/meshagents?id=xxxxxxxxxxxxxxxxxx&installflags=0&meshinstall=6' 'https://api.xxxxx.com' '1' '1' 'XXXXXXXXXXXXXX' 'server' Usually calling a bash script is not necessary to use "sh" before the "./script.sh", that might be the problem in your case.

Still getting errors: image

nopam-og commented 1 year ago

Fixed it by performing: chmod +x rmmagent-linux.sh Much appreciation for your support! <3