1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2023-10-10 13:37:24 +02:00

Set DAEMON_CONF path for hostapd

This commit is contained in:
Bill Zimmerman 2022-06-23 17:06:58 +02:00 committed by GitHub
parent 10942aa8ae
commit c1db8d6409
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -649,6 +649,15 @@ function _patch_system_files() {
_install_log "Unmasking and enabling hostapd service"
sudo systemctl unmask hostapd.service
sudo systemctl enable hostapd.service
# Set correct DAEMON_CONF path for hostapd (Ubuntu20 + Armbian22)
if [ ${OS,,} = "ubuntu" ] && [[ ${RELEASE} =~ ^(20.04|19.10|18.04) ]]; then
conf="/etc/default/hostapd"
key="DAEMON_CONF"
value="/etc/hostapd/hostapd.conf"
echo "Setting default ${key} path to ${value}"
sudo sed -i "/^$key/ { s/^#//; s%=.*%=\"$value\"%; }" "$conf" || _install_status 1 "Unable to set value in ${conf}"
fi
_install_status 0
}