mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-05-31 16:00:09 +00:00
Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/fc6803fd-5743-438d-86b8-068ce48b1411 Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
18 lines
792 B
Bash
18 lines
792 B
Bash
#!/bin/bash
|
|
# Automatically generate /config/ddclient.conf for deSEC dynamic DNS when
|
|
# NC_DOMAIN and DESEC_TOKEN are provided and no config file exists yet.
|
|
#
|
|
# This script is executed by the linuxserver base image from /custom-cont-init.d/
|
|
# before ddclient starts, so no manual configuration step is required.
|
|
|
|
if [[ -n "${NC_DOMAIN}" && -n "${DESEC_TOKEN}" && ! -f /config/ddclient.conf ]]; then
|
|
{
|
|
printf 'daemon=300\nsyslog=yes\nssl=yes\n\n'
|
|
printf 'use=web, web=https://checkipv4.dedyn.io/\n\n'
|
|
printf 'protocol=dyndns2\nserver=update.dedyn.io\n'
|
|
printf 'login=%s\npassword=%s\n%s\n' \
|
|
"${NC_DOMAIN}" "${DESEC_TOKEN}" "${NC_DOMAIN}"
|
|
} > /config/ddclient.conf
|
|
echo "deSEC ddclient config auto-generated for domain ${NC_DOMAIN}"
|
|
fi
|