mirror of
https://github.com/YunoHost-Apps/hotspot_ynh.git
synced 2024-09-03 19:25:53 +02:00
commit
fa69230bf4
7 changed files with 13 additions and 17 deletions
|
@ -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
|
* 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
|
## Screenshots
|
||||||
|
|
||||||
|
|
|
@ -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
|
* À 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
|
## Captures d’écran
|
||||||
|
|
||||||
|
|
|
@ -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
|
* 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
|
## Capturas de pantalla
|
||||||
|
|
||||||
|
|
|
@ -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
|
* 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
|
## Screenshot
|
||||||
|
|
||||||
|
|
|
@ -236,7 +236,11 @@ if [ "$1" != restart ]; then
|
||||||
ip4_nat_prefix=$(ynh_app_setting_get --app=$app --key=ip4_nat_prefix)
|
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)
|
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"
|
echo "OK"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -7,7 +7,7 @@ name = "Wifi Hotspot"
|
||||||
description.en = "Create and configure a WiFi hotspot"
|
description.en = "Create and configure a WiFi hotspot"
|
||||||
description.fr = "Créez et gérez un point d'accès WiFi"
|
description.fr = "Créez et gérez un point d'accès WiFi"
|
||||||
|
|
||||||
version = "2.3.0~ynh1"
|
version = "2.3.1~ynh1"
|
||||||
|
|
||||||
maintainers = []
|
maintainers = []
|
||||||
|
|
||||||
|
@ -47,6 +47,8 @@ ram.runtime = "50M"
|
||||||
[resources]
|
[resources]
|
||||||
[resources.system_user]
|
[resources.system_user]
|
||||||
|
|
||||||
|
[resources.permissions]
|
||||||
|
|
||||||
[resources.apt]
|
[resources.apt]
|
||||||
packages = "sipcalc, hostapd, iw, kmod"
|
packages = "sipcalc, hostapd, iw, kmod"
|
||||||
packages_from_raw_bash = '[[ "$firmware_nonfree" -eq 0 ]] && echo "firmware-ath9k-htc" || true'
|
packages_from_raw_bash = '[[ "$firmware_nonfree" -eq 0 ]] && echo "firmware-ath9k-htc" || true'
|
||||||
|
|
|
@ -40,17 +40,7 @@ fi
|
||||||
|
|
||||||
ynh_script_progression --message="Restoring configurations ..."
|
ynh_script_progression --message="Restoring configurations ..."
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/hostapd/$app/hostapd.conf" --not_mandatory
|
ynh_restore
|
||||||
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"
|
|
||||||
|
|
||||||
yunohost service add "$service_name" --description "Creates a Wi-Fi access point" --test_status "systemctl is-active hostapd@$app" --need_lock
|
yunohost service add "$service_name" --description "Creates a Wi-Fi access point" --test_status "systemctl is-active hostapd@$app" --need_lock
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue