mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
dns/ddclient: Fix Netcup host/domain recognition (#4516)
* Fix ddclient netcup host/domain recognition * Update dns/ddclient/src/opnsense/scripts/ddclient/lib/account/netcup.py Co-authored-by: Ad Schellevis <AdSchellevis@users.noreply.github.com> --------- Co-authored-by: Ad Schellevis <AdSchellevis@users.noreply.github.com>
This commit is contained in:
co-authored by
Ad Schellevis
parent
49467c3d5d
commit
32f3408f19
@@ -64,7 +64,8 @@ class Netcup(BaseAccount):
|
||||
syslog.syslog(syslog.LOG_ERR, "Incomplete FQDN offerred %s" % self.settings['hostnames'])
|
||||
return False
|
||||
|
||||
self.hostname, self.domain = self.settings['hostnames'].split('.', 1)
|
||||
self.domain = self.settings['hostnames'].split('.', self.settings['hostnames'].count('.')-1)[-1]
|
||||
self.hostname = self.settings['hostnames'].rsplit('.', 2)[0] if self.domain != self.settings['hostnames'] else '@'
|
||||
|
||||
if self.settings['password'].count('|') == 1:
|
||||
self.settings['APIPassword'], self.settings['APIKey'] = self.settings['password'].split('|')
|
||||
|
||||
Reference in New Issue
Block a user