Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplest way to detect if running in host mode or not? #118

Open
benwiley4000 opened this issue Sep 21, 2022 · 3 comments
Open

Simplest way to detect if running in host mode or not? #118

benwiley4000 opened this issue Sep 21, 2022 · 3 comments

Comments

@benwiley4000
Copy link

I'm trying to configure another program to know when RaspiWiFi is in host/configuration mode or just running normally. Is there an easy way to do this?

@jediempi
Copy link

I use the IP address to check if it is in host/configuration mode. This is my easy script... :)

#!/bin/bash
case $(ifconfig)
in
"inet 10.0.0.1")
echo $inet "IP found in 10 range for AP mode, leaving DNS alone"
;;
*)
echo $inet "Not in AP mode anymore, let's call the next script"
/bin/bash /home/pi/wifi_fix_dns.sh
;;
esac`

@jediempi
Copy link

IMG_4051

@benwiley4000
Copy link
Author

Thank you! Super helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants