wget -qO- https://github.com/JasonHe/ddns/raw/main/ddns.sh | bashAfter installation, open http://IP:9876 in your browser to complete the configuration.
Save the uninstall script as uninstall-ddns-go.sh, then run:
chmod +x uninstall-ddns-go.sh
sudo ./uninstall-ddns-go.shOr use one-command remote uninstall:
wget -qO- https://github.com/JasonHe/ddns/raw/main/uninstall-ddns-go.sh | bashThe uninstall script will:
- stop and disable the
ddns-goservice - remove the systemd or OpenRC service file when present
- remove
/usr/bin/ddns-go
To search for any remaining related files after uninstall:
find / -name '*ddns-go*' 2>/dev/nullA robust cross-distribution install/upgrade/uninstall script for ddns-go.
This project provides an install/upgrade/uninstall script that:
- fetches the latest
ddns-gorelease from GitHub - parses release metadata with
jq - detects supported Linux CPU architectures automatically
- supports multiple Linux distributions and package managers
- supports both
systemdandOpenRC - backs up the existing binary before replacement
- attempts rollback automatically if the upgraded service fails to start
- Safe upgrade flow
- does not delete the old binary before the new one is downloaded and extracted
- creates a backup before replacing the executable
- attempts rollback on startup failure
- Release metadata parsing with
jq - Broad Linux distribution support
- Broad CPU architecture support
- Temporary workspace cleanup with
mktemp - Service management support for:
systemdOpenRC
aptdnfyumpacmanzypperapk
This script is designed to match all currently published Linux builds of ddns-go:
linux_arm64linux_armv5linux_armv6linux_armv7linux_i386linux_mips64le_hardfloatlinux_mips64le_softfloatlinux_mips64_hardfloatlinux_mips64_softfloatlinux_mipsle_hardfloatlinux_mipsle_softfloatlinux_mips_hardfloatlinux_mips_softfloatlinux_riscv64linux_x86_64
systemdOpenRC
If no supported init system is detected, the script can still upgrade the binary, but service installation and service restart may need to be handled manually.
- Linux
- root privileges
- internet access to GitHub
- one of the supported package managers listed above
The script installs the following tools automatically when needed:
curlwgettarjqbinutils
Save your upgrade script as, for example:
upgrade-ddns-go.shchmod +x upgrade-ddns-go.shsudo ./upgrade-ddns-go.sh- Detects the package manager
- Installs required dependencies
- Detects the init system
- Detects CPU architecture
- Fetches the latest
ddns-gorelease metadata from GitHub - Selects the correct release asset
- Stops the existing service if present
- Downloads and extracts the new package
- Backs up the existing binary
- Replaces the installed binary
- Installs or updates the service
- Restarts the service
- Verifies service health
- Rolls back automatically if startup fails
For MIPS and MIPS64 targets, the script tries to distinguish between hardfloat and softfloat by inspecting ELF attributes via readelf.
This is a practical approach, but not guaranteed to be perfect on every custom distribution or toolchain. If you are deploying on uncommon MIPS devices, validate the detected architecture before production use.
The script supports OpenRC service control logic. However, whether ddns-go -s install can install a native OpenRC service depends on ddns-go itself.
If ddns-go does not generate an OpenRC service script on your platform, you may need to create /etc/init.d/ddns-go manually.
.
├── upgrade-ddns-go.sh
├── README.md
└── README_CN.md
Use at your own risk. Although the script includes backup and rollback logic, you should still test it in your own environment before using it on production systems.
MIT License file.
ddns-go: https://github.com/jeessy2/ddns-go