diff --git a/tools/config.sh b/tools/config.sh index 5dec59bef..d33b07f62 100644 --- a/tools/config.sh +++ b/tools/config.sh @@ -38,7 +38,7 @@ export SCODOC_DB_TEST="SCODOC_TEST" # psql command: if various versions installed, force the one we want: -if [ "${debian_version}" = "10" ] +if [ "${debian_version}" = "11" ] then PSQL=/usr/lib/postgresql/11/bin/psql export POSTGRES_SERVICE="postgresql@11-main.service" diff --git a/tools/install_debian11.sh b/tools/install_debian11.sh index 6dab18edf..55d2342fa 100755 --- a/tools/install_debian11.sh +++ b/tools/install_debian11.sh @@ -21,7 +21,7 @@ check_uid_root "$0" cd "$SCODOC_DIR" || die "can't cd $SCODOC_DIR" # ------------ Safety checks -if [ "${debian_version}" != "10" ] +if [ "${debian_version}" != "11" ] then echo "Version du systeme Linux Debian incompatible" exit 1 @@ -70,7 +70,7 @@ python3 -m venv venv || die "can't create Python 3 virtualenv" # ------------ INSTALL DES PAQUETS PYTHON (3.7) # ScoDoc8 uses pip in our env source venv/bin/activate -pip install --upgrade pip +# pip install --upgrade pip => bug [Errno 39] Directory not empty: '_internal' pip install wheel pip install -r requirements-3.7.txt diff --git a/tools/utils.sh b/tools/utils.sh index 53965b493..b79027f2e 100644 --- a/tools/utils.sh +++ b/tools/utils.sh @@ -61,8 +61,7 @@ init_postgres_user() { # run as root # --- Ensure Unix user "scodoc" exists check_create_scodoc_user() { - id -u "${SCODOC_USER}" &> /dev/null - if [ "$?" != 0 ] + if ! id -u "${SCODOC_USER}" &> /dev/null then echo "Creating unix user ${SCODOC_USER}" adduser --no-create-home --shell /bin/bash --gecos "ScoDoc service" "${SCODOC_USER}" || die "failed to create user"