With newer versions of the Raspberry Pi OS you can't count on the default pi user being the path for the home folder anymore. This PR attempts to modify the install procedure and the install script to insert the current user name in places where a full path is needed. For the install.sh script this is pretty simple. I just replaced any hardcoded paths from /home/pi to /home/$USER.
The one piece that was a little tricky was the slowmovie.service file. This needed to be updated on the fly rather than a static file with hardcoded paths. I utilized the envsubst shell function to generate the service file from a template and then move that file to the correct location.
Limitations
This is a 1:1 replacement for the current install procedure. It doesn't try and account for more dynamic path options like someone having a completely different path for the SlowMovie install other than as a subdirectory in the user's home folder (/home/$USER/SlowMovie). That could probably be added based on these modifications but that wasn't the intent here.
With newer versions of the Raspberry Pi OS you can't count on the default
pi
user being the path for the home folder anymore. This PR attempts to modify the install procedure and the install script to insert the current user name in places where a full path is needed. For theinstall.sh
script this is pretty simple. I just replaced any hardcoded paths from/home/pi
to/home/$USER
.The one piece that was a little tricky was the
slowmovie.service
file. This needed to be updated on the fly rather than a static file with hardcoded paths. I utilized the envsubst shell function to generate the service file from a template and then move that file to the correct location.Limitations
This is a 1:1 replacement for the current install procedure. It doesn't try and account for more dynamic path options like someone having a completely different path for the SlowMovie install other than as a subdirectory in the user's home folder (
/home/$USER/SlowMovie
). That could probably be added based on these modifications but that wasn't the intent here.