From c11fc70265868fb15e68d0f438bbdd52a21918da Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 19 Nov 2021 09:00:42 +0100 Subject: [PATCH] 0.10.0 --- conf/app.src | 4 ++-- manifest.json | 2 +- scripts/backup | 7 ++++++- scripts/install | 5 ++++- scripts/remove | 12 ++++++++++++ scripts/restore | 14 +++++++++++--- 6 files changed, 36 insertions(+), 8 deletions(-) diff --git a/conf/app.src b/conf/app.src index bfc63d9..4ba7451 100755 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/mattermost/focalboard/releases/download/v0.9.0-rc7/focalboard-server-linux-amd64.tar.gz -SOURCE_SUM=2aca013398814c70f8f50669c22d053a16867f63ae56c81c4a2295f43bbac3a4 +SOURCE_URL=https://github.com/mattermost/focalboard/releases/download/v0.10.0/focalboard-server-linux-amd64.tar.gz +SOURCE_SUM=a618ed7281b239fc3adf808c599d24ad56ac22e253cd0c76a7cd51b5256fd2c8 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=true diff --git a/manifest.json b/manifest.json index 08c1e54..e6d8000 100755 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Self-hosted alternative to Trello, Notion, and Asana", "fr": "Alternative auto-hébergée à Trello, Notion et Asana" }, - "version": "0.9.0~ynh1", + "version": "0.10.0~ynh1", "url": "https://www.focalboard.com/", "upstream": { "license": "MIT", diff --git a/scripts/backup b/scripts/backup index 17b62df..dd6ff4a 100755 --- a/scripts/backup +++ b/scripts/backup @@ -43,7 +43,12 @@ ynh_print_info --message="Declaring files to be backed up..." #================================================= ynh_backup --src_path="$final_path" -ynh_backup --src_path="$files_path" + +#================================================= +# BACKUP THE DATA DIR +#================================================= + +ynh_backup --src_path="$files_path" --is_big #================================================= # BACKUP THE NGINX CONFIGURATION diff --git a/scripts/install b/scripts/install index 8fbb772..7140e45 100755 --- a/scripts/install +++ b/scripts/install @@ -101,13 +101,16 @@ chown -R $app:www-data "$final_path" #================================================= # CREATE DIRECTORIES #================================================= +ynh_script_progression --message="Creating a data directory..." --weight=1 files_path=/home/yunohost.app/$app ynh_app_setting_set --app=$app --key=files_path --value=$files_path mkdir -p $files_path/files -chown -R $app:www-data $files_path + chmod -R 755 $files_path +chmod -R o-rwx $files_path +chown -R $app:www-data $files_path #================================================= # NGINX CONFIGURATION diff --git a/scripts/remove b/scripts/remove index 1a56281..6baa5ff 100755 --- a/scripts/remove +++ b/scripts/remove @@ -21,6 +21,7 @@ port=$(ynh_app_setting_get --app=$app --key=port) db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_user=$db_name final_path=$(ynh_app_setting_get --app=$app --key=final_path) +files_path=$(ynh_app_setting_get --app=$app --key=files_path) #================================================= # STANDARD REMOVE @@ -67,6 +68,17 @@ ynh_script_progression --message="Removing app main directory..." --weight=4 # Remove the app directory securely ynh_secure_remove --file="$final_path" +#================================================= +# REMOVE DATA DIR +#================================================= + +# Remove the data directory if --purge option is used +if [ "${YNH_APP_PURGE:-0}" -eq 1 ] +then + ynh_script_progression --message="Removing app data directory..." --weight=1 + ynh_secure_remove --file="$files_path" +fi + #================================================= # REMOVE NGINX CONFIGURATION #================================================= diff --git a/scripts/restore b/scripts/restore index 0bb26e1..ccf072f 100755 --- a/scripts/restore +++ b/scripts/restore @@ -71,10 +71,18 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -ynh_restore_file --origin_path="$files_path" +#================================================= +# RESTORE THE DATA DIRECTORY +#================================================= +ynh_script_progression --message="Restoring the data directory..." --weight=1 -chown -R $app:www-data $files_path -chmod -R 755 $files_path +ynh_restore_file --origin_path="$files_path" --not_mandatory + +mkdir -p files_path + +chmod 755 "$files_path" +chmod -R o-rwx "$files_path" +chown -R $app:www-data "$files_path" #================================================= # SPECIFIC RESTORATION