1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/cjdns_ynh.git synced 2024-09-03 18:16:29 +02:00

Merge pull request #16 from YunoHost-Apps/testing

cleaning
This commit is contained in:
eric_G 2024-05-16 10:43:09 +02:00 committed by GitHub
commit 02296a9fb0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 162 additions and 61 deletions

View file

@ -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)

View file

@ -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

46
README_es.md Normal file
View file

@ -0,0 +1,46 @@
<!--
Este archivo README esta generado automaticamente<https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
No se debe editar a mano.
-->
# 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 : <https://github.com/cjdelisle/cjdns/>
- Catálogo YunoHost: <https://apps.yunohost.org/app/cjdns>
- Reportar un error: <https://github.com/YunoHost-Apps/cjdns_ynh/issues>
## 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:** <https://yunohost.org/packaging_apps>

View file

@ -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

View file

@ -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

46
README_gl.md Normal file
View file

@ -0,0 +1,46 @@
<!--
NOTA: Este README foi creado automáticamente por <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>
NON debe editarse manualmente.
-->
# 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: <https://github.com/cjdelisle/cjdns/>
- Tenda YunoHost: <https://apps.yunohost.org/app/cjdns>
- Informar dun problema: <https://github.com/YunoHost-Apps/cjdns_ynh/issues>
## 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:** <https://yunohost.org/packaging_apps>

46
README_zh_Hans.md Normal file
View file

@ -0,0 +1,46 @@
<!--
注意:此 README 由 <https://github.com/YunoHost/apps/tree/master/tools/readme_generator> 自动生成
请勿手动编辑。
-->
# 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)
## 文档与资源
- 上游应用代码库: <https://github.com/cjdelisle/cjdns/>
- YunoHost 商店: <https://apps.yunohost.org/app/cjdns>
- 报告 bug <https://github.com/YunoHost-Apps/cjdns_ynh/issues>
## 开发者信息
请向 [`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
```
**有关应用打包的更多信息:** <https://yunohost.org/packaging_apps>

View file

@ -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`.

View file

@ -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"]
@ -42,8 +42,6 @@ ram.runtime = "50M"
[resources.install_dir]
[resources.data_dir]
[resources.ports]
[resources.permissions]

View file

@ -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
#=================================================

View file

@ -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

View file

@ -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

View file

@ -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
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"