diff options
author | ache <ache@ache.one> | 2018-01-15 05:14:27 +0100 |
---|---|---|
committer | ache <ache@ache.one> | 2018-01-15 05:14:27 +0100 |
commit | c69d4eb035a06e6ee1d006e4fcbdd36637e17037 (patch) | |
tree | 3c6319d4986768f47c0ffdde0c29a1151f81280a | |
parent | Rename coWifi (diff) |
Fix tethapp
-rwxr-xr-x | tethapp.sh | 29 |
1 files changed, 22 insertions, 7 deletions
@@ -76,16 +76,23 @@ echo "Configuration de DNSQMASQ" cat <<< $( echo " - interface=${interface} - listen-address=${ip} - bind-interfaces - dhcp-range=${dhcp_range}" -) > /tmp/dnsmasq.conf +address=/#/${ip} +listen-address=${ip} +interface=${interface} +#bind-interfaces +dhcp-range=${dhcp_range}" +) > /tmp/dnsmasq_hotspot.conf echo 'Lancement de DNSMASQ (DHCP sur le réseau 10.5.5.0/24)' -sudo dnsmasq --conf-file=/tmp/dnsmasq.conf +if sudo dnsmasq --conf-file=/tmp/dnsmasq_hotspot.conf ; then + echo 'Ok dnsmasq prêt' +else + echo 'Erreur : Impossible de démarrer dnsmasq' + echo 'Abandon' + exit 1 +fi echo "Activation de l'interface ${interface}" sudo ip link set "${interface}" up @@ -162,12 +169,20 @@ eap_server=0" echo "Lancement du hostpot Wifi" -sudo hostapd /tmp/hostapd.conf +if sudo hostapd /tmp/hostapd.conf ; then + echo 'Yeah, i wish you enjoyed it' +else + echo 'Error: there is a problem with hostapd' +fi echo 'Clean des iptables' sudo iptables --flush sudo iptables -t nat --flush +echo 'Clean config' + +rm /tmp/dnsmasq_hotspot.conf /tmp/hostapd.conf + echo 'Bye 💋' echo 'Have a nice day <3' |