mirror of
https://github.com/YunoHost-Apps/mosquitto_ynh.git
synced 2024-09-03 19:45:54 +02:00
Merge e01a5f1bef
into ff6455717a
This commit is contained in:
commit
7943e56d48
18 changed files with 148 additions and 11 deletions
11
.project
Normal file
11
.project
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>mosquitto_ynh</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
|
@ -6,4 +6,5 @@
|
||||||
- [Lire le README en français](README_fr.md)
|
- [Lire le README en français](README_fr.md)
|
||||||
- [Le o README en galego](README_gl.md)
|
- [Le o README en galego](README_gl.md)
|
||||||
- [Baca README dalam bahasa bahasa Indonesia](README_id.md)
|
- [Baca README dalam bahasa bahasa Indonesia](README_id.md)
|
||||||
|
- [Прочитать README на русский](README_ru.md)
|
||||||
- [阅读中文(简体)的 README](README_zh_Hans.md)
|
- [阅读中文(简体)的 README](README_zh_Hans.md)
|
||||||
|
|
|
@ -19,7 +19,7 @@ It shall NOT be edited by hand.
|
||||||
[Mosquitto](https://mosquitto.org/) gives you interconnect your objects and applications with an open source MQTT broker. Client can publish or subscribe after authentication (username, password).
|
[Mosquitto](https://mosquitto.org/) gives you interconnect your objects and applications with an open source MQTT broker. Client can publish or subscribe after authentication (username, password).
|
||||||
|
|
||||||
|
|
||||||
**Shipped version:** 2.0.14~ynh3
|
**Shipped version:** 2.0.18~ynh1
|
||||||
|
|
||||||
**Demo:** <https://test.mosquitto.org>
|
**Demo:** <https://test.mosquitto.org>
|
||||||
## Documentation and resources
|
## Documentation and resources
|
||||||
|
|
|
@ -19,7 +19,7 @@ No se debe editar a mano.
|
||||||
[Mosquitto](https://mosquitto.org/) gives you interconnect your objects and applications with an open source MQTT broker. Client can publish or subscribe after authentication (username, password).
|
[Mosquitto](https://mosquitto.org/) gives you interconnect your objects and applications with an open source MQTT broker. Client can publish or subscribe after authentication (username, password).
|
||||||
|
|
||||||
|
|
||||||
**Versión actual:** 2.0.14~ynh3
|
**Versión actual:** 2.0.18~ynh1
|
||||||
|
|
||||||
**Demo:** <https://test.mosquitto.org>
|
**Demo:** <https://test.mosquitto.org>
|
||||||
## Documentaciones y recursos
|
## Documentaciones y recursos
|
||||||
|
|
|
@ -19,7 +19,7 @@ EZ editatu eskuz.
|
||||||
[Mosquitto](https://mosquitto.org/) gives you interconnect your objects and applications with an open source MQTT broker. Client can publish or subscribe after authentication (username, password).
|
[Mosquitto](https://mosquitto.org/) gives you interconnect your objects and applications with an open source MQTT broker. Client can publish or subscribe after authentication (username, password).
|
||||||
|
|
||||||
|
|
||||||
**Paketatutako bertsioa:** 2.0.14~ynh3
|
**Paketatutako bertsioa:** 2.0.18~ynh1
|
||||||
|
|
||||||
**Demoa:** <https://test.mosquitto.org>
|
**Demoa:** <https://test.mosquitto.org>
|
||||||
## Dokumentazioa eta baliabideak
|
## Dokumentazioa eta baliabideak
|
||||||
|
|
|
@ -19,7 +19,7 @@ Il NE doit PAS être modifié à la main.
|
||||||
[Mosquitto](https://mosquitto.org/) vous permet d'interconnecter vos objets et applications avec un broker MQTT open source. Le client peut publier ou s'abonner après authentification (nom d'utilisateur, mot de passe).
|
[Mosquitto](https://mosquitto.org/) vous permet d'interconnecter vos objets et applications avec un broker MQTT open source. Le client peut publier ou s'abonner après authentification (nom d'utilisateur, mot de passe).
|
||||||
|
|
||||||
|
|
||||||
**Version incluse :** 2.0.14~ynh3
|
**Version incluse :** 2.0.18~ynh1
|
||||||
|
|
||||||
**Démo :** <https://test.mosquitto.org>
|
**Démo :** <https://test.mosquitto.org>
|
||||||
## Documentations et ressources
|
## Documentations et ressources
|
||||||
|
|
|
@ -19,7 +19,7 @@ NON debe editarse manualmente.
|
||||||
[Mosquitto](https://mosquitto.org/) gives you interconnect your objects and applications with an open source MQTT broker. Client can publish or subscribe after authentication (username, password).
|
[Mosquitto](https://mosquitto.org/) gives you interconnect your objects and applications with an open source MQTT broker. Client can publish or subscribe after authentication (username, password).
|
||||||
|
|
||||||
|
|
||||||
**Versión proporcionada:** 2.0.14~ynh3
|
**Versión proporcionada:** 2.0.18~ynh1
|
||||||
|
|
||||||
**Demo:** <https://test.mosquitto.org>
|
**Demo:** <https://test.mosquitto.org>
|
||||||
## Documentación e recursos
|
## Documentación e recursos
|
||||||
|
|
|
@ -19,7 +19,7 @@ Ini TIDAK boleh diedit dengan tangan.
|
||||||
[Mosquitto](https://mosquitto.org/) gives you interconnect your objects and applications with an open source MQTT broker. Client can publish or subscribe after authentication (username, password).
|
[Mosquitto](https://mosquitto.org/) gives you interconnect your objects and applications with an open source MQTT broker. Client can publish or subscribe after authentication (username, password).
|
||||||
|
|
||||||
|
|
||||||
**Versi terkirim:** 2.0.14~ynh3
|
**Versi terkirim:** 2.0.18~ynh1
|
||||||
|
|
||||||
**Demo:** <https://test.mosquitto.org>
|
**Demo:** <https://test.mosquitto.org>
|
||||||
## Dokumentasi dan sumber daya
|
## Dokumentasi dan sumber daya
|
||||||
|
|
45
README_ru.md
Normal file
45
README_ru.md
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
<!--
|
||||||
|
Важно: этот README был автоматически сгенерирован <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
|
||||||
|
Он НЕ ДОЛЖЕН редактироваться вручную.
|
||||||
|
-->
|
||||||
|
|
||||||
|
# Mosquitto для YunoHost
|
||||||
|
|
||||||
|
[](https://ci-apps.yunohost.org/ci/apps/mosquitto/)  
|
||||||
|
|
||||||
|
[](https://install-app.yunohost.org/?app=mosquitto)
|
||||||
|
|
||||||
|
*[Прочтите этот README на других языках.](./ALL_README.md)*
|
||||||
|
|
||||||
|
> *Этот пакет позволяет Вам установить Mosquitto быстро и просто на YunoHost-сервер.*
|
||||||
|
> *Если у Вас нет YunoHost, пожалуйста, посмотрите [инструкцию](https://yunohost.org/install), чтобы узнать, как установить его.*
|
||||||
|
|
||||||
|
## Обзор
|
||||||
|
|
||||||
|
[Mosquitto](https://mosquitto.org/) gives you interconnect your objects and applications with an open source MQTT broker. Client can publish or subscribe after authentication (username, password).
|
||||||
|
|
||||||
|
|
||||||
|
**Поставляемая версия:** 2.0.18~ynh1
|
||||||
|
|
||||||
|
**Демо-версия:** <https://test.mosquitto.org>
|
||||||
|
## Документация и ресурсы
|
||||||
|
|
||||||
|
- Официальный веб-сайт приложения: <https://mosquitto.org>
|
||||||
|
- Официальная документация администратора: <https://mosquitto.org/documentation/>
|
||||||
|
- Репозиторий кода главной ветки приложения: <https://github.com/eclipse/mosquitto>
|
||||||
|
- Магазин YunoHost: <https://apps.yunohost.org/app/mosquitto>
|
||||||
|
- Сообщите об ошибке: <https://github.com/YunoHost-Apps/mosquitto_ynh/issues>
|
||||||
|
|
||||||
|
## Информация для разработчиков
|
||||||
|
|
||||||
|
Пришлите Ваш запрос на слияние в [ветку `testing`](https://github.com/YunoHost-Apps/mosquitto_ynh/tree/testing).
|
||||||
|
|
||||||
|
Чтобы попробовать ветку `testing`, пожалуйста, сделайте что-то вроде этого:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo yunohost app install https://github.com/YunoHost-Apps/mosquitto_ynh/tree/testing --debug
|
||||||
|
или
|
||||||
|
sudo yunohost app upgrade mosquitto -u https://github.com/YunoHost-Apps/mosquitto_ynh/tree/testing --debug
|
||||||
|
```
|
||||||
|
|
||||||
|
**Больше информации о пакетировании приложений:** <https://yunohost.org/packaging_apps>
|
|
@ -19,7 +19,7 @@
|
||||||
[Mosquitto](https://mosquitto.org/) gives you interconnect your objects and applications with an open source MQTT broker. Client can publish or subscribe after authentication (username, password).
|
[Mosquitto](https://mosquitto.org/) gives you interconnect your objects and applications with an open source MQTT broker. Client can publish or subscribe after authentication (username, password).
|
||||||
|
|
||||||
|
|
||||||
**分发版本:** 2.0.14~ynh3
|
**分发版本:** 2.0.18~ynh1
|
||||||
|
|
||||||
**演示:** <https://test.mosquitto.org>
|
**演示:** <https://test.mosquitto.org>
|
||||||
## 文档与资源
|
## 文档与资源
|
||||||
|
|
|
@ -1,4 +1,37 @@
|
||||||
listener __PORT__
|
log_timestamp_format %Y-%m-%dT%H:%M:%S
|
||||||
|
|
||||||
|
################### Direct IP ###############################################
|
||||||
|
#To use mosquitto with direct IP call and no websocket protocol, uncomment those lines and comment
|
||||||
|
# those for websocket protocol
|
||||||
|
#You will need to open the firewall port with command "sudo yunohost firewall allow TCP __PORT__ --no-upnp"
|
||||||
|
|
||||||
|
#listener __PORT__
|
||||||
|
|
||||||
|
###################SSL CONNECTION###########################################
|
||||||
|
#To use mosquitto with direct IP and SSL connection, uncomment those lines
|
||||||
|
#You will need to open the firewall port with command "sudo yunohost firewall allow TCP __PORT_SSL__ --no-upnp"
|
||||||
|
|
||||||
|
#listener __PORT_SSL__
|
||||||
|
#certfile /etc/yunohost/certs/__DOMAIN__/crt.pem
|
||||||
|
#cafile /etc/yunohost/certs/__DOMAIN__/crt.pem
|
||||||
|
#keyfile /etc/yunohost/certs/__DOMAIN__/key.pem
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
#############################WEBSOCKET AND URL################################
|
||||||
|
#To use mosquitto with websocket protocol and a direct URL call, uncomment those lines and comment
|
||||||
|
#those for direct IP
|
||||||
|
|
||||||
|
listener __PORT__ 127.0.0.1
|
||||||
|
listener __PORT__ ::1
|
||||||
|
|
||||||
|
listener __PORT_WEBSOCKET__
|
||||||
|
protocol websockets
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
allow_anonymous false
|
allow_anonymous false
|
||||||
password_file /etc/mosquitto/passwd
|
password_file /etc/mosquitto/passwd
|
||||||
|
|
12
conf/nginx.conf
Normal file
12
conf/nginx.conf
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||||
|
location __PATH__/ {
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_pass http://127.0.0.1:__PORT__;
|
||||||
|
proxy_buffering off;
|
||||||
|
proxy_read_timeout 90;
|
||||||
|
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
}
|
|
@ -7,7 +7,7 @@ name = "Mosquitto"
|
||||||
description.en = "Interconnect your objects and applications with an open source MQTT broker"
|
description.en = "Interconnect your objects and applications with an open source MQTT broker"
|
||||||
description.fr = "Interconnecter vos objets et vos applications grâce à un serveur MQTT open source"
|
description.fr = "Interconnecter vos objets et vos applications grâce à un serveur MQTT open source"
|
||||||
|
|
||||||
version = "2.0.14~ynh3"
|
version = "2.0.18~ynh1"
|
||||||
|
|
||||||
maintainers = [ "Grena" ]
|
maintainers = [ "Grena" ]
|
||||||
|
|
||||||
|
@ -30,6 +30,17 @@ ram.build = "100M"
|
||||||
ram.runtime = "10M"
|
ram.runtime = "10M"
|
||||||
|
|
||||||
[install]
|
[install]
|
||||||
|
[install.domain]
|
||||||
|
type = "domain"
|
||||||
|
|
||||||
|
[install.path]
|
||||||
|
type = "path"
|
||||||
|
default = "/example"
|
||||||
|
|
||||||
|
[install.init_main_permission]
|
||||||
|
type = "group"
|
||||||
|
default = "visitors"
|
||||||
|
|
||||||
[install.username]
|
[install.username]
|
||||||
ask.en = "Set the username for client authentication"
|
ask.en = "Set the username for client authentication"
|
||||||
ask.fr = "Définissez le nom d'utilisateur pour l'authentification du client"
|
ask.fr = "Définissez le nom d'utilisateur pour l'authentification du client"
|
||||||
|
@ -52,6 +63,9 @@ ram.runtime = "10M"
|
||||||
[resources.ports]
|
[resources.ports]
|
||||||
main.default = 1883
|
main.default = 1883
|
||||||
main.exposed = "TCP"
|
main.exposed = "TCP"
|
||||||
|
websocket.default = 8883
|
||||||
|
ssl.default = 8884
|
||||||
|
|
||||||
|
|
||||||
[resources.apt]
|
[resources.apt]
|
||||||
packages = "mosquitto"
|
packages = "mosquitto"
|
||||||
|
@ -59,4 +73,4 @@ ram.runtime = "10M"
|
||||||
[resources.apt.extras.mosquitto]
|
[resources.apt.extras.mosquitto]
|
||||||
repo = "deb https://repo.mosquitto.org/debian __YNH_DEBIAN_VERSION__ main"
|
repo = "deb https://repo.mosquitto.org/debian __YNH_DEBIAN_VERSION__ main"
|
||||||
key = "http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key"
|
key = "http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key"
|
||||||
packages = ["mosquitto"]
|
packages = ["mosquitto", "mosquitto-clients"]
|
||||||
|
|
|
@ -15,6 +15,12 @@ source /usr/share/yunohost/helpers
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_print_info --message="Declaring files to be backed up..."
|
ynh_print_info --message="Declaring files to be backed up..."
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# BACKUP THE NGINX CONFIGURATION
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC BACKUP
|
# SPECIFIC BACKUP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -37,6 +37,9 @@ chown -R "mosquitto" "/etc/mosquitto"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
|
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
|
||||||
|
|
||||||
|
# Create a dedicated NGINX config using the conf/nginx.conf template
|
||||||
|
ynh_add_nginx_config
|
||||||
|
|
||||||
# Use logrotate to manage application logfile(s)
|
# Use logrotate to manage application logfile(s)
|
||||||
ynh_use_logrotate
|
ynh_use_logrotate
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,8 @@ ynh_systemd_action --service_name="$app" --action="stop"
|
||||||
pkill -u "$app" || true
|
pkill -u "$app" || true
|
||||||
ynh_remove_systemd_config
|
ynh_remove_systemd_config
|
||||||
|
|
||||||
|
ynh_remove_nginx_config
|
||||||
|
|
||||||
# Remove the app-specific logrotate config
|
# Remove the app-specific logrotate config
|
||||||
ynh_remove_logrotate
|
ynh_remove_logrotate
|
||||||
|
|
||||||
|
@ -41,6 +43,7 @@ ynh_secure_remove --file="/etc/mosquitto/passwd"
|
||||||
# Remove the config file
|
# Remove the config file
|
||||||
ynh_secure_remove --file="/etc/mosquitto/conf.d/default.conf"
|
ynh_secure_remove --file="/etc/mosquitto/conf.d/default.conf"
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -15,6 +15,8 @@ source /usr/share/yunohost/helpers
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
|
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
|
||||||
|
|
||||||
|
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
|
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
|
||||||
|
|
||||||
yunohost service add "$app" --description="Allows MQTT clients to send/receive data" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port"
|
yunohost service add "$app" --description="Allows MQTT clients to send/receive data" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port"
|
||||||
|
|
|
@ -30,6 +30,10 @@ if [ -z "${userpass:-}" ]; then
|
||||||
ynh_app_setting_delete --app="$app" --key="password"
|
ynh_app_setting_delete --app="$app" --key="password"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "${domain:-}" ]; then
|
||||||
|
ynh_die --message="This new version requires a domain, please remove and reinstall."
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC UPGRADE
|
# SPECIFIC UPGRADE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -52,6 +56,9 @@ chown -R "mosquitto" "/etc/mosquitto"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
|
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
|
||||||
|
|
||||||
|
# Create a dedicated NGINX config using the conf/nginx.conf template
|
||||||
|
ynh_add_nginx_config
|
||||||
|
|
||||||
# Use logrotate to manage app-specific logfile(s)
|
# Use logrotate to manage app-specific logfile(s)
|
||||||
ynh_use_logrotate --non-append
|
ynh_use_logrotate --non-append
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue