diff --git a/scripts/_common.sh b/scripts/_common.sh index 7b7f25e..d3459c4 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -8,6 +8,9 @@ YNH_PHP_VERSION=7.3 extra_php_dependencies="php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-imagick php${YNH_PHP_VERSION}-bcmath php${YNH_PHP_VERSION}-exif php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mysqli php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-zip" +# needed for raw upload +pkg_dependencies="ufraw-batch" + #================================================= # EXPERIMENTAL HELPERS #================================================= diff --git a/scripts/install b/scripts/install index 991290f..356c65d 100755 --- a/scripts/install +++ b/scripts/install @@ -48,6 +48,13 @@ ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=is_public --value=$is_public +#================================================= +# INSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Installing dependencies..." --weight=3 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # CREATE A MYSQL DATABASE #================================================= diff --git a/scripts/remove b/scripts/remove index 066fa3f..17553ec 100755 --- a/scripts/remove +++ b/scripts/remove @@ -41,6 +41,14 @@ ynh_script_progression --message="Removing the MySQL database..." --weight=2 # Remove a database if it exists, along with the associated user ynh_mysql_remove_db --db_user=$db_user --db_name=$db_name +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_script_progression --message="Removing dependencies..." --weight=1 + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies + #================================================= # REMOVE NGINX CONFIGURATION #================================================= diff --git a/scripts/restore b/scripts/restore index a7d6c7d..fe5f82e 100755 --- a/scripts/restore +++ b/scripts/restore @@ -69,7 +69,7 @@ ynh_system_user_create --username=$app ynh_script_progression --message="Restoring Lychee data..." # Use --not_mandatory for the data directory, because if the backup has been made with BACKUP_CORE_ONLY, there's no data into the backup. -ynh_restore_file --origin_path="$public_path" --not_mandatory +ynh_restore_file --origin_path=$public_path --not_mandatory #================================================= # RESTORE USER RIGHTS @@ -80,6 +80,14 @@ chown -R $app: $final_path chown -R $app: $public_path chmod -R 750 $public_path +#================================================= +# REINSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Reinstalling dependencies..." --weight=7 + +# Define and install dependencies +ynh_install_app_dependencies $pkg_dependencies + #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index f9efbe0..dfe8903 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -82,10 +82,11 @@ ynh_clean_setup () { ynh_abort_if_errors #================================================= -# CHECK THE PATH +# UPGRADE DEPENDENCIES #================================================= +ynh_script_progression --message="Upgrading dependencies..." --weight=3 -path_url=$(ynh_normalize_url_path --path_url=$path_url) +ynh_install_app_dependencies $pkg_dependencies #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE