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

Update *.domain.tld as well as @.domain.tld #3

Open
cdlm opened this issue Feb 16, 2022 · 5 comments · May be fixed by #4
Open

Update *.domain.tld as well as @.domain.tld #3

cdlm opened this issue Feb 16, 2022 · 5 comments · May be fixed by #4
Labels
enhancement New feature or request

Comments

@cdlm
Copy link

cdlm commented Feb 16, 2022

Gandi supports wildcard * subdomains, but they should be updated as well as the @. I hacked the script to achieve that for me, but a clean implementation should be devised…

Given that the configuration form in DSM validates the hostname a little strictly, and that there is no other setting (I wouldn't abuse the username field for that), maybe make two versions of the script?

@kofemann kofemann added the enhancement New feature or request label Feb 16, 2022
@kofemann
Copy link
Owner

You can make a PR as is and we discuss it as a review.

cdlm added a commit to cdlm/livedns4synology that referenced this issue Feb 16, 2022
@cdlm cdlm linked a pull request Feb 16, 2022 that will close this issue
@kofemann
Copy link
Owner

Thanks for the RP. Do you have a link to the documentation related to *. TO me it unclear what it actually does. and what is the difference to @.

@cdlm
Copy link
Author

cdlm commented Feb 17, 2022

Here's a passage in the docs: https://docs.gandi.net/en/domain_names/faq/record_types/a_record.html#what-are-wildcard-a-records. So @ means no subdomain (just the main example.tld you're paying for), and * means any subdomain (that doesn't have an explicit record otherwise).

Reading this, I realize that I don't rely on dynamic subdomains other than by laziness, so I'll probably/eventually set up a proper zone update script for when I add/remove a vhost…

@kofemann
Copy link
Owner

Ok, obviously '@' and '*' are different usecases. Thus the proposed change is wrong.

Is the handling onf wildcard records makes sense is a different question.

cdlm added a commit to cdlm/livedns4synology that referenced this issue Feb 20, 2022
This requires writing a wrapper script to pass those parameters, as DSM
doesn't allow to do that directly.

Resolves kofemann#3
@cdlm
Copy link
Author

cdlm commented Feb 20, 2022

Ok, obviously '@' and '*' are different usecases.

Agreed. Here's a new version, untested because I currently don't have access to my NAS.
The idea is either you use it as previously by giving foo.example.tld in DSM, or just example.tld in which case the @.example.tld. A record will be updated.

Or, by writing a wrapper script that passes additional arguments at the end, you can update explicit hosts, including the special @ and *:

/bin/bash
./livedns.py "$@" foo bar @ '*'

What do you think?

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

Successfully merging a pull request may close this issue.

2 participants