diff --git a/README.md b/README.md index 7c1b4ac..3740e0b 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,6 @@ Shared files are stored in the following directory: `/home/yunohost.app/droppy/f ## Documentation * Official documentation: https://github.com/silverwind/droppy - * YunoHost documentation: ## YunoHost specific features diff --git a/README_fr.md b/README_fr.md index c458d16..e9c58fc 100644 --- a/README_fr.md +++ b/README_fr.md @@ -26,7 +26,6 @@ Les fichiers partagés sont stockés dans le répertoire suivant : `/home/yunoho ## Documentation * Documentation officielle : https://github.com/silverwind/droppy - * Documentation YunoHost : ## Caractéristiques spécifiques YunoHost diff --git a/manifest.json b/manifest.json index 582bd57..9476910 100644 --- a/manifest.json +++ b/manifest.json @@ -13,7 +13,7 @@ "name": "eric_G" }, "requirements": { - "yunohost": ">= 3.8.1" + "yunohost": ">= 4.1.7" }, "multi_instance": false, "services": [ diff --git a/scripts/install b/scripts/install index 48e8cb7..0ed62e5 100644 --- a/scripts/install +++ b/scripts/install @@ -47,7 +47,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=2 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 #================================================= # STANDARD MODIFICATIONS diff --git a/scripts/upgrade b/scripts/upgrade index 119d625..e426619 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -18,7 +18,6 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) -is_public=$(ynh_app_setting_get --app=$app --key=is_public) final_path=$(ynh_app_setting_get --app=$app --key=final_path) port=$(ynh_app_setting_get --app=$app --key=port) @@ -29,10 +28,22 @@ ynh_script_progression --message="Checking version..." --weight=1 upgrade_type=$(ynh_check_app_version_changed) +#================================================= +# ENSURE DOWNWARD COMPATIBILITY +#================================================= +ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 + +# Cleaning legacy permissions +if ynh_legacy_permissions_exists; then + ynh_legacy_permissions_delete_all + + ynh_app_setting_delete --app=$app --key=is_public +fi + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up $app before upgrading (may take a while)..." --weight=40 +ynh_script_progression --message="Backing up $app before upgrading (may take a while)..." --weight=2 # Backup the current version of the app ynh_backup_before_upgrade @@ -48,9 +59,9 @@ ynh_abort_if_errors #================================================= # STOP SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Stopping a systemd service..." --weight=1 +ynh_script_progression --message="Stopping a systemd service..." --weight=9 -ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" +ynh_systemd_action --service_name=$app --action=stop --log_path=systemd #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -172,7 +183,7 @@ yunohost service add $app --description="Self-hosted file storage server" --log= #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=40 -ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Ready for requests!" +ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="Ready for requests!" #================================================= # RELOAD NGINX