diff --git a/config/default_hostapd b/config/default_hostapd new file mode 100644 index 0000000..f3549a6 --- /dev/null +++ b/config/default_hostapd @@ -0,0 +1,12 @@ +# Location of hostapd configuration file +DAEMON_CONF="/etc/hostapd/hostapd.conf" + +# Additional daemon options to be appended to hostapd command:- +# -d show more debug messages (-dd for even more) +# -K include key data in debug messages +# -t include timestamps in some debug messages +# +# Note that -B (daemon mode) and -P (pidfile) options are automatically +# configured by the init.d script and must not be added to DAEMON_OPTS. +# +#DAEMON_OPTS="" diff --git a/config/dhcpcd.conf b/config/dhcpcd.conf new file mode 100644 index 0000000..ccf0fee --- /dev/null +++ b/config/dhcpcd.conf @@ -0,0 +1,17 @@ +# Defaults from Raspberry Pi configuration +hostname +clientid +persistent +option rapid_commit +option domain_name_servers, domain_name, domain_search, host_name +option classless_static_routes +option ntp_servers +require dhcp_server_identifier +slaac private +nohook lookup-hostname + +# RaspAP-WebGui wireless configuration +interface wlan0 +static ip_address=10.3.141.1/24 +static routers=10.3.141.1 +static domain_name_server=8.8.8.8 8.8.4.4 diff --git a/config/dnsmasq.conf b/config/dnsmasq.conf new file mode 100644 index 0000000..6ae8e90 --- /dev/null +++ b/config/dnsmasq.conf @@ -0,0 +1,3 @@ +domain-needed +interface=wlan0 +dhcp-range=10.3.141.50,10.3.141.255,255.255.255.0,12h diff --git a/installers/common.sh b/installers/common.sh index dd2bce2..6dbd284 100644 --- a/installers/common.sh +++ b/installers/common.sh @@ -110,8 +110,10 @@ function default_configuration() { if [ -f /etc/default/hostapd ]; then sudo mv /etc/default/hostapd /tmp/default_hostapd.old || install_error "Unable to remove old /etc/default/hostapd file" fi - sudo echo DAEMON_CONF=$raspap_dir/hostapd.conf > /etc/default/hostapd || install_error "Unable to write new /etc/default/hostapd file" - sudo mv $webroot_dir/config/hostapd.conf $raspap_dir/hostapd.conf || install_error "Unable to move hostapd configuration file" + sudo mv $webroot_dir/config/default_hostapd /etc/default/hostapd || install_error "Unable to move hostapd defaults file" + sudo mv $webroot_dir/config/hostapd.conf /etc/hostapd/hostapd.conf || install_error "Unable to move hostapd configuration file" + sudo mv $webroot_dir/config/dnsmasq.conf /etc/dnsmasq.conf || install_error "Unable to move dnsmasq configuration file" + sudo mv $webroot_dir/config/dhcpcd.conf /etc/dhcpcd.conf || install_error "Unable to move dhcpcd configuration file" } # Add a single entry to the sudoers file