Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
changes after feedback
Browse files Browse the repository at this point in the history
nandub committed Dec 27, 2020
1 parent 1ffea52 commit 4534fc7
Showing 4 changed files with 7 additions and 8 deletions.
5 changes: 2 additions & 3 deletions dhcp
Original file line number Diff line number Diff line change
@@ -5,9 +5,8 @@
#20200225 km4ack

DHCP=$(cat /var/lib/misc/dnsmasq.leases)
HSS=$(cat /usr/bin/autohotspotN | grep "ip a add" | awk '{ print $4 }' | sed 's/\/24//')
CIP=$(ip address show dev wlan0 | grep -v inet6 | grep inet | awk '{ print $2 }' | sed 's/\/24//')
#CIP=$(ifconfig | grep -A 1 wlan0 | grep inet | awk '{ print $2 }')
HSS=$(cat /usr/bin/autohotspotN | grep "ip a add" | awk '{ print $4 }' | cut -f 1 -d \/)
CIP=$(ip address show dev wlan0 | grep -v inet6 | grep inet | awk '{ print $2 }' | cut -f 1 -d \/)

if [ $HSS = $CIP ]
then
5 changes: 2 additions & 3 deletions hotspot-menu
Original file line number Diff line number Diff line change
@@ -13,9 +13,8 @@ HS=$(systemctl is-enabled autohotspot)
HSR=$(systemctl is-active autohotspot)
CURRENTNAME=$(sudo cat /etc/hostapd/hostapd.conf | grep ssid= | head -1 | sed 's/ssid=//')
CURRENTPASS=$(sudo cat /etc/hostapd/hostapd.conf | grep wpa_passphrase= | sed 's/wpa_passphrase=//')
HSIP=$(cat /usr/bin/autohotspotN | grep "ip a add" | awk '{ print $4 }' | sed 's/\/24//')
CIP=$(ip address show dev wlan0 | grep -v inet6 | grep inet | awk '{ print $2 }' | sed 's/\/24//')
#CIP=$(ifconfig | grep -A 1 wlan0 | grep inet | awk '{ print $2 }')
HSIP=$(cat /usr/bin/autohotspotN | grep "ip a add" | awk '{ print $4 }' | cut -f 1 -d \/)
CIP=$(ip address show dev wlan0 | grep -v inet6 | grep inet | awk '{ print $2 }' | cut -f 1 -d \/)

if [ $HSR = 'inactive' ]
then
2 changes: 1 addition & 1 deletion knowssid
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ HS=$(systemctl is-enabled autohotspot)
HSR=$(systemctl is-active autohotspot)
CURRENTNAME=$(sudo cat /etc/hostapd/hostapd.conf | grep ssid= | head -1 | sed 's/ssid=//')
CURRENTPASS=$(sudo cat /etc/hostapd/hostapd.conf | grep wpa_passphrase= | sed 's/wpa_passphrase=//')
HSIP=$(cat /usr/bin/autohotspotN | grep "ip a add" | sed 's/ip\ a\ add\ //' | sed 's/\/24.*$//' | tr -d " ")
HSIP=$(cat /usr/bin/autohotspotN | grep "ip a add" | awk '{ print $4 }' | cut -f 1 -d \/)

if [ $HSR = 'inactive' ]
then
3 changes: 2 additions & 1 deletion setup
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash

#setup script for hotspot tools
#20200221 km4ack

sudo apt -y install xterm

DIR=$HOME/hotspot-tools-lite

0 comments on commit 4534fc7

Please sign in to comment.