diff --git a/scripts/install b/scripts/install index 18a5b23..bf26b94 100644 --- a/scripts/install +++ b/scripts/install @@ -37,14 +37,15 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=1 -# max file upload size -MEDIA_UPLOAD_SIZE="${media_upload_size:0:2}000000" # convert the MB argument in bytes - ynh_add_config --template="../conf/.env" --destination="$install_dir/.env" chmod 400 "$install_dir/.env" chown $app:$app "$install_dir/.env" +# max file upload size +MEDIA_UPLOAD_SIZE="${media_upload_size:0:2}000000" # convert the MB argument in bytes +ynh_replace_string --match_string="UPLOAD_LIMIT=MEDIA_UPLOAD_SIZE" --replace_string="UPLOAD_LIMIT=$(MEDIA_UPLOAD_SIZE)" --target_file="$install_dir/.env" + #================================================= # SPECIFIC SETUP #================================================= @@ -69,7 +70,7 @@ source $install_dir/.env ynh_script_progression --message="Configuring Bonfire release..." --weight=1 cd $install_dir -ynh_exec_warn ynh_exec_as $app -s $SHELL -lc "just config" +ynh_exec_warn just config ynh_exec_warn cat .env