diff --git a/README.md b/README.md index 2c975e2..fe52038 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Minimalist and opinionated RSS feed reader -**Shipped version:** 2.0.37~ynh1 +**Shipped version:** 2.0.37~ynh2 ## Screenshots diff --git a/README_fr.md b/README_fr.md index e297a65..7ab4829 100644 --- a/README_fr.md +++ b/README_fr.md @@ -17,7 +17,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Minimalist and opinionated RSS feed reader -**Version incluse :** 2.0.37~ynh1 +**Version incluse :** 2.0.37~ynh2 ## Captures d'écran diff --git a/conf/miniflux.conf b/conf/miniflux.conf index aefe59c..31c3714 100644 --- a/conf/miniflux.conf +++ b/conf/miniflux.conf @@ -1,6 +1,6 @@ BASE_URL=https://__DOMAIN____PATH__ LISTEN_ADDR=127.0.0.1:__PORT__ -DATABASE_URL=postgres://__DB_NAME__:__DB_PWD__@localhost/__DB_NAME__?sslmode=disable +DATABASE_URL=postgres://__DB_USER__:__DB_PWD__@localhost/__DB_NAME__?sslmode=disable RUN_MIGRATIONS=1 CREATE_ADMIN=1 ADMIN_USERNAME=__ADMIN__ diff --git a/manifest.json b/manifest.json index 967d895..8ac01a6 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Minimalist and opinionated RSS feed reader", "fr": "Agrégateur de flux RSS minimaliste" }, - "version": "2.0.37~ynh1", + "version": "2.0.37~ynh2", "url": "https://miniflux.app/", "upstream": { "license": "Apache-2.0", diff --git a/scripts/install b/scripts/install index 1e8c1d9..676a45e 100644 --- a/scripts/install +++ b/scripts/install @@ -47,7 +47,7 @@ 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=admin --value=$admin -ynh_app_setting_set --app=$app --key=password --value=$password +ynh_app_setting_set --app=$app --key=password --value="$password" #================================================= # STANDARD MODIFICATIONS @@ -81,9 +81,10 @@ ynh_system_user_create --username=$app --home_dir=$final_path ynh_script_progression --message="Creating a PostgreSQL database..." --weight=2 db_name=$(ynh_sanitize_dbid --db_name=$app) +db_user=$db_name ynh_app_setting_set --app=$app --key=db_name --value=$db_name ynh_psql_test_if_first_run -ynh_psql_setup_db --db_user=$db_name --db_name=$db_name +ynh_psql_setup_db --db_user=$db_user --db_name=$db_name ynh_psql_execute_as_root --sql="CREATE EXTENSION hstore;" --database=$db_name @@ -115,6 +116,7 @@ ynh_add_nginx_config ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_add_config --template="../conf/miniflux.conf" --destination="$final_path/$app.conf" + chmod 600 "$final_path/$app.conf" chown $app "$final_path/$app.conf" diff --git a/scripts/restore b/scripts/restore index 79507c2..8c74d36 100644 --- a/scripts/restore +++ b/scripts/restore @@ -28,14 +28,14 @@ path_url=$(ynh_app_setting_get --app=$app --key=path) 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 -db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) #================================================= # CHECK IF THE APP CAN BE RESTORED #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=2 -test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " +test ! -d $final_path \ + || ynh_die --message="There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS @@ -79,6 +79,7 @@ ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies #================================================= ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=6 +db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) ynh_psql_test_if_first_run ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd ynh_psql_execute_file_as_root --file="./db.sql" --database=$db_name