From ec48a2fbdbab8d97fe8d6bd0478c4926bb34ca93 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 May 2021 14:39:16 +0200 Subject: [PATCH] Fix --- check_process | 8 ++++---- scripts/_common.sh | 2 ++ scripts/install | 13 ++++--------- scripts/upgrade | 2 +- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/check_process b/check_process index 10490ea..48e476b 100644 --- a/check_process +++ b/check_process @@ -3,10 +3,10 @@ ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - path="/path" (PATH) - admin="john" (USER) - is_public=1 (PUBLIC|public=1|private=0) + domain="domain.tld" + path="/path" + admin="john" + is_public=1 password="phrasedepasse" language="fr" port=9537 (PORT) diff --git a/scripts/_common.sh b/scripts/_common.sh index 5617785..986295d 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -9,6 +9,8 @@ pkg_dependencies="postgresql postgresql-contrib apt-transport-https" YNH_PHP_VERSION="7.3" +YNH_COMPOSER_VERSION="2.0.13" + extra_php_dependencies="php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-imagick php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-pgsql php${YNH_PHP_VERSION}-xml" #================================================= diff --git a/scripts/install b/scripts/install index 763fef2..800974c 100644 --- a/scripts/install +++ b/scripts/install @@ -132,11 +132,7 @@ ynh_store_file_checksum --file="$final_path/config/db.inc.php" #================================================= ynh_script_progression --message="Configuring Composer..." --weight=1 -pushd $final_path - export COMPOSER_HOME=$final_path - ynh_exec_warn_less curl -sS https://getcomposer.org/installer | php${phpversion} -- --version="1.10.16" --install-dir="$final_path" \ - && php${phpversion} composer.phar install --no-interaction --quiet -popd +ynh_install_composer #================================================= # SETUP SYSTEMD @@ -146,13 +142,12 @@ ynh_script_progression --message="Configuring a systemd service..." --weight=12 ynh_add_systemd_config #================================================= -# Set-up database and configuration +# SET-UP DATABASE AND CONFIGURATION #================================================= -ynh_script_progression --message="Configuring database..." --weight=1 - -cache_dir="/home/yunohost.app/$app" +ynh_script_progression --message="Configuring Movim..." --weight=1 # Create cachedir folder +cache_dir="/home/yunohost.app/$app" mkdir -p $cache_dir chown -R $app $cache_dir diff --git a/scripts/upgrade b/scripts/upgrade index 42979f8..b7f748c 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -145,7 +145,7 @@ yunohost service add $app --description="Responsive web-based XMPP client" --log ynh_script_progression --message="Installing Composer..." --weight=1 pushd "$final_path" - ynh_exec_warn_less curl -sS https://getcomposer.org/installer | php$phpversion -- --version="1.10.16" --install-dir="$final_path" \ + ynh_exec_warn_less ynh_install_composer \ && php$phpversion composer.phar config --global discard-changes true --quiet \ && php$phpversion composer.phar update --no-interaction --quiet \ && php$phpversion composer.phar movim:migrate --quiet