From dced1f72869e90aa71cec821968edfae6eebe4c0 Mon Sep 17 00:00:00 2001 From: tituspijean Date: Sun, 13 Jun 2021 13:18:14 +0200 Subject: [PATCH] Integrate with YunoHost's multimedia directories --- doc/DISCLAIMER.md | 1 + doc/DISCLAIMER_fr.md | 1 + scripts/install | 10 ++++++++++ scripts/restore | 10 ++++++++++ 4 files changed, 22 insertions(+) diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index 845ec1e..303f92c 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -3,3 +3,4 @@ * Supported architectures are `arm`, `armhf`, `arm64`, and `amd64` * Access control is done with YunoHost's permissions system. * API (`domain.tld/path/api`) can be accessed by visitors to allow control by remote clients. +* The app uses YunoHost's multimédia directories, hence it has write access to users' and shared directories in `/home/yunohost.multimedia`. After installation, you can choose these directories to store your media. diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md index 4b70595..64a0d4f 100644 --- a/doc/DISCLAIMER_fr.md +++ b/doc/DISCLAIMER_fr.md @@ -3,3 +3,4 @@ * Les architectures compatibles sont `arm`, `armhf`, `arm64`, et `amd64` * Le contrôle de l'accès se fait avec le système de permissions de YunoHost. * L'API (`domain.tld/path/api`) est accessible aux visiteurs pour permettre le contrôle via des clients externes. +* L'application utilise les dossiers multimédia de YunoHost, elle a donc accès en écriture aux dossiers utilisateurs et communs de `/home/yunohost.multimedia`. Après installation, vous pourrez choisir ces dossiers pour y stocker vos médias. diff --git a/scripts/install b/scripts/install index c041e3d..7dea2e4 100755 --- a/scripts/install +++ b/scripts/install @@ -115,6 +115,16 @@ ynh_add_config --template="../conf/config.xml" --destination="$final_path/config chmod -R o-rwx "$final_path" chown -R $app:$app "$final_path" +#================================================= +# YUNOHOST MULTIMEDIA INTEGRATION +#================================================= +ynh_script_progression --message="Adding multimedia directories..." --weight=2 + +# Build YunoHost multimedia directories +ynh_multimedia_build_main_dir +# Enable writing into these directories +ynh_multimedia_addaccess $app + #================================================= # GENERIC FINALIZATIONs #================================================= diff --git a/scripts/restore b/scripts/restore index 250eae1..87bd5cf 100755 --- a/scripts/restore +++ b/scripts/restore @@ -76,6 +76,16 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:$app "$final_path" +#================================================= +# YUNOHOST MULTIMEDIA INTEGRATION +#================================================= +ynh_script_progression --message="Adding multimedia directories..." --weight=2 + +# Build YunoHost multimedia directories +ynh_multimedia_build_main_dir +# Enable writing into these directories +ynh_multimedia_addaccess $app + #================================================= # SPECIFIC RESTORATION #=================================================