mainsail-crew / crowsnest

Webcam Service for multiple Cams
GNU General Public License v3.0
302 stars 71 forks source link

fix: handle users whose path is not defined or not under /home #251

Closed alryaz closed 3 months ago

alryaz commented 3 months ago

This PR addresses the issue I personally encountered when a user whose home directory is located at /opt is not able to install crowsnest successfully.

After brief investigation, it appeared that the subsystems assume that every home directory is prefixed with /home.

I have added a new variable (BASE_HOME, akin to BASE_USER) which contains target user home directory. In cases when it's not defined, the script fails.

mryel00 commented 3 months ago

For this PR to get approven, you need to work around the CustomPiOS stuff. Those shouldn't change as the module is something you add manually. Furthermore the ${BASE_USER} variable in the CustomPiOS module is something provided by CustomPiOS. ${BASE_HOME} is not provided by it afaik.

If you can provide a satisfying solution, we can consider a merge.

mryel00 commented 3 months ago

After looking at the code changes again, the whole thing should be solved with two extra commands from your side:

Please try those two commands before working further on that code to see if those two will fix your problems. The only thing not fixed by that would be the detection of mjpg-streamer, but you won't have that installed, if you are doing such a setup.

mryel00 commented 3 months ago

As there was no further interaction for 3 months now, I will close this PR.