lakinduakash / linux-wifi-hotspot

Feature-rich wifi hotspot creator for Linux which provides both GUI and command-line interface. It is also able to create a hotspot using the same wifi card which is connected to an AP already ( Similar to Windows 10).
BSD 2-Clause "Simplified" License
3.2k stars 296 forks source link

Accept 'additional hosts file' option from create_ap.conf #253

Closed brentdewe closed 2 years ago

brentdewe commented 2 years ago

Is your feature request related to a problem? Please describe. When starting create_ap from the command line, I can specify an additional hosts file with the argument -e /etc/hosts-ap, but it is not possible to specify this in a config file passed with --config. I tried to set ADDN_HOSTS=/etc/hosts-ap in the config based on the create_ap code, but I get the warning

WARN: Unrecognized configuration entry ADDN_HOSTS

Describe the solution you'd like I want to be able to pass ADDN_HOSTS=/etc/hosts-ap through a config file when starting create_ap.

Describe alternatives you've considered When I add ADDN_HOSTS to CONFIG_OPTS in create_ap:660, it reads the option and passes it to dnsmasq as expected. At the moment I have to override the systemd service from which it runs to add the -e /etc/hosts-ap argument.

Additional context I run Arch Linux and installed linux-wifi-hotspot from the AUR. I want to use the systemd service which basically runs

create_ap --config /etc/create_ap.conf

at boot time.

sigmaSd commented 2 years ago

The option needs to be added in config opts, I opened a pr to add it, if you're missing other opts feel free to add them there.