I'm looking at if I can have a bash/python script that triggers a command based on the IP address Linux has received via DHCP.
- DHCP received: 10.50.10.51 /24 runs command XYZ
- DHCP received: 10.50.20.84 /24 run command XYZ02
Is this possible to do and what would the command be. I'm thinking it prob basic with a variable on reading IP address, but not sure.