summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2020-04-30 17:49:26 +0200
committerMarkus Heiser <markus.heiser@darmarit.de>2020-04-30 17:49:26 +0200
commit0973255aff6c7d1ea88147962ae04e9719423c7a (patch)
tree512eaf8e6bbf1ad8457572c09694f96d21bea2dc /utils
parent8829796f76bc74c584db1d2a83553ac0611372a0 (diff)
downloadsearxng-0973255aff6c7d1ea88147962ae04e9719423c7a.tar.gz
searxng-0973255aff6c7d1ea88147962ae04e9719423c7a.zip
[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>
Diffstat (limited to 'utils')
-rwxr-xr-xutils/searx.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/utils/searx.sh b/utils/searx.sh
index 7013ec750..1499b928f 100755
--- a/utils/searx.sh
+++ b/utils/searx.sh
@@ -358,6 +358,9 @@ clone_is_available() {
clone_searx() {
rst_title "Clone searx sources" section
echo
+ if ! sudo -i -u "$SERVICE_USER" ls -d "$REPO_ROOT" > /dev/null; then
+ die 42 "user '$SERVICE_USER' missed read permission: $REPO_ROOT"
+ fi
SERVICE_HOME="$(sudo -i -u "$SERVICE_USER" echo \$HOME 2>/dev/null)"
if [[ ! "${SERVICE_HOME}" ]]; then
err_msg "to clone searx sources, user $SERVICE_USER hast to be created first"