From b953ae9dd4f8886a9dcec93946cdfa10cee3de80 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Tue, 2 Nov 2021 01:43:31 +0100 Subject: [PATCH] Typo + used existing ynh_package_is_installed helper --- data/helpers.d/apt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/helpers.d/apt b/data/helpers.d/apt index ecad3b14a..d35328f6a 100644 --- a/data/helpers.d/apt +++ b/data/helpers.d/apt @@ -261,7 +261,7 @@ ynh_install_app_dependencies() { dependencies+=", php${specific_php_version}, php${specific_php_version}-fpm, php${specific_php_version}-common" fi - local psql_installed2="$(dpkg --list | grep -q "ii *postgresql-$PSQL_VERSION" && echo yes || echo no)" + local psql_installed="$(ynh_package_is_installed "postgresql-$PSQL_VERSION" && echo yes || echo no)" # The first time we run ynh_install_app_dependencies, we will replace the # entire control file (This is in particular meant to cover the case of @@ -306,7 +306,7 @@ EOF fi # Trigger postgresql regenconf if we may have just installed postgresql - local psql_installed2="$(dpkg --list | grep -q "ii *postgresql-$PSQL_VERSION" && echo yes || echo no)" + local psql_installed2="$(ynh_package_is_installed "postgresql-$PSQL_VERSION" && echo yes || echo no)" if [[ "$psql_installed" != "$psql_installed2" ]] then yunohost tools regen-conf postgresql