I often pre-program headless PI's and send them to friends and family as gifts. Examples being: baby monitors, thermostats, fish-feeders, sprinkler controls, etc.. They run Jessie Lite (no GUI)
I install a webserver to most of these PI's and provide a backend website (php, mysql, mariadb) for the end-user to login and to make changes to certain settings, etc.
The biggest issue I run into is with the static IP. I know how to set static IPs, but the end-users are non-technical, and so I am wondering if their would be any way to program the PI so that the end user could set the static IP via the backend website.
My thoughts on the user getting the original IP is as follows:
1. I could install a small LCD display and push-button to the device. When they push the button, the current IP (dhcpd) is shown.
or..
2. I could set a script w/ a pre-programmed email or cell phone number which would send out the IP to that number/email on first boot. EX: If for my uncle, I would set his email in their before sending it, then it would email him the IP from his network when he boots it up.
They could then login to that IP and change to static IP, and possibly configure their wifi settings as well.
Is any of this possible? I'm open to any and all suggestions. Thanks for your time.