diff --git a/scripts/backup b/scripts/backup index ac9db26..330ff50 100755 --- a/scripts/backup +++ b/scripts/backup @@ -60,9 +60,13 @@ ynh_print_info --message="Declaring files to be backed up..." #================================================= pushd "$mc_path" - ynh_exec_warn_less sudo -u minio ./mc mirror --remove --a minio/outlinestorage "$final_path/outlinestorage" + ynh_exec_warn_less sudo -u minio mkdir outlinestorage + ynh_exec_warn_less sudo -u minio ./mc mirror --remove --a minio/outlinestorage ./outlinestorage/ popd +mv "$mc_path/outlinestorage" "$final_path/outlinestorage" +chown -R outline:www-data "$final_path/outlinestorage" + #================================================= # BACKUP THE APP MAIN DIR #================================================= diff --git a/scripts/install b/scripts/install index e5cde6f..38dffb5 100755 --- a/scripts/install +++ b/scripts/install @@ -127,7 +127,6 @@ ynh_script_progression --message="Configuring system user..." --time --weight=1 # Create a system user ynh_system_user_create --username=$app --home_dir="$final_path" -yunohost user update $admin --add-mailalias $app@$domain #================================================= # CREATE A POSTGRESQL DATABASE diff --git a/scripts/restore b/scripts/restore index 7b56203..252a350 100755 --- a/scripts/restore +++ b/scripts/restore @@ -85,10 +85,12 @@ chown -R $app:www-data "$final_path" # RESTORE MINIO #================================================= +mv "$final_path/outlinestorage" "$mc_path/outlinestorage" +chown -R minio:www-data "$mc_path/outlinestorage" pushd "$mc_path" ynh_exec_warn_less sudo -u minio ./mc mb minio/outlinestorage --region "fr-ynh-1" ynh_exec_warn_less sudo -u minio ./mc policy set public minio/outlinestorage - ynh_exec_warn_less sudo -u minio ./mc cp --recursive "$final_path/outlinestorage" minio/outlinestorage + ynh_exec_warn_less sudo -u minio ./mc cp --recursive ./outlinestorage minio/outlinestorage popd #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 716857e..302e298 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -69,7 +69,6 @@ ynh_script_progression --message="Making sure dedicated system user exists..." - # Create a dedicated user (if not existing) ynh_system_user_create --username=$app --home_dir="$final_path" -yunohost user update $admin --add-mailalias $app@$domain #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE