diff --git a/ALL_README.md b/ALL_README.md index 3eeb161..8938aae 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -1,5 +1,8 @@ # All available README files by language - [Read the README in English](README.md) +- [Lee 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) +- [阅读中文(简体)的 README](README_zh_Hans.md) diff --git a/README.md b/README.md index 6f5862f..008e60c 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ It shall NOT be edited by hand. Cjdns implements an encrypted IPv6 network using public-key cryptography for address allocation and a distributed hash table for routing. This provides near-zero-configuration networking, and prevents many of the security and scalability issues that plague existing networks. -**Shipped version:** 22.7~ynh1 +**Shipped version:** 22.7~ynh2 ## Screenshots diff --git a/README_es.md b/README_es.md new file mode 100644 index 0000000..d670b4f --- /dev/null +++ b/README_es.md @@ -0,0 +1,46 @@ + + +# Cjdns para Yunohost + +[![Nivel de integración](https://dash.yunohost.org/integration/cjdns.svg)](https://dash.yunohost.org/appci/app/cjdns) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/cjdns.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/cjdns.maintain.svg) + +[![Instalar Cjdns con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=cjdns) + +*[Leer este README en otros idiomas.](./ALL_README.md)* + +> *Este paquete le permite instalarCjdns 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 + +Cjdns implements an encrypted IPv6 network using public-key cryptography for address allocation and a distributed hash table for routing. This provides near-zero-configuration networking, and prevents many of the security and scalability issues that plague existing networks. + + +**Versión actual:** 22.7~ynh2 + +## Capturas + +![Captura de Cjdns](./doc/screenshots/screenshot.png) + +## Documentaciones y recursos + +- 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/cjdns_ynh/tree/testing + +Para probar la rama `testing`, sigue asÍ: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/cjdns_ynh/tree/testing --debug +o +sudo yunohost app upgrade cjdns -u https://github.com/YunoHost-Apps/cjdns_ynh/tree/testing --debug +``` + +**Mas informaciones sobre el empaquetado de aplicaciones:** diff --git a/README_eu.md b/README_eu.md index 1c00599..43f91e3 100644 --- a/README_eu.md +++ b/README_eu.md @@ -19,7 +19,7 @@ EZ editatu eskuz. Cjdns implements an encrypted IPv6 network using public-key cryptography for address allocation and a distributed hash table for routing. This provides near-zero-configuration networking, and prevents many of the security and scalability issues that plague existing networks. -**Paketatutako bertsioa:** 22.7~ynh1 +**Paketatutako bertsioa:** 22.7~ynh2 ## Pantaila-argazkiak diff --git a/README_fr.md b/README_fr.md index 384ca37..bda16ff 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Il NE doit PAS être modifié à la main. Cjdns implémente un réseau IPv6 crypté utilisant une cryptographie à clé publique pour l'attribution des adresses et une table de hachage distribuée pour le routage. Cela fournit une configuration réseau proche de zéro et évite de nombreux problèmes de sécurité et d'évolutivité qui affectent les réseaux existants. -**Version incluse :** 22.7~ynh1 +**Version incluse :** 22.7~ynh2 ## Captures d’écran diff --git a/README_gl.md b/README_gl.md new file mode 100644 index 0000000..58ed5ae --- /dev/null +++ b/README_gl.md @@ -0,0 +1,46 @@ + + +# Cjdns para YunoHost + +[![Nivel de integración](https://dash.yunohost.org/integration/cjdns.svg)](https://dash.yunohost.org/appci/app/cjdns) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/cjdns.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/cjdns.maintain.svg) + +[![Instalar Cjdns con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=cjdns) + +*[Le este README en outros idiomas.](./ALL_README.md)* + +> *Este paquete permíteche instalar Cjdns de xeito rápido e doado nun servidor YunoHost.* +> *Se non usas YunoHost, le a [documentación](https://yunohost.org/install) para saber como instalalo.* + +## Vista xeral + +Cjdns implements an encrypted IPv6 network using public-key cryptography for address allocation and a distributed hash table for routing. This provides near-zero-configuration networking, and prevents many of the security and scalability issues that plague existing networks. + + +**Versión proporcionada:** 22.7~ynh2 + +## Capturas de pantalla + +![Captura de pantalla de Cjdns](./doc/screenshots/screenshot.png) + +## Documentación e recursos + +- Repositorio de orixe do código: +- Tenda YunoHost: +- Informar dun problema: + +## Info de desenvolvemento + +Envía a túa colaboración á [rama `testing`](https://github.com/YunoHost-Apps/cjdns_ynh/tree/testing). + +Para probar a rama `testing`, procede deste xeito: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/cjdns_ynh/tree/testing --debug +ou +sudo yunohost app upgrade cjdns -u https://github.com/YunoHost-Apps/cjdns_ynh/tree/testing --debug +``` + +**Máis info sobre o empaquetado da app:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md new file mode 100644 index 0000000..8defd8c --- /dev/null +++ b/README_zh_Hans.md @@ -0,0 +1,46 @@ + + +# YunoHost 上的 Cjdns + +[![集成程度](https://dash.yunohost.org/integration/cjdns.svg)](https://dash.yunohost.org/appci/app/cjdns) ![工作状态](https://ci-apps.yunohost.org/ci/badges/cjdns.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/cjdns.maintain.svg) + +[![使用 YunoHost 安装 Cjdns](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=cjdns) + +*[阅读此 README 的其它语言版本。](./ALL_README.md)* + +> *通过此软件包,您可以在 YunoHost 服务器上快速、简单地安装 Cjdns。* +> *如果您还没有 YunoHost,请参阅[指南](https://yunohost.org/install)了解如何安装它。* + +## 概况 + +Cjdns implements an encrypted IPv6 network using public-key cryptography for address allocation and a distributed hash table for routing. This provides near-zero-configuration networking, and prevents many of the security and scalability issues that plague existing networks. + + +**分发版本:** 22.7~ynh2 + +## 截图 + +![Cjdns 的截图](./doc/screenshots/screenshot.png) + +## 文档与资源 + +- 上游应用代码库: +- YunoHost 商店: +- 报告 bug: + +## 开发者信息 + +请向 [`testing` 分支](https://github.com/YunoHost-Apps/cjdns_ynh/tree/testing) 发送拉取请求。 + +如要尝试 `testing` 分支,请这样操作: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/cjdns_ynh/tree/testing --debug +或 +sudo yunohost app upgrade cjdns -u https://github.com/YunoHost-Apps/cjdns_ynh/tree/testing --debug +``` + +**有关应用打包的更多信息:** diff --git a/doc/ADMIN.md b/doc/ADMIN.md index b3b4ccc..a2bf58d 100644 --- a/doc/ADMIN.md +++ b/doc/ADMIN.md @@ -4,4 +4,4 @@ 2. Obtain your cjdns IPv6 address by navigating to Tools -> Logs -> Click on "Install the 'cjdns' app." Your IPv6 address should be displayed in the log. 3. Reboot your YunoHost server to make the tun device available. Navigate to Tools->Shutdown and click Reboot. 4. Navigate to Tools -> Yunohost Settings -> Security, and under NGINX, disable "Force HTTPS." Click Save to apply the changes. -5. Finally edit `/etc/nginx/conf.d/[your-domain].conf`, add your cjdns-ipv6 to the list of `server_name`. +5. Finally edit `/etc/nginx/conf.d/__DOMAIN__.conf`, add your cjdns-ipv6 to the list of `server_name`. diff --git a/manifest.toml b/manifest.toml index 093d9f2..b614583 100644 --- a/manifest.toml +++ b/manifest.toml @@ -6,7 +6,7 @@ name = "Cjdns" description.en = "Encrypted IPv6 network" description.fr = "Réseau IPv6 chiffré" -version = "22.7~ynh1" +version = "22.7~ynh2" maintainers = ["dkoukoul"] @@ -41,8 +41,6 @@ ram.runtime = "50M" [resources.system_user] [resources.install_dir] - - [resources.data_dir] [resources.ports] diff --git a/scripts/install b/scripts/install index bec5528..97acc49 100755 --- a/scripts/install +++ b/scripts/install @@ -23,11 +23,10 @@ chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" chmod +x "$install_dir/cjdroute" -# mv $install_dir/cjdroute $data_dir/cjdroute #================================================= # CONFIGURING CJDNS #================================================= -ynh_script_progression --message="Configuring cjdns..." --weight=1 +ynh_script_progression --message="Configuring $app..." --weight=1 $install_dir/cjdroute --genconf | $install_dir/cjdroute --cleanconf > $install_dir/cjdroute.conf @@ -37,13 +36,14 @@ jq '.noBackground = 1' $install_dir/cjdroute.conf > $install_dir/cjdroute.conf.t #================================================= # UPGRADE PEERS #================================================= -ynh_script_progression --message="Getting cjdns peers..." --weight=1 +ynh_script_progression --message="Getting $app peers..." --weight=1 + # Fetch the JSON data json=$(curl -s -A "ynh" https://vpn.anode.co/api/0.4/vpn/cjdns/peeringlines/) echo "Got peering lines" length=$(echo $json | jq '. | length') -ynh_script_progression --message="Adding $length cjdns peers..." --weight=1 +ynh_script_progression --message="Adding $length $app peers..." --weight=1 for (( i=0; i<$length; i++ )) do # Parse the JSON data @@ -70,9 +70,9 @@ cjdns_ipv6=$(jq -r '.ipv6' < $install_dir/cjdroute.conf) ynh_app_setting_set --app=$app --key=cjdns_ipv6 --value=$cjdns_ipv6 #================================================= -# SETUP SYSTEMD +# APP INITIAL CONFIGURATION #================================================= -ynh_script_progression --message="Configuring cjdns systemd service..." +ynh_script_progression --message="Adding $app's configuration files..." --weight=1 # Create a dedicated systemd config ynh_add_systemd_config @@ -80,29 +80,16 @@ ynh_add_systemd_config # Use logrotate to manage application logfile(s) ynh_use_logrotate -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating cjdns service in YunoHost..." - yunohost service add $app --description="Encrypted IPv6 network" --log="/var/log/$app/$app.log" -#================================================= -# GENERIC FINALIZATION #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Launching cjdns service..." --weight=1 +ynh_script_progression --message="Starting $app's systemd service..." --weight=1 # Start a systemd service ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" -#================================================= -# MAKE WORDPRESS AVAILABLE ON CJDNS -#================================================= - -yunohost tools shell -c "from yunohost.permission import permission_url; permission_url('wordpress.main', add_url=['re:^.fc.*'])" - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/remove b/scripts/remove index f6ffecb..0be0b59 100755 --- a/scripts/remove +++ b/scripts/remove @@ -9,7 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers - #================================================= # REMOVE SYSTEM CONFIGURATIONS #================================================= @@ -26,16 +25,10 @@ fi ynh_remove_systemd_config -# ================================================= -# STOP AND REMOVE SERVICE -#================================================= -ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1 - killall cjdroute -# Remove other various files specific to the app... such as : +# Remove other various files specific to the app... ynh_secure_remove --file="/var/log/$app" -ynh_secure_remove --file="$install_dir" #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index 9a91205..bedb02b 100755 --- a/scripts/restore +++ b/scripts/restore @@ -19,19 +19,10 @@ ynh_restore_file --origin_path="$install_dir" chown -R $app:www-data "$install_dir" -#================================================= -# RESTORE THE DATA DIRECTORY -#================================================= -ynh_script_progression --message="Restoring the data directory..." --weight=1 - -ynh_restore_file --origin_path="$data_dir" --not_mandatory - -# (Same as for install dir) -chown -R $app:www-data "$data_dir" - #================================================= # RESTORE SYSTEM CONFIGURATIONS #================================================= +ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet @@ -48,4 +39,4 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" # END OF SCRIPT #================================================= -ynh_script_progression --message="Restoration completed for $app" --last \ No newline at end of file +ynh_script_progression --message="Restoration completed for $app" --last diff --git a/scripts/upgrade b/scripts/upgrade index d190780..3c0aac8 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -9,16 +9,10 @@ source _common.sh source /usr/share/yunohost/helpers -upgrade_type=$(ynh_check_app_version_changed) - -#================================================= -# STANDARD UPGRADE STEPS -#================================================= - #================================================= # STOP SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Stopping a systemd service..." --weight=1 +ynh_script_progression --message="Stopping $app's systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" @@ -27,28 +21,25 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= +ynh_script_progression --message="Upgrading source files..." --weight=1 -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_script_progression --message="Installing latest version..." --weight=1 - ynh_setup_source --dest_dir="$install_dir" -fi +ynh_setup_source --dest_dir="$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" chmod +x "$install_dir/cjdroute" #================================================= -# INTEGRATE SERVICE IN YUNOHOST +# UPDATE A CONFIG FILE #================================================= -ynh_script_progression --message="Integrating cjdns service in YunoHost..." +ynh_script_progression --message="Updating $app's configuration files..." --weight=1 yunohost service add $app --description="Encrypted IPv6 network" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Restarting cjdns service..." --weight=1 +ynh_script_progression --message="Starting $app's systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="restart" --log_path="systemd"