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

Disable the classic hostapd service because we're using hostapd@$app instead, otherwise it'll flood logs x_x

This commit is contained in:
Alexandre Aubin 2023-12-31 17:32:37 +01:00
parent 53d1708056
commit 2d38e95ea3
3 changed files with 18 additions and 4 deletions

View file

@ -123,12 +123,10 @@ chmod 0755 "/etc/openvpn/scripts/route-down.d/90-${service_name}"
#================================================= #=================================================
ynh_script_progression --message="Configuring hostapd..." ynh_script_progression --message="Configuring hostapd..."
# Set default inits # Disable hostapd, we'll use hostapd@$app instead (for multissid support etc)
# The boot order of these services are important, so they are disabled by default
# and the ynh-hotspot service handles them.
systemctl disable hostapd --quiet 2>&1 systemctl disable hostapd --quiet 2>&1
systemctl stop hostapd 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 if [[ -n "${wifi_device}" ]]; then
configure_hostapd configure_hostapd

View file

@ -10,6 +10,14 @@
source ../settings/scripts/_common.sh source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers 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 # FIND AND OPEN A PORT
#================================================= #=================================================

View file

@ -129,6 +129,14 @@ if [ -e "/etc/sudoers.d/${app}_ynh" ]; then
ynh_secure_remove "/etc/sudoers.d/${app}_ynh" ynh_secure_remove "/etc/sudoers.d/${app}_ynh"
fi 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 # SPECIFIC UPGRADE
#================================================= #=================================================