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 Digitalocean ddns support #3748

Merged
merged 1 commit into from Jan 6, 2024
Merged

Add Digitalocean ddns support #3748

merged 1 commit into from Jan 6, 2024

Conversation

schneuwlym
Copy link
Contributor

@schneuwlym schneuwlym commented Jan 6, 2024

Added Digitalocean ddns support

@@ -93,6 +93,9 @@ server=www.ovh.com, \
protocol={{account.service}}, \
apikey={{account.username}}, \
secretapikey={{account.password}}, \
{% elif account.service == 'digitalocean' %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you try to retain alphabetical ordering here? it's already a bit difficult to follow this part of the template with the duplication (ideally it's the same as cloudflare or others).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean something like that?

diff --git a/dns/ddclient/src/opnsense/service/templates/OPNsense/ddclient/ddclient.conf b/dns/ddclient/src/opnsense/service/templates/OPNsense/ddclient/ddclient.conf
index 6c2cf332..333d478a 100644
--- a/dns/ddclient/src/opnsense/service/templates/OPNsense/ddclient/ddclient.conf
+++ b/dns/ddclient/src/opnsense/service/templates/OPNsense/ddclient/ddclient.conf
@@ -36,7 +36,7 @@ use=cmd, cmd="/usr/local/opnsense/scripts/ddclient/checkip -t {{account.force_ss
 {%      if account.service == 'custom' %}
 protocol={{account.protocol}}, \
 server={{account.server}}, \
-{%      elif account.service == 'cloudflare' %}
+{%      elif account.service in ['cloudflare', 'digitalocean'] %}
 protocol={{account.service}}, \
 zone={{account.zone}}, \
 {%      elif account.service == 'cloudns' %}
@@ -93,9 +93,6 @@ server=www.ovh.com, \
 protocol={{account.service}}, \
 apikey={{account.username}}, \
 secretapikey={{account.password}}, \
-{%      elif account.service == 'digitalocean' %}
-protocol={{account.service}}, \
-zone={{account.zone}}, \
 {%      else %}
 protocol={{account.service}}, \
 {%      endif %}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, perfect ❤️

@fichtner fichtner self-assigned this Jan 6, 2024
@fichtner fichtner merged commit 9d8564c into opnsense:master Jan 6, 2024
@fichtner
Copy link
Member

fichtner commented Jan 6, 2024

Merged, thanks!

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

Successfully merging this pull request may close these issues.

None yet

2 participants