diff --git a/scripts/install b/scripts/install index 6167d38..b1ec2b7 100755 --- a/scripts/install +++ b/scripts/install @@ -46,6 +46,8 @@ ynh_script_progression --message="Storing installation settings..." --weight=1 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=language --value=$language +ynh_app_setting_set --app=$app --key=title --value=$title #================================================= # CREATE DEDICATED USER diff --git a/scripts/upgrade b/scripts/upgrade index 0e9d599..40692c8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -19,6 +19,8 @@ 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) +language=$(ynh_app_setting_get --app=$app --key=language) +title=$(ynh_app_setting_get --app=$app --key=title) #================================================= # CHECK VERSION @@ -40,18 +42,6 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors -#================================================= -# 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 - #================================================= # CREATE DEDICATED USER #================================================= @@ -69,7 +59,7 @@ then ynh_script_progression --message="Upgrading source files..." --weight=1 #Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" --keep="$final_path/pages $final_path/configuration.ini" + ynh_setup_source --dest_dir="$final_path" fi chmod 750 "$final_path" @@ -84,6 +74,16 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - # Create a dedicated NGINX config ynh_add_nginx_config +#================================================= +# ADD A CONFIGURATION +#================================================= +ynh_script_progression --message="Adding a configuration file..." --weight=1 + +ynh_add_config --template="../conf/configuration.ini" --destination="$final_path/configuration.ini" + +chmod 400 "$final_path/configuration.ini" +chown $app "$final_path/configuration.ini" + #================================================= # PHP-FPM CONFIGURATION #=================================================