Default config tweaks

This commit is contained in:
billz 2020-12-05 21:49:32 +00:00
parent d35397f09e
commit a56a59b7e5
3 changed files with 7 additions and 6 deletions

View File

@ -1,5 +1,6 @@
# RaspAP wlan0 configuration for wired (ethernet) AP mode # RaspAP wlan0 configuration for wired (ethernet) AP mode
interface=wlan0 interface=wlan0
domain-needed
dhcp-range=10.3.141.50,10.3.141.255,255.255.255.0,12h dhcp-range=10.3.141.50,10.3.141.255,255.255.255.0,12h
dhcp-option=6,1.1.1.1,8.8.8.8 dhcp-option=6,1.1.1.1,8.8.8.8

View File

@ -13,10 +13,10 @@
}, },
"dnsmasq": { "dnsmasq": {
"wlan0": { "wlan0": {
"dhcp-range": [ "10.3.141.50,10.3.141.255,255.255.255.0,12h" ], "dhcp-range": [ "10.3.141.50,10.3.141.255,255.255.255.0,12h" ]
},
"uap0": { "uap0": {
"dhcp-range": [ "192.168.50.50,192.168.50.150,12h" ] "dhcp-range": [ "192.168.50.50,192.168.50.150,12h" ]
} }
} }
} }

View File

@ -145,9 +145,10 @@ function _create_raspap_directories() {
# Create a directory to store networking configs # Create a directory to store networking configs
echo "Creating $raspap_dir/networking" echo "Creating $raspap_dir/networking"
sudo mkdir -p "$raspap_dir/networking" sudo mkdir -p "$raspap_dir/networking"
# Copy existing dhcpcd.conf to use as base config
echo "Adding /etc/dhcpcd.conf as base configuration" # Copy defaults.json to use as fallback config
cat /etc/dhcpcd.conf | sudo tee -a /etc/raspap/networking/defaults > /dev/null sudo cp $webroot_dir/config/defaults.json $raspap_network || _install_status 1 "Unable to move defaults.json settings"
echo "Changing file ownership of $raspap_dir" echo "Changing file ownership of $raspap_dir"
sudo chown -R $raspap_user:$raspap_user "$raspap_dir" || _install_status 1 "Unable to change file ownership for '$raspap_dir'" sudo chown -R $raspap_user:$raspap_user "$raspap_dir" || _install_status 1 "Unable to change file ownership for '$raspap_dir'"
} }
@ -379,7 +380,6 @@ function _default_configuration() {
sudo cp $webroot_dir/config/hostapd.conf /etc/hostapd/hostapd.conf || _install_status 1 "Unable to move hostapd configuration file" sudo cp $webroot_dir/config/hostapd.conf /etc/hostapd/hostapd.conf || _install_status 1 "Unable to move hostapd configuration file"
sudo cp $webroot_dir/config/090_wlan0.conf $raspap_dnsmasq || _install_status 1 "Unable to move dnsmasq configuration file" sudo cp $webroot_dir/config/090_wlan0.conf $raspap_dnsmasq || _install_status 1 "Unable to move dnsmasq configuration file"
sudo cp $webroot_dir/config/dhcpcd.conf /etc/dhcpcd.conf || _install_status 1 "Unable to move dhcpcd configuration file" sudo cp $webroot_dir/config/dhcpcd.conf /etc/dhcpcd.conf || _install_status 1 "Unable to move dhcpcd configuration file"
sudo cp $webroot_dir/config/defaults.json $raspap_network || _install_status 1 "Unable to move defaults.json settings"
echo "Checking for existence of /etc/dnsmasq.d" echo "Checking for existence of /etc/dnsmasq.d"
[ -d /etc/dnsmasq.d ] || sudo mkdir /etc/dnsmasq.d [ -d /etc/dnsmasq.d ] || sudo mkdir /etc/dnsmasq.d