From f5ab76d6bf004f27b4e6b7e3b9eb238a0e0e8ee1 Mon Sep 17 00:00:00 2001 From: Krakinou Date: Wed, 31 Jan 2024 22:51:02 +0100 Subject: [PATCH 1/4] Improve bash syntax --- scripts/backup | 4 ++-- scripts/install | 10 +++++----- scripts/remove | 4 ++-- scripts/restore | 4 ++-- scripts/upgrade | 14 +++++++------- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/scripts/backup b/scripts/backup index c30f632..b64685f 100755 --- a/scripts/backup +++ b/scripts/backup @@ -26,8 +26,8 @@ ynh_backup --src_path="$install_dir" #================================================= ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/api_"$app".conf" -[[ "$domain" != "$mqtt_domain" ]] && ynh_backup --src_path="/etc/nginx/conf.d/$mqtt_domain.d/mqtt_$app.conf" --not_mandatory +ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/api_${app}.conf" +[[ "$domain" != "$mqtt_domain" ]] && ynh_backup --src_path="/etc/nginx/conf.d/$mqtt_domain.d/mqtt_${app}.conf" --not_mandatory #================================================= # SPECIFIC BACKUP diff --git a/scripts/install b/scripts/install index e19734e..4f3a830 100755 --- a/scripts/install +++ b/scripts/install @@ -74,14 +74,14 @@ if [ "$domain" != "$mqtt_domain" ]; then ynh_script_progression --message="Setting up mosquitto..." --weight=5 #Setting up conf file for access - ynh_add_config --template="../conf/domoticz_mosquitto.conf" --destination="/etc/mosquitto/conf.d/"$app"_mosquitto.conf" + ynh_add_config --template="../conf/domoticz_mosquitto.conf" --destination="/etc/mosquitto/conf.d/${app}_mosquitto.conf" chmod 644 /etc/mosquitto/conf.d/"$app"_mosquitto.conf #Setting up user&pwd for mqtt access ynh_app_setting_set --app="$app" --key=mqtt_user --value=$(ynh_string_random --length=8) ynh_app_setting_set --app="$app" --key=mqtt_pwd --value=$(ynh_string_random) - echo $(ynh_app_setting_get --app="$app" --key=mqtt_user):$(ynh_app_setting_get --app="$app" --key=mqtt_pwd) > "/etc/mosquitto/conf.d/"$app"_credentials" - mosquitto_passwd -U "/etc/mosquitto/conf.d/"$app"_credentials" + echo $(ynh_app_setting_get --app="$app" --key=mqtt_user):$(ynh_app_setting_get --app="$app" --key=mqtt_pwd) > "/etc/mosquitto/conf.d/${app}_credentials" + mosquitto_passwd -U "/etc/mosquitto/conf.d/${app}_credentials" ynh_print_info --message="The credential to the mosquitto server has been saved in the settings of the app" else @@ -95,13 +95,13 @@ fi #================================================= ynh_script_progression --message="Configuring NGINX web server..." --weight=2 -[[ "$domain" != "$mqtt_domain" ]] && ynh_add_config --template="../conf/mqtt_nginx.conf" --destination="/etc/nginx/conf.d/"$mqtt_domain".d/mqtt_"$app".conf" +[[ "$domain" != "$mqtt_domain" ]] && ynh_add_config --template="../conf/mqtt_nginx.conf" --destination="/etc/nginx/conf.d/${mqtt_domain}.d/mqtt_${app}.conf" #Set Hook for nginx domain cp -R ../sources/hooks/conf_regen/95-nginx_domoticz /usr/share/yunohost/hooks/conf_regen/ # Create a dedicated NGINX config -ynh_add_config --template="api_nginx.conf" --destination="/etc/nginx/conf.d/"$domain".d/api_"$app".conf" +ynh_add_config --template="api_nginx.conf" --destination="/etc/nginx/conf.d/${domain}.d/api_${app}.conf" ynh_add_nginx_config diff --git a/scripts/remove b/scripts/remove index 357cb48..a121f69 100755 --- a/scripts/remove +++ b/scripts/remove @@ -20,7 +20,7 @@ if [ "$domain" != "$mqtt_domain" ]; then yunohost service remove mosquitto ynh_secure_remove --file="/etc/mosquitto/conf.d" ynh_secure_remove --file="/usr/share/yunohost/hooks/conf_regen/95-nginx_domoticz" - ynh_secure_remove --file="/etc/nginx/conf.d/"$mqtt_domain".d/mqtt_"$app".conf" + ynh_secure_remove --file="/etc/nginx/conf.d/${mqtt_domain}.d/mqtt_${app}.conf" yunohost tools regen-conf postfix ynh_secure_remove --file="/var/log/mosquitto" fi @@ -35,7 +35,7 @@ fi # Remove the dedicated systemd config ynh_remove_systemd_config -ynh_secure_remove --file="/etc/nginx/conf.d/"$domain".d/api_"$app".conf" +ynh_secure_remove --file="/etc/nginx/conf.d/${domain}.d/api_${app}.conf" ynh_remove_nginx_config ynh_remove_logrotate diff --git a/scripts/restore b/scripts/restore index e5c2de0..0c13bfd 100755 --- a/scripts/restore +++ b/scripts/restore @@ -36,8 +36,8 @@ ynh_app_setting_set --app="$app" --key=mach --value="$current_mach" ynh_script_progression --message="Restoring the NGINX web server configuration..." ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -ynh_restore_file --origin_path="/etc/nginx/conf.d/"$domain".d/api_"$app".conf" -ynh_restore_file --origin_path="/etc/nginx/conf.d/$mqtt_domain.d/mqtt_$app.conf" --not_mandatory +ynh_restore_file --origin_path="/etc/nginx/conf.d/${domain}.d/api_${app}.conf" +ynh_restore_file --origin_path="/etc/nginx/conf.d/$mqtt_domain.d/mqtt_${app}.conf" --not_mandatory #================================================= # RECREATE THE DEDICATED USER diff --git a/scripts/upgrade b/scripts/upgrade index ee61431..dfa6020 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -109,16 +109,16 @@ if [ "$domain" != "$mqtt_domain" ]; then ynh_script_progression --message="Setting up mosquitto..." --weight=5 #Setting up conf file for access - if [ ! -f "/etc/mosquitto/conf.d/"$app"_mosquitto.conf" ] + if [ ! -f "/etc/mosquitto/conf.d/${app}_mosquitto.conf" ] then - ynh_add_config --template="../conf/domoticz_mosquitto.conf" --destination="/etc/mosquitto/conf.d/"$app"_mosquitto.conf" + ynh_add_config --template="../conf/domoticz_mosquitto.conf" --destination="/etc/mosquitto/conf.d/${app}_mosquitto.conf" chmod 644 /etc/mosquitto/conf.d/"$app"_mosquitto.conf #Setting up user&pwd for mqtt access ynh_app_setting_set --app="$app" --key=mqtt_user --value=$(ynh_string_random --length=8) ynh_app_setting_set --app="$app" --key=mqtt_pwd --value=$(ynh_string_random) - echo $(ynh_app_setting_get --app="$app" --key=mqtt_user):$(ynh_app_setting_get --app="$app" --key=mqtt_pwd) > "/etc/mosquitto/conf.d/"$app"_credentials" - mosquitto_passwd -U "/etc/mosquitto/conf.d/"$app"_credentials" + echo $(ynh_app_setting_get --app="$app" --key=mqtt_user):$(ynh_app_setting_get --app="$app" --key=mqtt_pwd) > "/etc/mosquitto/conf.d/${app}_credentials" + mosquitto_passwd -U "/etc/mosquitto/conf.d/${app}_credentials" ynh_print_info --message="The credential to the mosquitto server has been saved in the settings of the app" fi @@ -132,17 +132,17 @@ fi #================================================= ynh_script_progression --message="Upgrading NGINX web server configuration..." -[[ "$domain" != "$mqtt_domain" ]] && ynh_add_config --template="../conf/mqtt_nginx.conf" --destination="/etc/nginx/conf.d/"$mqtt_domain".d/mqtt_"$app".conf" +[[ "$domain" != "$mqtt_domain" ]] && ynh_add_config --template="../conf/mqtt_nginx.conf" --destination="/etc/nginx/conf.d/${mqtt_domain}.d/mqtt_${app}.conf" #Set Hook for nginx domain cp -R ../sources/hooks/conf_regen/95-nginx_domoticz /usr/share/yunohost/hooks/conf_regen/ # Create a dedicated NGINX config -if [[ ! -f "/etc/nginx/conf.d/"$domain".d/api_"$app".conf" ]] +if [[ ! -f "/etc/nginx/conf.d/${domain}.d/api_${app}.conf" ]] then ynh_print_warn --message="The nginx conf file will now be splitted between standard and api related path" ynh_print_warn --message="Report any manual changes on the new /etc/nginx/conf.d/$domain.d/api_$app.conf file for json command to keep working" - ynh_add_config --template="api_nginx.conf" --destination="/etc/nginx/conf.d/"$domain".d/api_"$app".conf" + ynh_add_config --template="api_nginx.conf" --destination="/etc/nginx/conf.d/${domain}.d/api_${app}.conf" fi ynh_add_nginx_config From faa4cc9a0478ac393f5df2e094c9bc80430c22d4 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> Date: Tue, 19 Mar 2024 20:02:43 +0100 Subject: [PATCH 2/4] Rename POST_INTALL.md to POST_INSTALL.md --- doc/{POST_INTALL.md => POST_INSTALL.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename doc/{POST_INTALL.md => POST_INSTALL.md} (100%) diff --git a/doc/POST_INTALL.md b/doc/POST_INSTALL.md similarity index 100% rename from doc/POST_INTALL.md rename to doc/POST_INSTALL.md From d2570c10fb7d33ac0665b1940fed99a56d2f6dd4 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Tue, 19 Mar 2024 19:02:46 +0000 Subject: [PATCH 3/4] Auto-update README --- README.md | 17 ++++++++--------- README_fr.md | 19 +++++++++---------- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index f231c7a..35a593f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ @@ -32,7 +32,6 @@ For example this system can be used with: The MQTT broker Mosquitto is integrated into the package and requires its own domain or subdomain. It's an optional setting. You may also install the [Mosquitto package](https://github.com/YunoHost-Apps/mosquitto_ynh) without using the one provided by domoticz_ynh. - **Shipped version:** 2024.4~ynh1 ## Screenshots @@ -42,12 +41,12 @@ You may also install the [Mosquitto package](https://github.com/YunoHost-Apps/mo ## Documentation and resources -* Official app website: -* Official user documentation: -* Official admin documentation: -* Upstream app code repository: -* YunoHost Store: -* Report a bug: +- Official app website: +- Official user documentation: +- Official admin documentation: +- Upstream app code repository: +- YunoHost Store: +- Report a bug: ## Developer info @@ -55,7 +54,7 @@ Please send your pull request to the [testing branch](https://github.com/YunoHos To try the testing branch, please proceed like that. -``` bash +```bash sudo yunohost app install https://github.com/YunoHost-Apps/domoticz_ynh/tree/testing --debug or sudo yunohost app upgrade domoticz -u https://github.com/YunoHost-Apps/domoticz_ynh/tree/testing --debug diff --git a/README_fr.md b/README_fr.md index 76da64f..cd0ef43 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,5 +1,5 @@ @@ -34,7 +34,6 @@ Vous pouvez également installer le [package pour Mosquitto](https://github.com/ - **Version incluse :** 2024.4~ynh1 ## Captures d’écran @@ -44,12 +43,12 @@ Vous pouvez également installer le [package pour Mosquitto](https://github.com/ ## Documentations et ressources -* Site officiel de l’app : -* Documentation officielle utilisateur : -* Documentation officielle de l’admin : -* Dépôt de code officiel de l’app : -* YunoHost Store: -* Signaler un bug : +- Site officiel de l’app : +- Documentation officielle utilisateur : +- Documentation officielle de l’admin : +- Dépôt de code officiel de l’app : +- YunoHost Store : +- Signaler un bug : ## Informations pour les développeurs @@ -57,10 +56,10 @@ Merci de faire vos pull request sur la [branche testing](https://github.com/Yuno Pour essayer la branche testing, procédez comme suit. -``` bash +```bash sudo yunohost app install https://github.com/YunoHost-Apps/domoticz_ynh/tree/testing --debug ou sudo yunohost app upgrade domoticz -u https://github.com/YunoHost-Apps/domoticz_ynh/tree/testing --debug ``` -**Plus d’infos sur le packaging d’applications :** \ No newline at end of file +**Plus d’infos sur le packaging d’applications :** From e0dd39458610975a1335c7ebbc3007b27dc0ceb6 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 6 Apr 2024 15:26:56 +0000 Subject: [PATCH 4/4] Auto-update READMEs --- ALL_README.md | 2 +- README.md | 3 ++- README_eu.md | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++ README_fr.md | 5 +++- 4 files changed, 71 insertions(+), 3 deletions(-) create mode 100644 README_eu.md diff --git a/ALL_README.md b/ALL_README.md index 3d6c579..77b7509 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -1,6 +1,6 @@ # All available README files by language - [Read the README in English](README.md) +- [Irakurri README euskaraz](README_eu.md) - [Lire le README en français](README_fr.md) - [Le o README en galego](README_gl.md) -- [Leggi il “README” in italiano](README_it.md) diff --git a/README.md b/README.md index 397324f..a2674b1 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ It shall NOT be edited by hand. [![Install Domoticz with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=domoticz) -*[Read this README is other languages.](./ALL_README.md)* +*[Read this README in other languages.](./ALL_README.md)* > *This package allows you to install Domoticz 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.* @@ -32,6 +32,7 @@ For example this system can be used with: The MQTT broker Mosquitto is integrated into the package and requires its own domain or subdomain. It's an optional setting. You may also install the [Mosquitto package](https://github.com/YunoHost-Apps/mosquitto_ynh) without using the one provided by domoticz_ynh. + **Shipped version:** 2024.4~ynh1 ## Screenshots diff --git a/README_eu.md b/README_eu.md new file mode 100644 index 0000000..5d10a8f --- /dev/null +++ b/README_eu.md @@ -0,0 +1,64 @@ + + +# Domoticz YunoHost-erako + +[![Integrazio maila](https://dash.yunohost.org/integration/domoticz.svg)](https://dash.yunohost.org/appci/app/domoticz) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/domoticz.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/domoticz.maintain.svg) + +[![Instalatu Domoticz YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=domoticz) + +*[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)* + +> *Pakete honek Domoticz YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.* +> *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.* + +## Aurreikuspena + +Domoticz is a Home Automation system design to control various devices and receive input from various sensors. +For example this system can be used with: + +* Light switches +* Door sensors +* Doorbells +* Security devices +* Weather sensors like: UV/Rain/Wind Meters +* Temperature Sensors +* Pulse Meters +* Voltage / AD Meters +* And more... + + +The MQTT broker Mosquitto is integrated into the package and requires its own domain or subdomain. It's an optional setting. +You may also install the [Mosquitto package](https://github.com/YunoHost-Apps/mosquitto_ynh) without using the one provided by domoticz_ynh. + +**Paketatutako bertsioa:** 2024.4~ynh1 + +## Pantaila-argazkiak + +![Domoticz(r)en pantaila-argazkia](./doc/screenshots/domoticz_Switches_screen.png) +![Domoticz(r)en pantaila-argazkia](./doc/screenshots/domoticz_floorplan_machineon.png) + +## Dokumentazioa eta baliabideak + +- Aplikazioaren webgune ofiziala: +- Erabiltzaileen dokumentazio ofiziala: +- Administratzaileen dokumentazio ofiziala: +- Jatorrizko aplikazioaren kode-gordailua: +- YunoHost Denda: +- Eman errore baten berri: + +## Garatzaileentzako informazioa + +Bidali `pull request`a [`testing` abarrera](https://github.com/YunoHost-Apps/domoticz_ynh/tree/testing). + +`testing` abarra probatzeko, ondorengoa egin: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/domoticz_ynh/tree/testing --debug +edo +sudo yunohost app upgrade domoticz -u https://github.com/YunoHost-Apps/domoticz_ynh/tree/testing --debug +``` + +**Informazio gehiago aplikazioaren paketatzeari buruz:** diff --git a/README_fr.md b/README_fr.md index a89d0c6..45e5d38 100644 --- a/README_fr.md +++ b/README_fr.md @@ -32,6 +32,9 @@ Il peut par exemple être utilisé avec : Le broker MQTT Mosquitto est intégré au package et nécessite un sous-domaine ou un domaine distinct. Il est optionnel. Vous pouvez également installer le [package pour Mosquitto](https://github.com/YunoHost-Apps/mosquitto_ynh) sans utiliser celui de domoticz_ynh. + + + **Version incluse :** 2024.4~ynh1 ## Captures d’écran @@ -60,4 +63,4 @@ ou sudo yunohost app upgrade domoticz -u https://github.com/YunoHost-Apps/domoticz_ynh/tree/testing --debug ``` -**Plus d’infos sur le packaging d’applications :** \ No newline at end of file +**Plus d’infos sur le packaging d’applications :**