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

Script dns_del_ionos problem #814

Open
gasteropod opened this issue Aug 8, 2023 · 2 comments
Open

Script dns_del_ionos problem #814

gasteropod opened this issue Aug 8, 2023 · 2 comments

Comments

@gasteropod
Copy link

Describe the bug
The dns_del_ionos script does not work with ionos account which have multiple domains.

The script fails with:
curl: (3) URL using bad/illegal format or missing URL

because more than one zone is returned from the initial curl command. The script needs the same logic that is in the dns_add_ionos script to pick out the domain being used. It's really odd that the add script has this logic when it is missing from the del script.

There should also really be a check that a valid record exists before trying to deleted it. getssl calls the del script to cleanup and when doing a re-try at which point the record might not exist. So the script should not assume the record exists and should only delete the record if it does.

To Reproduce
Steps to reproduce the behavior:

Run the script against an ionos account which has multiple domains.

Expected behavior
DNS entry added by add script should be deleted.

Operating system (please complete the following information):

  • OS: Ubuntu 22.04.2 LTS
  • Bash Version GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)

Additional context
I'm going to re-implement the script in python since as DNS_IONOS.md states, "JSON processing in bash is ... hard" and processing with error checking will be easier with python than bash with jq.

@timkimber
Copy link
Member

Hi @gasteropod

Thanks for catching this, I don't have an ionos account and from memory the dns scripts were provided by someone else. Did you manage to get your python version of the script working? If so I'm happy to add it to the repo.

Note: I currently have very little time to work on getssl due to work commitments

@gasteropod
Copy link
Author

Yes, I did.
Here are the two scripts in a zip file. github did not allow .tgz file despite saying it would!
dns_ionos.zip

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

No branches or pull requests

2 participants