From cfd85b5d0ebd2bd54c664f04759e4854e062e382 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 8 Jul 2020 09:49:14 +0200 Subject: [PATCH 1/6] update to 0.29.2 --- README.md | 59 ++++++++++++++++++++++-- README_fr.md | 65 +++++++++++++++++++++++++++ check_process | 6 +-- conf/app.src | 6 +-- conf/nginx.conf | 2 + manifest.json | 20 ++++----- scripts/backup | 49 ++++++++++++++++++++ scripts/install | 29 ++++++++---- scripts/remove | 14 +++--- scripts/restore | 74 ++++++++++++++++++++++++++++++ scripts/upgrade | 116 ++++++++++++++++++++++++++++++++++++++++++++++++ 11 files changed, 406 insertions(+), 34 deletions(-) create mode 100644 README_fr.md create mode 100644 scripts/backup create mode 100644 scripts/restore create mode 100644 scripts/upgrade diff --git a/README.md b/README.md index f8d45cf..e26b895 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,64 @@ -# H5AI for Yunohost +# h5ai for YunoHost -[H5AI](https://larsjung.de/h5ai/) is a modern file indexer for HTTP web servers. It allows to display and browse directories containing various documents with a clean and light interface. +[![Integration level](https://dash.yunohost.org/integration/h5ai.svg)](https://dash.yunohost.org/appci/app/h5ai) ![](https://ci-apps.yunohost.org/ci/badges/h5ai.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/h5ai.maintain.svg) +[![Install h5ai with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=h5ai) + +*[Lire ce readme en français.](./README_fr.md)* + +> *This package allows you to install h5ai quickly and simply on a YunoHost server. +If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.* + +## Overview +[h5ai](https://larsjung.de/h5ai/) is a modern file indexer for HTTP web servers. It allows to display and browse directories containing various documents with a clean and light interface. + +**Shipped version:** 0.29.2 Screenshot : ![](./doc/screenshot.jpg) -## Usage +## Configuration After installing the application, you can add documents in `/var/www/documents` (or the corresponding path you choosed). +h5ai doesn't allow to edit or upload new documents directly from the web browser. But you can imagine coupling the folder `/var/www/documents` to Nextcloud or some sort of FTP to allow some users to upload content, and use h5ai as a public read-only interface. +The main configuration file is `_h5ai/private/conf/options.json`. You might want to change some of the documented settings. But there are some more files in `_h5ai/private/conf` you might have a look at. -H5ai doesn't allow to edit or upload new documents directly from the web browser. But you can imagine coupling the folder `/var/www/documents` to nextcloud or some sort of FTP to allow some users to upload content, and use h5ai as a public read-only interface. +## Documentation + + * Official documentation: https://larsjung.de/h5ai/ + * YunoHost documentation: If specific documentation is needed, feel free to contribute. + +## YunoHost specific features + +#### Supported architectures + +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/h5ai%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/h5ai/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/h5ai%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/h5ai/) + +## Limitations + +* Any known limitations. + +## Additional information + +* Other info you would like to add about this app. + +## Links + + * Report a bug: https://github.com/YunoHost-Apps/h5ai_ynh/issues + * App website: https://larsjung.de/h5ai/ + * Upstream app repository: https://github.com/lrsjng/h5ai + * YunoHost website: https://yunohost.org/ + +--- + +## Developer info + +Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing). + +To try the testing branch, please proceed like that. +``` +sudo yunohost app install https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing --debug +or +sudo yunohost app upgrade h5ai -u https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing --debug +``` diff --git a/README_fr.md b/README_fr.md new file mode 100644 index 0000000..ff855e6 --- /dev/null +++ b/README_fr.md @@ -0,0 +1,65 @@ +# h5ai pour YunoHost + +[![Integration level](https://dash.yunohost.org/integration/h5ai.svg)](https://dash.yunohost.org/appci/app/h5ai) ![](https://ci-apps.yunohost.org/ci/badges/h5ai.status.svg) ![](https://ci-apps.yunohost.org/ci/badges/h5ai.maintain.svg) +[![Installer h5ai avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=h5ai) + +*[Read this readme in english.](./README.md)* + +> *Ce package vous permet d'installer h5ai rapidement et simplement sur un serveur YunoHost. +Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.* + +## Vue d'ensemble +[h5ai](https://larsjung.de/h5ai/) est un indexeur de fichiers moderne pour les serveurs Web HTTP. Il permet d'afficher et de parcourir des répertoires contenant divers documents avec une interface légère et claire. + +**Version incluse :** 0.29.2 + +## Captures d'écran + +![](./doc/screenshot.jpg) + +## Configuration + +Après avoir installé l'application, vous pouvez ajouter des documents dans `/var/www/documents` (ou le chemin correspondant que vous avez choisi). +h5ai ne permet pas de modifier ou de télécharger de nouveaux documents directement à partir du navigateur Web. Vous pouvez imaginer coupler le dossier `/var/www/documents` à Nextcloud ou un FTP pour permettre à certains utilisateurs de télécharger du contenu et d'utiliser h5ai comme interface publique en lecture seule. +Le fichier de configuration principal est `_h5ai / private / conf / options.json`. Vous souhaiterez peut-être modifier certains des paramètres documentés. Mais il y a d'autres fichiers dans `_h5ai / private / conf` que vous pourriez consulter. + +## Documentation + + * Documentation officielle : https://larsjung.de/h5ai/ + * Documentation YunoHost : Si une documentation spécifique est nécessaire, n'hésitez pas à contribuer. + +## Caractéristiques spécifiques YunoHost + +#### Architectures supportées + +* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/h5ai%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/h5ai/) +* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/h5ai%20%28Apps%29.svg)](https://ci-apps-arm.yunohost.org/ci/apps/h5ai/) + +## Limitations + +* Limitations connues. + +## Informations additionnelles + +* Autres informations que vous souhaitez ajouter sur cette application. + +## Liens + + * Signaler un bug : https://github.com/YunoHost-Apps/h5ai_ynh/issues + * Site de l'application : https://larsjung.de/h5ai/ + * Dépôt de l'application principale : https://github.com/lrsjng/h5ai + * Site web YunoHost : https://yunohost.org/ + +--- + +## Informations pour les développeurs + + +Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing). + +Pour essayer la branche testing, procédez comme suit. +``` +sudo yunohost app install https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing --debug +ou +sudo yunohost app upgrade h5ai -u https://github.com/YunoHost-Apps/h5ai_ynh/tree/testing --debug +``` diff --git a/check_process b/check_process index a557e1f..d212967 100644 --- a/check_process +++ b/check_process @@ -12,8 +12,8 @@ setup_nourl=0 setup_private=1 setup_public=1 - upgrade=0 - backup_restore=0 + upgrade=1 + backup_restore=1 multi_instance=0 incorrect_path=1 port_already_use=0 @@ -22,4 +22,4 @@ Level 5=auto ;;; Options Email=alex.aubin@mailoo.org -Notification=down +Notification=down \ No newline at end of file diff --git a/conf/app.src b/conf/app.src index 4112d7d..8b6d764 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,6 +1,6 @@ -SOURCE_URL=https://release.larsjung.de/h5ai/h5ai-0.29.0.zip -SOURCE_SUM=508324f14df32bfa79096b8c272dd644cbd8ff97d0dbc7dde2eec6ce7d95104e +SOURCE_URL=https://release.larsjung.de/h5ai/h5ai-0.29.2.zip +SOURCE_SUM=612acd8cc724ab42c5266f7b9966a0212b561331d8770b5609891edb5cb69a8b SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=false -SOURCE_FILENAME=h5ai-0.29.0.zip +SOURCE_FILENAME=h5ai-0.29.2.zip \ No newline at end of file diff --git a/conf/nginx.conf b/conf/nginx.conf index c7ecfa0..cdbdb21 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -7,6 +7,8 @@ location __PATH__/ { index index.php __PATH__/_h5ai/public/index.php; try_files $uri.html $uri $uri/ =404; + + proxy_pass_header Content-Type; client_max_body_size 10G; diff --git a/manifest.json b/manifest.json index fb945f0..0cb269b 100644 --- a/manifest.json +++ b/manifest.json @@ -2,10 +2,10 @@ "name": "H5AI", "id": "h5ai", "packaging_format": 1, - "version": "0.29.0~ynh1", + "version": "0.29.2~ynh1", "description": { - "en": "A modern HTTP web server index for Nginx.", - "fr": "Un serveur moderne d'index pour Nginx." + "en": "A modern HTTP web server index for NGINX.", + "fr": "Un serveur moderne d'index pour NGINX." }, "url": "https://larsjung.de/h5ai/", "license": "MIT", @@ -14,12 +14,12 @@ "email": "alex.aubin@mailoo.org" }, "requirements": { - "yunohost": ">= 3.5.0" + "yunohost": ">= 3.7.0" }, "multi_instance": false, "services": [ "nginx", - "php5-fpm" + "php7-fpm" ], "arguments": { "install" : [ @@ -27,8 +27,8 @@ "name": "domain", "type": "domain", "ask": { - "en": "Choose a domain for H5AI", - "fr": "Choisissez un domaine pour H5AI" + "en": "Choose a domain for h5ai", + "fr": "Choisissez un domaine pour h5ai" }, "example": "domain.org" }, @@ -36,8 +36,8 @@ "name": "path", "type": "path", "ask": { - "en": "Choose a path for H5AI", - "fr": "Choisissez un chemin pour H5AI" + "en": "Choose a path for h5ai", + "fr": "Choisissez un chemin pour h5ai" }, "example": "/documents", "default": "/documents" @@ -53,4 +53,4 @@ } ] } -} +} \ No newline at end of file diff --git a/scripts/backup b/scripts/backup new file mode 100644 index 0000000..14de8e1 --- /dev/null +++ b/scripts/backup @@ -0,0 +1,49 @@ +#!/bin/bash + +#================================================= +# GENERIC START +#================================================= +# IMPORT GENERIC HELPERS +#================================================= + +source /usr/share/yunohost/helpers + +#================================================= +# MANAGE SCRIPT FAILURE +#================================================= + +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + +#================================================= +# LOAD SETTINGS +#================================================= +ynh_print_info --message="Loading installation settings..." + +app=$YNH_APP_INSTANCE_NAME + +final_path=$(ynh_app_setting_get --app=$app --key=final_path) +domain=$(ynh_app_setting_get --app=$app --key=domain) + +#================================================= +# DECLARE DATA AND CONF FILES TO BACKUP +#================================================= +ynh_print_info --message="Declaring files to be backed up..." + +#================================================= +# BACKUP THE APP MAIN DIR +#================================================= + +ynh_backup --src_path="$final_path" + +#================================================= +# BACKUP THE NGINX CONFIGURATION +#================================================= + +ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/install b/scripts/install index e5c9550..21c5c07 100644 --- a/scripts/install +++ b/scripts/install @@ -39,7 +39,7 @@ fi ynh_script_progression --message="Validating installation parameters..." --weight=1 # Register (book) web path -ynh_webpath_register $app $domain $path_url +ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url # Check final_path availability test ! -e "$final_path" || ynh_die "This path already contains a folder" @@ -49,25 +49,31 @@ test ! -e "$final_path" || ynh_die "This path already contains a folder" #================================================= ynh_script_progression --message="Storing installation settings..." --weight=1 -ynh_app_setting_set $app is_public $is_public -ynh_app_setting_set $app final_path $final_path +ynh_app_setting_set --app=$app --key=is_public --value=$is_public +ynh_app_setting_set --app=$app --key=final_path --value=$final_path #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Setting up source files..." --weight=1 +ynh_script_progression --message="Setting up source files..." --weight=4 # Download, check integrity, uncompress and patch the source from app.src # For this app sources are in app subdirectory ynh_setup_source "$final_path" +#================================================= +# GENERIC FINALIZATION +#================================================= +# SECURE FILES AND DIRECTORIES +#================================================= + # Set permissions to phpsysinfo directory chown -R www-data: "$final_path" #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Configuring nginx web server..." --weight=1 +ynh_script_progression --message="Configuring NGINX web server..." --weight=1 # Create a dedicated nginx config ynh_add_nginx_config @@ -80,15 +86,20 @@ ynh_script_progression --message="Configuring SSOwat..." --weight=1 # Make app public if necessary or protect it if [ $is_public -eq 1 ] then - # unprotected_uris allows SSO credentials to be passed anyway. - ynh_app_setting_set "$app" unprotected_uris "/" + # Everyone can access the app. + # The "main" permission is automatically created before the install script. + ynh_permission_update --permission "main" --add "visitors" fi #================================================= # RELOAD NGINX #================================================= -ynh_script_progression --message="Reloading nginx web server..." --weight=1 +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 -systemctl reload nginx +ynh_systemd_action --service_name=nginx --action=reload + +#================================================= +# END OF SCRIPT +#================================================= ynh_script_progression --message="Installation of $app completed" --last diff --git a/scripts/remove b/scripts/remove index 9b37d5e..de6c4b0 100644 --- a/scripts/remove +++ b/scripts/remove @@ -14,13 +14,14 @@ source /usr/share/yunohost/helpers ynh_script_progression --message="Loading installation settings..." --weight=1 app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get "$app" domain) -final_path=$(ynh_app_setting_get "$app" final_path) + +domain=$(ynh_app_setting_get --app=$app --key=domain) +final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= # REMOVE THE MAIN DIR OF THE APP #================================================= -ynh_script_progression --message="Removing app main directory..." --weight=1 +ynh_script_progression --message="Removing $app main directory..." --weight=3 # Remove sources ynh_secure_remove --file="$final_path" @@ -28,9 +29,12 @@ ynh_secure_remove --file="$final_path" #================================================= # REMOVE THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Removing nginx web server configuration..." --weight=1 +ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 ynh_remove_nginx_config -systemctl reload nginx + +#================================================= +# END OF SCRIPT +#================================================= ynh_script_progression --message="Removal of $app completed" --last diff --git a/scripts/restore b/scripts/restore new file mode 100644 index 0000000..c5e263e --- /dev/null +++ b/scripts/restore @@ -0,0 +1,74 @@ +#!/bin/bash + +#================================================= +# GENERIC START +#================================================= +# IMPORT GENERIC HELPERS +#================================================= + +source /usr/share/yunohost/helpers + +#================================================= +# MANAGE SCRIPT FAILURE +#================================================= + +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + +#================================================= +# LOAD SETTINGS +#================================================= +ynh_script_progression --message="Loading installation settings..." --weight=1 + +app=$YNH_APP_INSTANCE_NAME + +domain=$(ynh_app_setting_get --app=$app --key=domain) +path_url=$(ynh_app_setting_get --app=$app --key=path) +final_path=$(ynh_app_setting_get --app=$app --key=final_path) + +#================================================= +# CHECK IF THE APP CAN BE RESTORED +#================================================= +ynh_script_progression --message="Validating restoration parameters..." --weight=1 + +ynh_webpath_available --domain=$domain --path_url=$path_url \ + || ynh_die --message="Path not available: ${domain}${path_url}" +test ! -d $final_path \ + || ynh_die --message="There is already a directory: $final_path " + +#================================================= +# STANDARD RESTORATION STEPS +#================================================= +# RESTORE THE NGINX CONFIGURATION +#================================================= + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" + +#================================================= +# RESTORE THE APP MAIN DIR +#================================================= +ynh_script_progression --message="Restoring the app main directory..." --weight=4 + +ynh_restore_file --origin_path="$final_path" + +#================================================= +# RESTORE USER RIGHTS +#================================================= + +# Restore permissions on app files +chown -R www-data: $final_path + +#================================================= +# GENERIC FINALIZATION +#================================================= +# RELOAD NGINX +#================================================= +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 + +ynh_systemd_action --service_name=nginx --action=reload + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_script_progression --message="Restoration completed for $app" --last diff --git a/scripts/upgrade b/scripts/upgrade new file mode 100644 index 0000000..c5d1646 --- /dev/null +++ b/scripts/upgrade @@ -0,0 +1,116 @@ +#!/bin/bash + +#================================================= +# GENERIC START +#================================================= +# IMPORT GENERIC HELPERS +#================================================= + +source /usr/share/yunohost/helpers + +#================================================= +# LOAD SETTINGS +#================================================= +ynh_script_progression --message="Loading installation settings..." --weight=1 + +app=$YNH_APP_INSTANCE_NAME +if [[ "$path_url" != "/" ]] +then + # We use the path url name (e.g. /documents) instead of h5ai for convenience... + final_path=/var/www/$path_url +else + final_path=/var/www/$app +fi + +path_url=$(ynh_app_setting_get --app=$app --key=path) +is_public=$(ynh_app_setting_get --app=$app --key=is_public) +final_path=$(ynh_app_setting_get --app=$app --key=final_path) +domain=$(ynh_app_setting_get --app=$app --key=domain) + +#================================================= +# CHECK VERSION +#================================================= + +upgrade_type=$(ynh_check_app_version_changed) + +#================================================= +# ENSURE DOWNWARD COMPATIBILITY +#================================================= +ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 + +# Fix is_public as a boolean value +if [ "$is_public" = "Yes" ]; then + ynh_app_setting_set --app=$app --key=is_public --value=1 + is_public=1 +elif [ "$is_public" = "No" ]; then + ynh_app_setting_set --app=$app --key=is_public --value=0 + is_public=0 +fi + +# If final_path doesn't exist, create it +if [ -z "$final_path" ]; then + final_path=/var/www/$app + ynh_app_setting_set --app=$app --key=final_path --value=$final_path +fi + +#================================================= +# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +#================================================= +ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1 + +# Backup the current version of the app +ynh_backup_before_upgrade +ynh_clean_setup () { + # restore it if the upgrade fails + ynh_restore_upgradebackup +} +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + +#================================================= +# CHECK THE PATH +#================================================= + +path_url=$(ynh_normalize_url_path --path_url=$path_url) + +#================================================= +# DOWNLOAD, CHECK AND UNPACK SOURCE +#================================================= + +if [ "$upgrade_type" == "UPGRADE_APP" ] +then + ynh_script_progression --message="Upgrading source files..." --weight=4 + + # Download, check integrity, uncompress and patch the source from app.src + ynh_setup_source --dest_dir="$final_path" +fi + +#================================================= +# NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 + +# Create a dedicated nginx config +ynh_add_nginx_config + +#================================================= +# GENERIC FINALIZATION +#================================================= +# SECURE FILES AND DIRECTORIES +#================================================= + +# Set permissions on app files +chown -R www-data: $final_path + +#================================================= +# RELOAD NGINX +#================================================= +ynh_script_progression --message="Reloading NGINX web server..." --weight=1 + +ynh_systemd_action --service_name=nginx --action=reload + +#================================================= +# END OF SCRIPT +#================================================= + +ynh_script_progression --message="Upgrade of $app completed" --last From cd65fa92074497f662f3de8b911fc22e92d6a6d7 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 8 Jul 2020 09:52:15 +0200 Subject: [PATCH 2/6] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index 0cb269b..36a85cf 100644 --- a/manifest.json +++ b/manifest.json @@ -19,7 +19,7 @@ "multi_instance": false, "services": [ "nginx", - "php7-fpm" + "php7.0-fpm" ], "arguments": { "install" : [ From 5adafd455b96a6cc5bce424f2ee08b15adf54edd Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 8 Jul 2020 10:01:37 +0200 Subject: [PATCH 3/6] paragraphs --- README.md | 4 ++-- README_fr.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e26b895..348fcf8 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,8 @@ Screenshot : ## Configuration -After installing the application, you can add documents in `/var/www/documents` (or the corresponding path you choosed). -h5ai doesn't allow to edit or upload new documents directly from the web browser. But you can imagine coupling the folder `/var/www/documents` to Nextcloud or some sort of FTP to allow some users to upload content, and use h5ai as a public read-only interface. +After installing the application, you can add documents in `/var/www/documents` (or the corresponding path you choosed). +h5ai doesn't allow to edit or upload new documents directly from the web browser. But you can imagine coupling the folder `/var/www/documents` to Nextcloud or some sort of FTP to allow some users to upload content, and use h5ai as a public read-only interface. The main configuration file is `_h5ai/private/conf/options.json`. You might want to change some of the documented settings. But there are some more files in `_h5ai/private/conf` you might have a look at. ## Documentation diff --git a/README_fr.md b/README_fr.md index ff855e6..230355b 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,8 +19,8 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install ## Configuration -Après avoir installé l'application, vous pouvez ajouter des documents dans `/var/www/documents` (ou le chemin correspondant que vous avez choisi). -h5ai ne permet pas de modifier ou de télécharger de nouveaux documents directement à partir du navigateur Web. Vous pouvez imaginer coupler le dossier `/var/www/documents` à Nextcloud ou un FTP pour permettre à certains utilisateurs de télécharger du contenu et d'utiliser h5ai comme interface publique en lecture seule. +Après avoir installé l'application, vous pouvez ajouter des documents dans `/var/www/documents` (ou le chemin correspondant que vous avez choisi). +h5ai ne permet pas de modifier ou de télécharger de nouveaux documents directement à partir du navigateur Web. Vous pouvez imaginer coupler le dossier `/var/www/documents` à Nextcloud ou un FTP pour permettre à certains utilisateurs de télécharger du contenu et d'utiliser h5ai comme interface publique en lecture seule. Le fichier de configuration principal est `_h5ai / private / conf / options.json`. Vous souhaiterez peut-être modifier certains des paramètres documentés. Mais il y a d'autres fichiers dans `_h5ai / private / conf` que vous pourriez consulter. ## Documentation From 7914cbaef24e063c4fde02e605c1ca6ee7099ee0 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 8 Jul 2020 13:58:39 +0200 Subject: [PATCH 4/6] Upgrade from last version --- check_process | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/check_process b/check_process index d212967..5f4a9a1 100644 --- a/check_process +++ b/check_process @@ -13,6 +13,7 @@ setup_private=1 setup_public=1 upgrade=1 + upgrade=1 from_commit=73f74039fb63adc555222d73ded6b43a64d41456 backup_restore=1 multi_instance=0 incorrect_path=1 @@ -22,4 +23,8 @@ Level 5=auto ;;; Options Email=alex.aubin@mailoo.org -Notification=down \ No newline at end of file +Notification=down +;;; Upgrade options + ; commit=73f74039fb63adc555222d73ded6b43a64d41456 + name=Update check_process, 24 Jun 2019 + manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& From 95777a06ecd36968a91ec0e44bc6c1280dfe1f92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 8 Jul 2020 22:25:29 +0200 Subject: [PATCH 5/6] Update scripts/backup Co-authored-by: Kayou --- scripts/backup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/backup b/scripts/backup index 14de8e1..c45c6e1 100644 --- a/scripts/backup +++ b/scripts/backup @@ -34,7 +34,7 @@ ynh_print_info --message="Declaring files to be backed up..." # BACKUP THE APP MAIN DIR #================================================= -ynh_backup --src_path="$final_path" +ynh_backup --src_path="$final_path" --is_big #================================================= # BACKUP THE NGINX CONFIGURATION From d4627eb9a16fb70089a5fe7ef8a86b9f2ed9f791 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 11 Jul 2020 23:45:16 +0200 Subject: [PATCH 6/6] permissions --- scripts/install | 5 ++--- scripts/restore | 2 +- scripts/upgrade | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/install b/scripts/install index 21c5c07..d2d49b8 100644 --- a/scripts/install +++ b/scripts/install @@ -58,7 +58,6 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path ynh_script_progression --message="Setting up source files..." --weight=4 # Download, check integrity, uncompress and patch the source from app.src -# For this app sources are in app subdirectory ynh_setup_source "$final_path" #================================================= @@ -67,8 +66,8 @@ ynh_setup_source "$final_path" # SECURE FILES AND DIRECTORIES #================================================= -# Set permissions to phpsysinfo directory -chown -R www-data: "$final_path" +# Restore permissions on app files +chown -R www-data:www-data "$final_path" #================================================= # NGINX CONFIGURATION diff --git a/scripts/restore b/scripts/restore index c5e263e..6371596 100644 --- a/scripts/restore +++ b/scripts/restore @@ -56,7 +56,7 @@ ynh_restore_file --origin_path="$final_path" #================================================= # Restore permissions on app files -chown -R www-data: $final_path +chown -R www-data:www-data "$final_path" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index c5d1646..afb6b80 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -100,7 +100,7 @@ ynh_add_nginx_config #================================================= # Set permissions on app files -chown -R www-data: $final_path +chown -R www-data:www-data "$final_path" #================================================= # RELOAD NGINX