diff --git a/scripts/install b/scripts/install index 019b28f..5e2f4f3 100644 --- a/scripts/install +++ b/scripts/install @@ -24,6 +24,7 @@ domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC language=$YNH_APP_ARG_LANGUAGE +timezone="$(cat /etc/timezone)" app=$YNH_APP_INSTANCE_NAME diff --git a/scripts/upgrade b/scripts/upgrade index bd01ec1..01457ee 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,6 +23,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) +timezone="$(cat /etc/timezone)" fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) @@ -52,6 +53,12 @@ ynh_abort_if_errors #================================================= ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 +# If fpm_footprint doesn't exist, create it +if [ -z "$timezone" ]; then + timezone="$(cat /etc/timezone)" + ynh_app_setting_set --app=$app --key=timezone --value=$timezone +fi + # If fpm_footprint doesn't exist, create it if [ -z "$fpm_footprint" ]; then fpm_footprint=low