1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/focalboard_ynh.git synced 2024-09-03 18:36:19 +02:00
This commit is contained in:
ericgaspar 2021-11-19 09:00:42 +01:00
parent 60067878db
commit c11fc70265
No known key found for this signature in database
GPG key ID: 574F281483054D44
6 changed files with 36 additions and 8 deletions

View file

@ -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

View file

@ -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",

View file

@ -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

View file

@ -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

View file

@ -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
#=================================================

View file

@ -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