diff --git a/ct/ddclient.sh b/ct/ddclient.sh new file mode 100644 index 000000000..d1561dc15 --- /dev/null +++ b/ct/ddclient.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2026 mitchscobell +# Author: mitchscobell +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://ddclient.net/ + +APP="ddclient" +var_tags="${var_tags:-network}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-512}" +var_disk="${var_disk:-2}" +var_os="${var_os:-debian}" +var_version="${var_version:-13}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + if [[ ! -f /etc/ddclient.conf ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + msg_info "Updating ${APP}" + $STD apt-get update + $STD apt-get install --only-upgrade -y ddclient + $STD systemctl restart ddclient + msg_ok "Updated ${APP}" + msg_ok "Updated successfully!" + exit +} + +start +build_container +description + +msg_ok "Completed successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Configuration file location:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}/etc/ddclient.conf${CL}" diff --git a/frontend/public/json/ddclient.json b/frontend/public/json/ddclient.json new file mode 100644 index 000000000..41f743e44 --- /dev/null +++ b/frontend/public/json/ddclient.json @@ -0,0 +1,48 @@ +{ + "name": "ddclient", + "slug": "ddclient", + "categories": [ + 4 + ], + "date_created": "2026-01-31", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": null, + "documentation": "https://ddclient.net/", + "website": "https://ddclient.net/", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/ddclient.webp", + "config_path": "/etc/ddclient.conf", + "description": "ddclient is a Perl client used to update dynamic DNS entries for accounts on a wide range of dynamic DNS service providers. It supports multiple protocols and providers, allowing automatic IP address updates for your domain names.", + "install_methods": [ + { + "type": "default", + "script": "ct/ddclient.sh", + "resources": { + "cpu": 1, + "ram": 512, + "hdd": 2, + "os": "debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "type": "info", + "text": "After installation, edit `/etc/ddclient.conf` with your dynamic DNS provider credentials" + }, + { + "type": "info", + "text": "Sample configuration is created for Namecheap but can be modified for other providers" + }, + { + "type": "info", + "text": "The configuration file is set to chmod 600 for security" + } + ] +} diff --git a/install/ddclient-install.sh b/install/ddclient-install.sh new file mode 100644 index 000000000..7e19572bd --- /dev/null +++ b/install/ddclient-install.sh @@ -0,0 +1,44 @@ +#!/usr/bin/env bash + +# Copyright (c) 2026 mitchscobell +# Author: mitchscobell +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://ddclient.net/ + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing ddclient" +DEBIAN_FRONTEND=noninteractive $STD apt-get -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install -y ddclient +msg_ok "Installed ddclient" + +if [[ ! -f /etc/ddclient.conf ]]; then + msg_info "Creating sample ddclient configuration" + cat << 'EOF' >/etc/ddclient.conf +# Sample ddclient.conf +# Replace with your actual settings +protocol=namecheap +use=web, web=dynamicdns.park-your-domain.com/getip +server=dynamicdns.park-your-domain.com +login=yourdomain.com +password='your-ddns-password' +@,www +EOF + chmod 600 /etc/ddclient.conf + msg_ok "Sample /etc/ddclient.conf created" +fi + +msg_info "Enabling ddclient service" +systemctl enable -q --now ddclient +msg_ok "ddclient service enabled and started" + +motd_ssh +echo -e "echo -e \" 🔧 \\\\033[1;33m Configuration: \\\\033[1;32m/etc/ddclient.conf\\\\033[0m\"" >>/etc/profile.d/00_lxc-details.sh +echo "echo \"\"" >>/etc/profile.d/00_lxc-details.sh +customize +cleanup_lxc