Browse Source

Set DAEMON_CONF path for hostapd

pull/1183/head
Bill Zimmerman 6 months ago
committed by GitHub
parent
commit
c1db8d6409
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      installers/common.sh

9
installers/common.sh

@ -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
}

Loading…
Cancel
Save