From ad18f8dc688e14c1f4a8ec3971817f7dcd03f6c9 Mon Sep 17 00:00:00 2001 From: HgO Date: Fri, 16 Aug 2024 15:43:24 +0200 Subject: [PATCH] remove multissid stuff --- hooks/post_iptables_rules | 91 +++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 51 deletions(-) diff --git a/hooks/post_iptables_rules b/hooks/post_iptables_rules index 903c649..cb99f53 100644 --- a/hooks/post_iptables_rules +++ b/hooks/post_iptables_rules @@ -1,68 +1,57 @@ #!/bin/bash -multissid=$(grep multissid /etc/yunohost/apps/hotspot/settings.yml | cut -d: -f2 | sed "s/[ ']//g") -interface=$(grep wifi_device /etc/yunohost/apps/hotspot/settings.yml | cut -d: -f2 | sed "s/[ ']//g") -IFS='|' read -a captive_portal <<< "$(grep captive_portal /etc/yunohost/apps/hotspot/settings.yml | grep -v captive_portal_url | cut -d: -f2 | sed "s/[ ']//g")" -IFS='|' read -a ipv4 <<< "$(grep ip4_nat_prefix /etc/yunohost/apps/hotspot/settings.yml | cut -d: -f2 | sed "s/[ ']//g")" -IFS='|' read -a ipv6 <<< "$(grep ip6_net /etc/yunohost/apps/hotspot/settings.yml | cut -d: -f2 | sed "s/[ ']//g")" +wifi_device=$(ynh_app_setting_get --app=$app --key=wifi_device) +captive_portal=$(ynh_app_setting_get --app=$app --key=captive_portal) +ip4_prefix=$(ynh_app_setting_get --app=$app --key=ip4_nat_prefix) +ip6_prefix=$(ynh_app_setting_get --app=$app --key=ip6_net) iptables -w -N hotspot_fwd ip6tables -w -N hotspot_fwd -for (( j=0; j