Use service-common-defaults
variables
This avoids a lot of duplication and improves readability by making it easier to see service-specific variables.
This commit is contained in:
parent
6da30367d0
commit
4d1b3439ea
1 changed files with 2 additions and 15 deletions
17
ddclient.in
17
ddclient.in
|
@ -963,15 +963,13 @@ my %services = (
|
||||||
'update' => \&nic_porkbun_update,
|
'update' => \&nic_porkbun_update,
|
||||||
'examples' => \&nic_porkbun_examples,
|
'examples' => \&nic_porkbun_examples,
|
||||||
'variables' => {
|
'variables' => {
|
||||||
|
%{$variables{'service-common-defaults'}},
|
||||||
'apikey' => setv(T_PASSWD, 1, 0, '', undef),
|
'apikey' => setv(T_PASSWD, 1, 0, '', undef),
|
||||||
'secretapikey' => setv(T_PASSWD, 1, 0, '', undef),
|
'secretapikey' => setv(T_PASSWD, 1, 0, '', undef),
|
||||||
'root-domain' => setv(T_OFQDN, 0, 0, '', undef),
|
'root-domain' => setv(T_OFQDN, 0, 0, '', undef),
|
||||||
'on-root-domain' => setv(T_BOOL, 0, 0, 0, undef),
|
'on-root-domain' => setv(T_BOOL, 0, 0, 0, undef),
|
||||||
'login' => setv(T_LOGIN, 0, 0, 'unused', undef),
|
'login' => setv(T_LOGIN, 0, 0, 'unused', undef),
|
||||||
'password' => setv(T_PASSWD, 0, 0, 'unused', undef),
|
'password' => setv(T_PASSWD, 0, 0, 'unused', undef),
|
||||||
'use' => setv(T_USE, 0, 0, 'disabled', undef),
|
|
||||||
'usev4' => setv(T_USEV4, 0, 0, 'disabled', undef),
|
|
||||||
'usev6' => setv(T_USEV6, 0, 0, 'disabled', undef),
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'sitelutions' => {
|
'sitelutions' => {
|
||||||
|
@ -989,25 +987,14 @@ my %services = (
|
||||||
'update' => \&nic_woima_update,
|
'update' => \&nic_woima_update,
|
||||||
'examples' => \&nic_woima_examples,
|
'examples' => \&nic_woima_examples,
|
||||||
'variables' => {
|
'variables' => {
|
||||||
'atime' => setv(T_NUMBER, 0, 1, 0, undef),
|
%{$variables{'service-common-defaults'}},
|
||||||
'backupmx' => setv(T_BOOL, 0, 1, 0, undef),
|
'backupmx' => setv(T_BOOL, 0, 1, 0, undef),
|
||||||
'custom' => setv(T_BOOL, 0, 1, 0, undef),
|
'custom' => setv(T_BOOL, 0, 1, 0, undef),
|
||||||
'ip' => setv(T_IP, 0, 1, undef, undef),
|
|
||||||
'login' => setv(T_LOGIN, 1, 0, '', undef),
|
|
||||||
'max-interval' => setv(T_DELAY, 0, 0, interval('25d'), 0),
|
|
||||||
'min-error-interval' => setv(T_DELAY, 0, 0, interval('5m'), 0),
|
|
||||||
'min-interval' => setv(T_DELAY, 0, 0, interval('30s'), 0),
|
|
||||||
'mtime' => setv(T_NUMBER, 0, 1, 0, undef),
|
|
||||||
'mx' => setv(T_OFQDN, 0, 1, '', undef),
|
'mx' => setv(T_OFQDN, 0, 1, '', undef),
|
||||||
'password' => setv(T_PASSWD, 1, 0, '', undef),
|
|
||||||
'script' => setv(T_STRING, 1, 1, '/nic/update', undef),
|
'script' => setv(T_STRING, 1, 1, '/nic/update', undef),
|
||||||
'server' => setv(T_FQDNP, 1, 0, 'dyn.woima.fi', undef),
|
'server' => setv(T_FQDNP, 1, 0, 'dyn.woima.fi', undef),
|
||||||
'static' => setv(T_BOOL, 0, 1, 0, undef),
|
'static' => setv(T_BOOL, 0, 1, 0, undef),
|
||||||
'status' => setv(T_ANY, 0, 1, '', undef),
|
|
||||||
'warned-min-error-interval' => setv(T_ANY, 0, 1, 0, undef),
|
|
||||||
'warned-min-interval' => setv(T_ANY, 0, 1, 0, undef),
|
|
||||||
'wildcard' => setv(T_BOOL, 0, 1, 0, undef),
|
'wildcard' => setv(T_BOOL, 0, 1, 0, undef),
|
||||||
'wtime' => setv(T_DELAY, 0, 1, 0, interval('30s')),
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
'yandex' => {
|
'yandex' => {
|
||||||
|
|
Loading…
Reference in a new issue