From ce5b9992d02d68e4a5b53dc6fcad3c5847b3e610 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 3 Feb 2023 22:35:46 +0100 Subject: [PATCH] Fix --- scripts/change_url | 2 +- scripts/config | 2 +- scripts/upgrade | 20 +------------------- 3 files changed, 3 insertions(+), 21 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index 147f45a..a7a7281 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -92,7 +92,7 @@ ynh_script_progression --message="Applying Nextcloud specific modifications..." # Define a function to execute commands with `occ` exec_occ() { - (cd "$final_path" && ynh_exec_as "$app" \ + (cd "$install_dir" && ynh_exec_as "$app" \ php${phpversion} --define apc.enable_cli=1 occ --no-interaction --no-ansi "$@") } diff --git a/scripts/config b/scripts/config index 10ee4b2..5a7a2ac 100644 --- a/scripts/config +++ b/scripts/config @@ -24,7 +24,7 @@ current_fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) get__maintenance_mode() { # Maintenance mode status - maintenance_mode_status="$(cd "$final_path" && ynh_exec_as "$app" \ + maintenance_mode_status="$(cd "$install_dir" && ynh_exec_as "$app" \ php${phpversion} --define apc.enable_cli=1 occ --no-interaction --no-ansi maintenance:mode)" 2> /dev/null if echo $maintenance_mode_status | grep -q "disabled" then diff --git a/scripts/upgrade b/scripts/upgrade index e09d7b6..b94c456 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -30,24 +30,6 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." -# If db_name doesn't exist, create it -if [ -z "$db_name" ]; then - db_name=$(ynh_sanitize_dbid --db_name=$app) -#REMOVEME? ynh_app_setting_set --app=$app --key=db_name --value=$db_name -fi - -# If install_dir doesn't exist, create it -if [ -z "$install_dir" ]; then -#REMOVEME? install_dir=/var/www/$app -#REMOVEME? ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir -fi - -# If data_dir doesn't exist, create it -if [ -z "$data_dir" ]; then - data_dir=/home/yunohost.app/$app -#REMOVEME? ynh_app_setting_set --app=$app --key=data_dir --value=$data_dir -fi - # Remove the option backup_core_only if it's in the settings.yml file ynh_app_setting_delete --app=$app --key=backup_core_only @@ -282,7 +264,7 @@ EOF ) # Replace the old nextcloud by the new one -#REMOVEME? ynh_secure_remove --file="$install_dir" + ynh_secure_remove --file="$install_dir" mv "$tmpdir" "$install_dir" ynh_secure_remove --file="$tmpdir"