diff --git a/scripts/install b/scripts/install index 9ee1bab..451d9ad 100644 --- a/scripts/install +++ b/scripts/install @@ -123,12 +123,10 @@ chmod 0755 "/etc/openvpn/scripts/route-down.d/90-${service_name}" #================================================= ynh_script_progression --message="Configuring hostapd..." -# Set default inits -# The boot order of these services are important, so they are disabled by default -# and the ynh-hotspot service handles them. +# Disable hostapd, we'll use hostapd@$app instead (for multissid support etc) systemctl disable hostapd --quiet 2>&1 systemctl stop hostapd 2>&1 -systemctl unmask hostapd 2>&1 # On some system e.g. RPi, for some reason hostapd is masked after install ... +systemctl mask hostapd 2>&1 if [[ -n "${wifi_device}" ]]; then configure_hostapd diff --git a/scripts/restore b/scripts/restore index 4d93dce..9cd18cb 100644 --- a/scripts/restore +++ b/scripts/restore @@ -10,6 +10,14 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers +if systemctl -q is-enabled hostapd +then + # Disable hostapd, we'll use hostapd@$app instead (for multissid support etc) + systemctl disable hostapd --quiet 2>&1 + systemctl stop hostapd 2>&1 + systemctl mask hostapd 2>&1 +fi + #================================================= # FIND AND OPEN A PORT #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 7b14ae9..fb92cc1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -129,6 +129,14 @@ if [ -e "/etc/sudoers.d/${app}_ynh" ]; then ynh_secure_remove "/etc/sudoers.d/${app}_ynh" fi +if systemctl -q is-enabled hostapd +then + # Disable hostapd, we'll use hostapd@$app instead (for multissid support etc) + systemctl disable hostapd --quiet 2>&1 + systemctl stop hostapd 2>&1 + systemctl mask hostapd 2>&1 +fi + #================================================= # SPECIFIC UPGRADE #=================================================