diff --git a/README.md b/README.md index 877df5c..7c0075d 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## Overview -BookWyrm is a social network for tracking your reading, talking about books, writing reviews, and discovering what to read next. +BookWyrm is a social network for tracking your reading, talking about books, writing reviews, and discovering what to read next. **Shipped version:** 0.5.3~ynh1 diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md index bfc1c0d..6bdff81 100644 --- a/doc/DESCRIPTION.md +++ b/doc/DESCRIPTION.md @@ -1 +1 @@ -BookWyrm is a social network for tracking your reading, talking about books, writing reviews, and discovering what to read next. +BookWyrm is a social network for tracking your reading, talking about books, writing reviews, and discovering what to read next. diff --git a/scripts/install b/scripts/install index de5ca53..bb60622 100755 --- a/scripts/install +++ b/scripts/install @@ -98,7 +98,7 @@ ynh_psql_setup_db --db_user=$db_user --db_name=$db_name ynh_script_progression --message="Setting up source files..." --weight=1 ynh_app_setting_set --app=$app --key=final_path --value=$final_path -# Download, check integrity, uncompress and patch the source from app.src + ynh_setup_source --dest_dir="$final_path" chmod 750 "$final_path" @@ -189,7 +189,7 @@ ynh_systemd_action --service_name="${app}-worker" --action="start" --log_path="s #================================================= ynh_script_progression --message="Configuring permissions..." --weight=1 -# Make app public if necessary + if [ $is_public -eq 1 ] then # Everyone can access the app. diff --git a/scripts/remove b/scripts/remove old mode 100755 new mode 100644 diff --git a/scripts/restore b/scripts/restore old mode 100755 new mode 100644 index f38baa3..496f38e --- a/scripts/restore +++ b/scripts/restore @@ -53,6 +53,18 @@ ynh_script_progression --message="Restoring the NGINX web server configuration.. ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" + +#================================================= +# RESTORE THE POSTGRESQL DATABASE +#================================================= +ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=1 + +ynh_psql_test_if_first_run +db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) +ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd +ynh_psql_execute_as_root --sql="ALTER USER $db_user CREATEDB;" +ynh_psql_execute_file_as_root --file="./db.sql" --database="$db_name" + #================================================= # RECREATE THE DEDICATED USER #=================================================