Skip to content

Instantly share code, notes, and snippets.

@benemorius
Last active August 27, 2020 20:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benemorius/7e8340eaf59e15ec3335cdc9917813d9 to your computer and use it in GitHub Desktop.
Save benemorius/7e8340eaf59e15ec3335cdc9917813d9 to your computer and use it in GitHub Desktop.
install script for raspberry-wifi-conf
#
# run these commands as root to install raspberry-wifi-conf on any pi zero through 4
#
# update apt and install npm and git
apt update
apt install npm git -y
# install bower
npm install bower -g
# collect raspberry-wifi-conf from git
cd
git clone https://github.com/sabhiram/raspberry-wifi-conf.git
# install dependencies for raspberry-wifi-conf
cd raspberry-wifi-conf
npm update
npm install bower
bower install --allow-root
npm run-script provision
# fix for modern raspbian having hostapd disabled by default
systemctl unmask hostapd
# fix for wifi not being unblocked yet on a fresh install
rfkill unblock 0
#
# edit the configuration according to your needs
#
# edit default AP name and key, default ip address and port
nano config.json
# edit country code
nano assets/etc/wpa_supplicant/wpa_supplicant.conf.template
#
# run automatically on boot
#
# add these commands to the bottom of /etc/rc.local before `exit 0`
# allow some time for wpa_supplicant to connect to wifi if possible
sleep 60
# run raspberry-wifi-conf to check whether wifi is connected and start an AP if not
cd /root/raspberry-wifi-conf
node server.js 2>&1 | logger -t raspberry-wifi-conf &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment