diff --git a/README.md b/README.md index e3eda20..f33419e 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ For user friendly details about Pleroma: [see here](https://blog.soykaf.com/post 1. **Pleroma** require a dedicated **root domain**, eg. pleroma.domain.tld 1. **Pleroma** require a valid **certificate** installed on the domain. Yunohost can **install Letsencrypt certificate** on the domain from **admin web-interface** or through **command-line**. -1. This package is **multi-instance** that means you can run **multiple Pleroma instances** on a **single server**. +1. This package is currently set to **single-instance** that means you can run a **single Pleroma instance** on a **single server**. ## Screenshots diff --git a/check_process b/check_process index 66fd563..9396b3d 100755 --- a/check_process +++ b/check_process @@ -43,6 +43,8 @@ # upgrade=1 from_commit=06f0005707e77fae566fedbd6e5e37f390df5173 # 2.0.5~ynh2 upgrade=1 from_commit=30696599937984e9879da22220253f005e290cd0 + # 2.0.7~ynh1 + upgrade=1 from_commit=4efe9686639b455fd026e881c9c92801e11a7232 backup_restore=1 multi_instance=0 # This test is no longer necessary since the version 2.7 (PR: https://github.com/YunoHost/yunohost/pull/304), you can still do it if your app could be installed with this version. @@ -78,3 +80,5 @@ Notification=yes name=2.0.5~ynh1 ; commit=30696599937984e9879da22220253f005e290cd0 name=2.0.5~ynh2 + ; commit=4efe9686639b455fd026e881c9c92801e11a7232 + name=2.0.7~ynh1 diff --git a/manifest.json b/manifest.json index 6f53c11..6a93413 100755 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "A free, federated social networking server built on open protocols.", "fr": "Un serveur de réseautage social fédéré et gratuit basé sur des protocoles ouverts." }, - "version": "2.0.7~ynh1", + "version": "2.0.7~ynh2", "url": "https://git.pleroma.social/pleroma/pleroma", "license": "AGPL-3.0-only", "maintainer": [ diff --git a/scripts/backup b/scripts/backup index e0d7ef6..5fcb288 100755 --- a/scripts/backup +++ b/scripts/backup @@ -31,6 +31,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) domain=$(ynh_app_setting_get --app=$app --key=domain) db_name=$(ynh_app_setting_get --app=$app --key=db_name) cache=$(ynh_app_setting_get --app=$app --key=cache) +datadir=$(ynh_app_setting_get --app=$app --key=datadir) #================================================= # DECLARE DATA AND CONF FILES TO BACKUP @@ -75,6 +76,13 @@ ynh_print_info --message="Backing up the PostgreSQL database..." ynh_psql_dump_db --database="$db_name" > db.sql +#================================================= +# BACKUP THE DATA DIRECTORY +#================================================= +ynh_script_progression --message="Backing up data directory..." + +ynh_backup --src_path="$datadir" --is_big + #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/install b/scripts/install index 7816a33..fccf3c3 100755 --- a/scripts/install +++ b/scripts/install @@ -227,7 +227,7 @@ pushd $final_path/$app sleep 60 # Add user - su pleroma -s $SHELL -lc "$final_path/$app/bin/pleroma_ctl user new $admin $admin_email --password $password --moderator --admin -y" + su "$app" -s $SHELL -lc "$final_path/$app/bin/pleroma_ctl user new $admin $admin_email --password $password --moderator --admin -y" popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index f3b3455..3f49609 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -109,8 +109,16 @@ previous_version="${version}" #================================================= ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." +# Inform the backup/restore process that it should not save the data directory +# Use only for the previous backup script that doesn't set 'is_big' +ynh_app_setting_set --app=$app --key=backup_core_only --value=1 + # Backup the current version of the app ynh_backup_before_upgrade + +# Remove the option backup_core_only after the backup. +ynh_app_setting_delete --app=$app --key=backup_core_only + ynh_clean_setup () { ynh_clean_check_starting # restore it if the upgrade fails