This commit is contained in:
parent
8bedae1a69
commit
f0cc5f0bee
1 changed files with 9 additions and 4 deletions
13
install.sh
13
install.sh
|
|
@ -14,9 +14,15 @@ sudo apt -y install python-pip dnsmasq dhcpcd hostapd git
|
||||||
echo "--- Install CosmicPi software --"
|
echo "--- Install CosmicPi software --"
|
||||||
sudo pip install cosmicpi
|
sudo pip install cosmicpi
|
||||||
|
|
||||||
# Configure AP mode
|
|
||||||
# Populate `/etc/dnsmasq.conf` file
|
|
||||||
echo "--- Configure AP mode ---"
|
echo "--- Configure AP mode ---"
|
||||||
|
curl https://gist.githubusercontent.com/lukicdarkoo/6b92d182d37d0a10400060d8344f86e4/raw | sh -s FooSSID FooPass CosmicPi 12345678
|
||||||
|
|
||||||
|
: '
|
||||||
|
# Configure AP mode
|
||||||
|
# This configuration is based on CosmicPi 1.5 software
|
||||||
|
# We do not need it as we now have, shiny, new script that configures AP and client Wifi mode
|
||||||
|
# I will leave this piece of code commented, for a while, as a fallback
|
||||||
|
# Populate `/etc/dnsmasq.conf` file
|
||||||
sudo bash -c 'cat > /etc/dnsmasq.conf' << EOF
|
sudo bash -c 'cat > /etc/dnsmasq.conf' << EOF
|
||||||
interface=wlan0
|
interface=wlan0
|
||||||
dhcp-range=192.168.12.50,192.168.12.150,255.255.255.0,24h
|
dhcp-range=192.168.12.50,192.168.12.150,255.255.255.0,24h
|
||||||
|
|
@ -34,7 +40,6 @@ interface=wlan0
|
||||||
address=/googleapis.com/192.168.12.1
|
address=/googleapis.com/192.168.12.1
|
||||||
address=/android.com/192.168.12.1
|
address=/android.com/192.168.12.1
|
||||||
EOF
|
EOF
|
||||||
#sudo systemctl restart dnsmasq
|
|
||||||
|
|
||||||
# Populate `/etc/dhcpcd.conf` file
|
# Populate `/etc/dhcpcd.conf` file
|
||||||
sudo bash -c 'cat > /etc/dhcpcd.conf' << EOF
|
sudo bash -c 'cat > /etc/dhcpcd.conf' << EOF
|
||||||
|
|
@ -58,7 +63,6 @@ static domain_name_servers=192.168.12.1
|
||||||
interface wlan0
|
interface wlan0
|
||||||
fallback static_wlan0
|
fallback static_wlan0
|
||||||
EOF
|
EOF
|
||||||
#sudo systemctl restart dhcpcd
|
|
||||||
|
|
||||||
# Populate `/etc/create_ap.conf` file
|
# Populate `/etc/create_ap.conf` file
|
||||||
git clone https://www.github.com/oblique/create_ap /tmp/create_ap --depth 1
|
git clone https://www.github.com/oblique/create_ap /tmp/create_ap --depth 1
|
||||||
|
|
@ -95,5 +99,6 @@ SSID=CosmicPi
|
||||||
PASSPHRASE=
|
PASSPHRASE=
|
||||||
USE_PSK=0
|
USE_PSK=0
|
||||||
EOF
|
EOF
|
||||||
|
'
|
||||||
|
|
||||||
sudo reboot
|
sudo reboot
|
||||||
Loading…
Reference in a new issue