diff --git a/manifest.json b/manifest.json index fd52d94..6052083 100644 --- a/manifest.json +++ b/manifest.json @@ -26,8 +26,7 @@ "install" : [ { "name": "domain", - "type": "domain", - "example": "domain.org" + "type": "domain" }, { "name": "path", @@ -37,8 +36,7 @@ }, { "name": "admin", - "type": "user", - "example": "homer" + "type": "user" }, { "name": "is_public", diff --git a/scripts/_common.sh b/scripts/_common.sh index 2d75f64..702c1c6 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -7,11 +7,10 @@ # dependencies used by the app pkg_dependencies="libav-tools|ffmpeg" -YNH_PHP_VERSION="7.3" +YNH_PHP_VERSION="7.4" # Composer version -YNH_COMPOSER_VERSION="1.10.17" -#"2.1.3" +YNH_COMPOSER_VERSION="2.1.3" extra_php_dependencies="php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-simplexml php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-ldap" diff --git a/scripts/restore b/scripts/restore index baa17a9..d29d900 100644 --- a/scripts/restore +++ b/scripts/restore @@ -34,8 +34,6 @@ db_user=$db_name #================================================= ynh_script_progression --message="Validating restoration parameters..." -ynh_webpath_available --domain=$domain --path_url=$path_url \ - || ynh_die --message="Path not available: ${domain}${path_url}" test ! -d $final_path \ || ynh_die --message="There is already a directory: $final_path " diff --git a/scripts/upgrade b/scripts/upgrade index f87d70d..9e571e4 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -29,10 +29,23 @@ secret_key=$(ynh_app_setting_get --app=$app --key=secret_key) #================================================= # CHECK VERSION #================================================= -ynh_script_progression --message="Checking version..." upgrade_type=$(ynh_check_app_version_changed) +#================================================= +# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +#================================================= +ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=20 + +# Backup the current version of the app +ynh_backup_before_upgrade +ynh_clean_setup () { + # restore it if the upgrade fails + ynh_restore_upgradebackup +} +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= @@ -64,20 +77,6 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=20 - -# Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { - # restore it if the upgrade fails - ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - #================================================= # CREATE DEDICATED USER #=================================================