When I cleaned up after the early failures I deleted directory /usr/lib/librephotos but not the corresponding linux username, so on the subsequent runs the installer script failed silently because the home directory of user librephotos didn't exist. I suggest something like adding
[ -d /usr/lib/librephotos ] || mkdir -p /usr/lib/librephotos/
chown -R librephotos:librephotos /usr/lib/librephotos/
before
id -u librephotos > /dev/null || useradd --home-dir /usr/lib/librephotos --comment "librephotos user" -g librephotos -mr -s /usr/sbin/nologin librephotos
so that if the user exists but not the home directory it can be recreated.
Also why not have a USRLIB_DIR variable defaulted to /user/lib/librephotos and then use that everywhere instead as it would enable this to be reconfigured if necessary.
When I cleaned up after the early failures I deleted directory /usr/lib/librephotos but not the corresponding linux username, so on the subsequent runs the installer script failed silently because the home directory of user librephotos didn't exist. I suggest something like adding
[ -d /usr/lib/librephotos ] || mkdir -p /usr/lib/librephotos/ chown -R librephotos:librephotos /usr/lib/librephotos/ before id -u librephotos > /dev/null || useradd --home-dir /usr/lib/librephotos --comment "librephotos user" -g librephotos -mr -s /usr/sbin/nologin librephotos so that if the user exists but not the home directory it can be recreated.
Also why not have a USRLIB_DIR variable defaulted to /user/lib/librephotos and then use that everywhere instead as it would enable this to be reconfigured if necessary.