Working ddclient.

This commit is contained in:
Greyscale 2025-02-14 21:23:19 +01:00
parent 6f0cb5a988
commit eeca39baa8
Signed by: grey
GPG key ID: DDB392AE64B32D89
3 changed files with 13 additions and 2 deletions

View file

@ -1,5 +1,6 @@
# General Configuration # General Configuration
daemon=300 daemon=${interval}
syslog=yes
# Router # Router
usev4=${router} usev4=${router}
@ -10,4 +11,4 @@ protocol=${protocol}
%{ if password != null }password=${password}%{ endif } %{ if password != null }password=${password}%{ endif }
%{ if apikey != null }apikey=${apikey}%{ endif } %{ if apikey != null }apikey=${apikey}%{ endif }
%{ if secretapikey != null }secretapikey=${secretapikey}%{ endif } %{ if secretapikey != null }secretapikey=${secretapikey}%{ endif }
${domain} %{ if onrootdomain == true }on-root-domain=yes %{ endif }${domain}

View file

@ -15,6 +15,7 @@ module "service" {
#} #}
secrets = { secrets = {
"/defaults/ddclient.conf" = templatefile("${path.module}/ddclient.conf.tpl", { "/defaults/ddclient.conf" = templatefile("${path.module}/ddclient.conf.tpl", {
interval = var.interval_seconds
protocol = var.protocol protocol = var.protocol
router = var.router router = var.router
login = var.login login = var.login
@ -22,6 +23,7 @@ module "service" {
apikey = var.apikey apikey = var.apikey
secretapikey = var.secretapikey secretapikey = var.secretapikey
domain = var.domain domain = var.domain
onrootdomain = var.onrootdomain
}) })
} }
environment_variables = { environment_variables = {

View file

@ -1,3 +1,7 @@
variable "interval_seconds" {
default = 300
type = number
}
variable "stack_name" { variable "stack_name" {
default = "dns" default = "dns"
type = string type = string
@ -18,6 +22,10 @@ variable "router" {
variable "domain" { variable "domain" {
type = string type = string
} }
variable "onrootdomain" {
default = false
type = bool
}
variable "login" { variable "login" {
type = string type = string
default = null default = null