From cb99c92764e5bf00cfda69f6420b36aa6cf61f4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 17 Jun 2024 22:43:50 +0200 Subject: [PATCH 1/3] cleaning --- conf/systemd.service | 4 ++-- scripts/backup | 4 ---- scripts/install | 7 +++---- scripts/remove | 5 ++--- scripts/upgrade | 16 +++------------- 5 files changed, 10 insertions(+), 26 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index 94ad361..5c78a8e 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,8 +7,8 @@ Type=simple User=__APP__ Group=__APP__ Environment=NODE_PORT=__PORT__ -WorkingDirectory=__INSTALL_DIR__ -Environment=PATH=__ENV_PATH__ +WorkingDirectory=__INSTALL_DIR__/ +Environment="__YNH_NODE_LOAD_PATH__" Environment=NODE_ENV=production ExecStart=__YNH_NPM__ run start diff --git a/scripts/backup b/scripts/backup index f8e82aa..a032119 100755 --- a/scripts/backup +++ b/scripts/backup @@ -27,10 +27,6 @@ ynh_backup --src_path="$install_dir" ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# BACKUP SYSTEMD -#================================================= - ynh_backup --src_path="/etc/systemd/system/$app.service" #================================================= diff --git a/scripts/install b/scripts/install index c6b81ab..41ce49c 100755 --- a/scripts/install +++ b/scripts/install @@ -33,7 +33,7 @@ ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version #================================================= ynh_script_progression --message="Adding a configuration file..." --weight=1 -ynh_add_config --template="../conf/.env" --destination="$install_dir/.env" +ynh_add_config --template=".env" --destination="$install_dir/.env" chmod 400 "$install_dir/.env" chown $app:$app "$install_dir/.env" @@ -45,8 +45,8 @@ ynh_script_progression --message="Installing $app..." --weight=10 pushd $install_dir ynh_use_nodejs - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH npm install - ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH npm run build + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm install + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm run build popd chmod -R 750 "$install_dir" @@ -61,7 +61,6 @@ ynh_script_progression --message="Configuring a systemd service..." --weight=3 # Create a dedicated NGINX config ynh_add_nginx_config -env_path="$PATH" # Create a dedicated systemd config ynh_add_systemd_config diff --git a/scripts/remove b/scripts/remove index 04dca7f..d2f5c3e 100755 --- a/scripts/remove +++ b/scripts/remove @@ -10,10 +10,9 @@ source _common.sh source /usr/share/yunohost/helpers #================================================= -# STANDARD REMOVE -#================================================= -# REMOVE SERVICE INTEGRATION IN YUNOHOST +# REMOVE SYSTEM CONFIGURATIONS #================================================= +ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 # Remove the service from the list of services known by YunoHost (added from `yunohost service add`) if ynh_exec_warn_less yunohost service status $app >/dev/null diff --git a/scripts/upgrade b/scripts/upgrade index b4142f4..b6faa97 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,12 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -27,14 +21,10 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." --weight=4 -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="$install_dir" --keep=".env" -fi +# Download, check integrity, uncompress and patch the source from app.src +ynh_setup_source --dest_dir="$install_dir" --keep=".env" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" From dceef86f0dd5f273094ad1265193c650eda5e7b9 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 17 Jun 2024 20:43:55 +0000 Subject: [PATCH 2/3] Auto-update READMEs --- ALL_README.md | 1 + README_es.md | 50 +++++++++++++++++++++++++++++++++++++++++++++++ README_zh_Hans.md | 2 +- 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 README_es.md diff --git a/ALL_README.md b/ALL_README.md index a01b345..152f2e7 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -1,6 +1,7 @@ # All available README files by language - [Read the README in English](README.md) +- [Lea el README en español](README_es.md) - [Irakurri README euskaraz](README_eu.md) - [Lire le README en français](README_fr.md) - [Le o README en galego](README_gl.md) diff --git a/README_es.md b/README_es.md new file mode 100644 index 0000000..35623fe --- /dev/null +++ b/README_es.md @@ -0,0 +1,50 @@ + + +# Hat.sh para Yunohost + +[![Nivel de integración](https://dash.yunohost.org/integration/hat.svg)](https://dash.yunohost.org/appci/app/hat) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/hat.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/hat.maintain.svg) + +[![Instalar Hat.sh con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=hat) + +*[Leer este README en otros idiomas.](./ALL_README.md)* + +> *Este paquete le permite instalarHat.sh rapidamente y simplement en un servidor YunoHost.* +> *Si no tiene YunoHost, visita [the guide](https://yunohost.org/install) para aprender como instalarla.* + +## Descripción general + +Hat.sh is a web app that provides secure local file encryption in the browser. It's fast, secure, and uses modern cryptographic algorithms with chunked AEAD stream encryption/decryption. + + +**Versión actual:** 2.3.6~ynh3 + +**Demo:** + +## Capturas + +![Captura de Hat.sh](./doc/screenshots/screenshot.png) + +## Documentaciones y recursos + +- Sitio web oficial: +- Documentación administrador oficial: +- Repositorio del código fuente oficial de la aplicación : +- Catálogo YunoHost: +- Reportar un error: + +## Información para desarrolladores + +Por favor enviar sus correcciones a la [`branch testing`](https://github.com/YunoHost-Apps/hat_ynh/tree/testing + +Para probar la rama `testing`, sigue asÍ: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/hat_ynh/tree/testing --debug +o +sudo yunohost app upgrade hat -u https://github.com/YunoHost-Apps/hat_ynh/tree/testing --debug +``` + +**Mas informaciones sobre el empaquetado de aplicaciones:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index e27758a..85d5e6d 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -3,7 +3,7 @@ 请勿手动编辑。 --> -# YunoHost 的 Hat.sh +# YunoHost 上的 Hat.sh [![集成程度](https://dash.yunohost.org/integration/hat.svg)](https://dash.yunohost.org/appci/app/hat) ![工作状态](https://ci-apps.yunohost.org/ci/badges/hat.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/hat.maintain.svg) From 79b141d1a42a486d360c4b711d306d1e9b1bcb36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 17 Jun 2024 22:44:11 +0200 Subject: [PATCH 3/3] Update upgrade --- scripts/upgrade | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index b6faa97..c285f71 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -40,7 +40,6 @@ ynh_add_nginx_config # Install Nodejs ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version -env_path="$PATH" # Create a dedicated systemd config ynh_add_systemd_config