This repository has been archived on 2022-03-12. You can view files and clone it, but cannot push or open issues or pull requests.
reValuate/hotspot.sh
Yamozha c0b4a23c06 added hotspot script
we need to install this before bundling into an img
2021-01-16 16:27:24 +02:00

13 lines
499 B
Bash

# run this script with sudo
# https://www.raspberryconnect.com/projects/65-raspberrypi-hotspot-accesspoints/158-raspberry-pi-auto-wifi-hotspot-switch-direct-connection
apt-get -Y install hostapd
apt-get -Y install dnsmasq
systemctl unmask hostapd
systemctl disable hostapd
systemctl disable dnsmasq
mv hotspot.conf /etc/hostapd/hostapd.conf
chmod +x autohotspot
mv autohotspot /usr/bin/autohotspot
(crontab -l 2>/dev/null; echo "*/5 * * * * sudo /usr/bin/autohotspot >/dev/null 2>&1") | crontab -e