I've been quite busy lately. Spent most of my nights in the room that serves as my office when I work from home. Annualization of working time magic. Anyhow, I spent most of my 1:30 AM breaks working on the homeinstall folder of the Streams repository.
There has been some progress. As planned I moved the Dynamic DNS (DDNS) part in separate scripts, one per provider. So now we have a "ddns"folder, which contains a script for FreeDNS ad another for selfHOST.de, which basically contain the functions previously included in the setup script.. I also added a script for Gandi (my registrar for years). Some things work, some don't. Here's where we're at:
- FreeDNS: after creating an account and a subdomain on freedns.afraid.org (with a wrong IP address), the script was successfully run by the setup script and correctly updated the IP address linked to the subdomain. Unfortunately, there seems to be some kind of propagation delay so the ping doesn't work and the setup script ultimately fails. I checked and it took half an hour before the right IP got pinged. For now, the best thing to do is probably to set the right IP when creating the subdomain on FreeDNS's website. Seems obvious if your server is at home, but not that much if you use a VPS
(EDIT: a VPS with a Dynamic IP??? Duh.).
- selHOST.de: I did not test it. I'm not one of their clients, so... It should work. Unless there also is a propagation delay issue.
- Gandi: Almost works perfectly. The script uses actually installs a nice script (available here
) and uses it to create the subdomain. Of course, you need to own the domain in the first place, but you don't need to create the subdomain on Gandi's user interface, you just have to put it in the main config file before running the setup script and that's it. The only minor issue I have is with the check_https function wihich show an error. It does not interrupt the program though, so the website really gets installed in the end. I don't know if the check_https needs some improvement, or if there could also be a propagation delay issue here too.
I don't know much about the DNS, but I know that changes on DNS records can require some time before being applied all over internet. I'm wondering if, in case of an install that requires a DDNS solution, there should be a first check in the setup script. Like, one of the first things done would be to ping the website's FQDN and only allow the install after a successful ping (with a "Try again a little later message" if it fails).
As it is now, the setup script installs MariaDB and creates the database and its user BEFORE taking care of the DDNS stuff. So if the install fails because of that and you try to re-run the setup script, you'll get an error message telling you that the database already exists and you'll have to delete it manually. Which is not something the users of the homeinstall script should have to be doing, I guess (knowing that in addition to DB deletion there are a few other things to get rid of before retrying an install). Hence the idea of making sure that everything is ready in terms of DDNS before installing the website.
If you want to test on your side, it's here: https://codeberg.org/thomas/streams/src/branch/homeinstall/.homeinstall
Suggestions are more than welcome.