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

fix upgrade

This commit is contained in:
HgO 2024-08-17 00:39:24 +02:00
parent db054499c3
commit 4eb8febe54

View file

@ -166,6 +166,8 @@ chown root: /etc/hostapd/$app/
mkdir -pm 0755 /etc/dnsmasq.$app/
chown root: /etc/dnsmasq.$app/
touch /etc/hotspot/allowed.csv
if [[ -n "${wifi_device:-}" ]]; then
configure_hostapd
configure_dhcp
@ -179,6 +181,11 @@ fi
ynh_add_config --template="../conf/ynh-hotspot" --destination="/usr/local/bin/$service_name"
chmod 0755 "/usr/local/bin/$service_name"
ynh_add_config --template="../conf/captiveportal_fakedns" --destination="/usr/local/bin/captiveportal_fakedns"
chmod 0755 "/usr/local/bin/captiveportal_fakedns"
ynh_add_config --template="../conf/captiveportal_allow" --destination="/usr/local/bin/captiveportal_allow"
chmod 0755 "/usr/local/bin/captiveportal_allow"
# Copy openvpn scripts
mkdir -pm 0755 /etc/openvpn/scripts
mkdir -pm 0755 /etc/openvpn/scripts/route-up.d
@ -200,6 +207,9 @@ ynh_add_systemd_config --service="hostapd@$app" --template="../conf/systemd_host
yunohost service add $service_name --description "Creates a Wi-Fi access point" --test_status "systemctl is-active hostapd@$app" --need_lock
ynh_add_systemd_config --service="captiveportal_fakedns" --template="captiveportal_fakedns"
yunohost service add captiveportal_fakedns --description "Captive portal dns service" --test_status "systemctl is-active captiveportal_fakedns"
#=================================================
# START SYSTEMD SERVICE
#=================================================