RaspberryConnect / AutoHotspot-Installer

For the RaspberryPi computers. Allows switching between a Raspberry Pi Access Point and Wifi Network connection without a reboot.
GNU General Public License v3.0
67 stars 24 forks source link

run script depending on state within autohotspot code? #23

Open cicci44 opened 4 months ago

cicci44 commented 4 months ago

for the moment, im gonna make a python script that depens on what ip address is assigned to the rpi... But it would be best to run it straight from autohotspot when it has been choosing ap or client mode.

i guess somewhere in the autohotspotN file? suggestion

RaspberryConnect commented 4 months ago

Hi

I have a version of this script that is compatible with Network Manager on PiOS Bookworm on my website. I am currently working on a more featured version of that script which will include script running on the network status. So that will be coming soon ish.

For this script though you can add a line to run a script at the bottom of the createAdHocNetwork() function when the Hotspot is created. For a network connection I would add an ELSE statement in the ChkWifiUp() function and run your script then.