[fix] fatal: repository '/root/searx' does not exist
The $SERVICE_USER (searx) needs read permission to clone repository. The
installation script stops if permission is not granted.
- https://github.com/asciimoo/searx/pull/1803#issuecomment-616406528
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
commit0973255aff6c7d1ea88147962ae04e9719423c7a
authorMarkus Heiser <markus.heiser@darmarit.de>
dateThu 30 Apr 2020, 17:49 (6 years ago)
parent8829796
utils/searx.sh+3
@@ -358,6 +358,9 @@ clone_is_available() {
358358clone_searx() {
359359 rst_title "Clone searx sources" section
360360 echo
361+ if ! sudo -i -u "$SERVICE_USER" ls -d "$REPO_ROOT" > /dev/null; then
362+ die 42 "user '$SERVICE_USER' missed read permission: $REPO_ROOT"
363+ fi
361364 SERVICE_HOME="$(sudo -i -u "$SERVICE_USER" echo \$HOME 2>/dev/null)"
362365 if [[ ! "${SERVICE_HOME}" ]]; then
363366 err_msg "to clone searx sources, user $SERVICE_USER hast to be created first"