.s/scripts/hostapd.sh

20 lines
323 B
Bash
Raw Normal View History

2024-04-29 14:34:15 -04:00
#!/bin/sh
interface="wlp1s0"
if [ "$1" = "stop" ]; then
sudo systemctl stop hostapd
sudo systemctl stop dnsmasq
sudo systemctl start NetworkManager
exit 1
fi
sudo systemctl stop NetworkManager
sudo ip addr add 192.168.150.1/24 dev $interface
sudo systemctl start hostapd
sudo systemctl start dnsmasq