This commit is contained in:
2025-07-02 13:29:40 +08:00
parent b5983ed308
commit e0fbdf852e
5 changed files with 50 additions and 0 deletions

22
tools/duckdns/install.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/bash
# https://www.duckdns.org/install.jsp
thisdir="$( dirname "$(readlink -e -- "${BASH_SOURCE[0]}")")"
cp -f .env.example .env
cat <<EOF | sudo tee /etc/cron.d/duckdns && crontab -u "$(whoami)" /etc/cron.d/duckdns
# ------------- Minute (0 - 59)
# | ----------- Hour (0 - 23)
# | | --------- Day of month (1 - 31)
# | | | ------- Month (1 - 12)
# | | | | ----- Day of week (0 - 7) (Sunday=0 or 7)
# | | | | |
# * * * * * "command to be executed"
# AAA обновление duckdns ip
0 * * * * $thisdir/update.sh
EOF