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

Add 'edit' option to custom DNS and CNAME #4969

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

martinbutt
Copy link

@martinbutt martinbutt commented Oct 11, 2022

Signed-off-by: Martin Butt git@martinbutt.com

Thank you for your contribution to the Pi-hole Community!

Please read the comments below to help us consider your Pull Request.

We are all volunteers and completing the process outlined will help us review your commits quicker.

Please make sure you

  1. Base your code and PRs against the repositories developmental branch.
  2. Sign Off all commits as we enforce the DCO for all contributions

  • What does this PR aim to accomplish?:

This PR adds an 'edit' action to the custom DNS/CNAME commands in the CLI. This allows an atomic operation to edit existing entries without knowing the previous target IP address/hostname. Without this change there are three actions required to edit an entry. One to look up the current target, one to delete that entry, and one to add the new one. This simplifies that process.

  • How does this PR accomplish the above?:

This PR adds two new functions to advanced/Scripts/webpage.sh: EditCustomDNSAddress and EditCustomCNAMERecord that delete the entry in the file and add a new one. These are different from simply deleting and adding and entry through the current CLI, as these new functions require no knowledge of the previous entry.

  • What documentation changes (if any) are needed to support this PR?:

I can't find any existing documentation on the current CLI for custom DNS and CNAME entries. If someone points me to any, I'll be happy to update it.


By submitting this pull request, I confirm the following:

  1. I have read and understood the contributors guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented my proposed changes within the code and I have tested my changes.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the EUPL 1.2 license
  5. I have squashed any insignificant commits. (git rebase)

  • I have read the above and my PR is ready for review. Check this box to confirm

Signed-off-by: Martin Butt <git@martinbutt.com>
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

Successfully merging this pull request may close these issues.

None yet

1 participant