1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/hotspot_ynh.git synced 2024-09-03 19:25:53 +02:00

Merge pull request #123 from YunoHost-Apps/testing

Testing
This commit is contained in:
HgO 2024-03-29 22:33:50 +01:00 committed by GitHub
commit fa69230bf4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 13 additions and 17 deletions

View file

@ -20,7 +20,7 @@ It shall NOT be edited by hand.
* Combine with the [VPN Client app](https://github.com/labriqueinternet/vpnclient_ynh) to obtain a VPN-protected WiFi
**Shipped version:** 2.3.0~ynh1
**Shipped version:** 2.3.1~ynh1
## Screenshots

View file

@ -20,7 +20,7 @@ Il NE doit PAS être modifié à la main.
* À combiner avec l'[app VPN Client](https://github.com/labriqueinternet/vpnclient_ynh) pour obtenir un accès internet aumatiquement protégé par votre VPN
**Version incluse:** 2.3.0~ynh1
**Version incluse:** 2.3.1~ynh1
## Captures décran

View file

@ -20,7 +20,7 @@ NON debe editarse manualmente.
* Combine with the [VPN Client app](https://github.com/labriqueinternet/vpnclient_ynh) to obtain a VPN-protected WiFi
**Versión proporcionada:** 2.3.0~ynh1
**Versión proporcionada:** 2.3.1~ynh1
## Capturas de pantalla

View file

@ -20,7 +20,7 @@ NON DEVE essere modificato manualmente.
* Combine with the [VPN Client app](https://github.com/labriqueinternet/vpnclient_ynh) to obtain a VPN-protected WiFi
**Versione pubblicata:** 2.3.0~ynh1
**Versione pubblicata:** 2.3.1~ynh1
## Screenshot

View file

@ -236,7 +236,11 @@ if [ "$1" != restart ]; then
ip4_nat_prefix=$(ynh_app_setting_get --app=$app --key=ip4_nat_prefix)
old_gateway_interface=$(ynh_app_setting_get --app=$app --key=gateway_interface)
new_gateway_interface=$(ip route get 1.2.3.4 | awk '{ print $5; }')
# The awk syntax is to accomodate to the fact that the ip route output may look like:
# 1.2.3.4 via 192.168.1.254 dev end0 src 192.168.1.35 uid 0
# 1.2.3.4 dev vpn_iloth table 51820 src 5.6.7.8 uid 0
new_gateway_interface=$(ip route get 1.2.3.4 | awk '$2 ~ /^dev$/ { print $3; } $4 ~ /^dev$/ { print $5; }')
echo "OK"
fi

View file

@ -7,7 +7,7 @@ name = "Wifi Hotspot"
description.en = "Create and configure a WiFi hotspot"
description.fr = "Créez et gérez un point d'accès WiFi"
version = "2.3.0~ynh1"
version = "2.3.1~ynh1"
maintainers = []
@ -47,6 +47,8 @@ ram.runtime = "50M"
[resources]
[resources.system_user]
[resources.permissions]
[resources.apt]
packages = "sipcalc, hostapd, iw, kmod"
packages_from_raw_bash = '[[ "$firmware_nonfree" -eq 0 ]] && echo "firmware-ath9k-htc" || true'

View file

@ -40,17 +40,7 @@ fi
ynh_script_progression --message="Restoring configurations ..."
ynh_restore_file --origin_path="/etc/hostapd/$app/hostapd.conf" --not_mandatory
ynh_restore_file --origin_path="/etc/dnsmasq.$app/dhcpdv6.conf" --not_mandatory
ynh_restore_file --origin_path="/etc/dnsmasq.$app/dhcpdv4.conf" --not_mandatory
ynh_restore_file --origin_path="/usr/local/bin/$service_name"
ynh_restore_file --origin_path="/etc/openvpn/scripts/route-up.d/90-${service_name}"
ynh_restore_file --origin_path="/etc/openvpn/scripts/route-down.d/90-${service_name}"
ynh_restore_file --origin_path="/etc/systemd/system/$service_name.service"
ynh_restore_file --origin_path="/etc/systemd/system/hostapd@$app.service"
ynh_restore
yunohost service add "$service_name" --description "Creates a Wi-Fi access point" --test_status "systemctl is-active hostapd@$app" --need_lock