From 38f2e8507c18b8cf37517399f926e953d7e08a6b Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 28 Jul 2022 15:28:59 +0200 Subject: [PATCH] More example_ynh --- scripts/_common.sh | 2 ++ scripts/restore | 1 + scripts/upgrade | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index ef1c9b8..9a4df38 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -38,6 +38,8 @@ myynh_set_permissions () { chown -R "$app": "$final_path/private" chown -R "$app": "$datadir" chown root: "$datadir" + chmod -R o-rwx "$final_path" + chmod -R o-rwx "$datadir" } #Convert --data to --data-urlencode before ynh_local_curl diff --git a/scripts/restore b/scripts/restore index a2a1869..bfcc2ec 100644 --- a/scripts/restore +++ b/scripts/restore @@ -26,6 +26,7 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) +phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 9a70d7e..303c64d 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) admin_user=$(ynh_app_setting_get --app=$app --key=admin_user) final_path=$(ynh_app_setting_get --app=$app --key=final_path) datadir=$(ynh_app_setting_get --app=$app --key=datadir) @@ -26,6 +25,8 @@ datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= # CHECK VERSION #================================================= +ynh_script_progression --message="Checking version..." + upgrade_type=$(ynh_check_app_version_changed) #=================================================