amidaware / tacticalrmm

A remote monitoring & management tool, built with Django, Vue and Go.
https://docs.tacticalrmm.com
Other
2.92k stars 422 forks source link

Update agent_linux.sh #1796

Closed dinger1986 closed 3 months ago

dinger1986 commented 3 months ago

for usage like this ./install_script.sh --binpath /my/custom/path

to close this issue https://github.com/amidaware/tacticalrmm/issues/1508

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 79.20%. Comparing base (6586510) to head (566ce0d). Report is 7 commits behind head on develop.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #1796 +/- ## =========================================== - Coverage 79.31% 79.20% -0.12% =========================================== Files 138 138 Lines 9645 9661 +16 =========================================== + Hits 7650 7652 +2 - Misses 1995 2009 +14 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

wh1te909 commented 3 months ago

doesn't work, i tested like this ./agent.sh --binpath /opt/trmmtest and still installed to /usr/local/bin

dinger1986 commented 3 months ago

I'll check it and sort it

dinger1986 commented 3 months ago

sorted, hadnt copied up $2 for some reason sorry! for the line CUSTOM_BIN_PATH="", also moved that next to the others

image

wh1te909 commented 3 months ago

thanks now just uninstall doesn't cleanup properly, binary is still left behind.

dinger1986 commented 3 months ago

its actually not right anyway, what I have done is basically accept the second argument when running the script as the binpath and thats not right, let me look at it a bit more

dinger1986 commented 3 months ago

reordered alot of parts and added command to find bin location from service file, tested working on debian 11 and 12