mirror of
https://github.com/YunoHost-Apps/hotspot_ynh.git
synced 2024-09-03 19:25:53 +02:00
tell nm to stop managing wireless interface
This commit is contained in:
parent
32e65197ef
commit
65dc9ddf85
3 changed files with 13 additions and 3 deletions
2
conf/ynh-hotspot-nm.conf
Normal file
2
conf/ynh-hotspot-nm.conf
Normal file
|
@ -0,0 +1,2 @@
|
|||
[keyfile]
|
||||
unmanaged-devices=interface-name:wl*
|
|
@ -216,6 +216,11 @@ install -b -o root -g root -m 0644 ../conf/dnsmasq_dhcpdv4.conf.tpl /etc/dnsmasq
|
|||
install -b -o root -g root -m 0644 ../conf/nginx_wifiadmin.conf "/etc/nginx/conf.d/${domain}.d/wifiadmin.conf"
|
||||
install -b -o root -g root -m 0644 ../conf/phpfpm_wifiadmin.conf /etc/php5/fpm/pool.d/wifiadmin.conf
|
||||
|
||||
# add config if NetworkManager is installed
|
||||
if dpkg -s network-manager >/dev/null 2>&1; then
|
||||
install -b -o root -g root -m 0644 ../conf/ynh-hotspot-nm.conf /etc/NetworkManager/conf.d/
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# COPY WEB SOURCES
|
||||
#=================================================
|
||||
|
@ -248,9 +253,6 @@ sed 's|<TPL:NGINX_REALPATH>|/var/www/wifiadmin/|g' -i /etc/php5/fpm/pool.d/wifia
|
|||
# Fix sources
|
||||
sed "s|<TPL:NGINX_LOCATION>|${path_url}|g" -i /var/www/wifiadmin/config.php
|
||||
|
||||
# Fix network interface
|
||||
grep -q -x -F 'auto wlan0' /etc/network/interfaces || echo 'auto wlan0' >> /etc/network/interfaces
|
||||
|
||||
# make sure rfkill does not block the radio
|
||||
rfkill unblock wifi wlan
|
||||
|
||||
|
@ -262,6 +264,11 @@ install -o root -g root -m 0644 ../conf/ynh-hotspot.service /etc/systemd/system/
|
|||
yunohost firewall allow --no-upnp --ipv6 UDP 547
|
||||
yunohost firewall allow --no-upnp UDP 67
|
||||
|
||||
# Restart network-manager if it is installed
|
||||
if dpkg -s network-manager >/dev/null 2>&1; then
|
||||
systemctl reload network-manager
|
||||
fi
|
||||
|
||||
# Set default inits
|
||||
# The boot order of these services are important, so they are disabled by default
|
||||
# and the ynh-hotspot service handles them.
|
||||
|
|
|
@ -54,6 +54,7 @@ yunohost firewall disallow UDP 67
|
|||
ynh_secure_remove /etc/dnsmasq.dhcpd/
|
||||
ynh_secure_remove /etc/nginx/conf.d/${domain}.d/wifiadmin.conf
|
||||
ynh_secure_remove /etc/php5/fpm/pool.d/wifiadmin.conf
|
||||
ynh_secure_remove /etc/NetworkManager/conf.d/ynh-hotspot-nm.conf
|
||||
for FILE in $(ls /etc/hostapd/hostapd.conf{.tpl?,})
|
||||
do
|
||||
ynh_secure_remove "$FILE"
|
||||
|
|
Loading…
Add table
Reference in a new issue