duckdns improved
This commit is contained in:
@@ -1,22 +1,9 @@
|
||||
#!/bin/bash
|
||||
thisdir="$( dirname "$(readlink -e -- "${BASH_SOURCE[0]}")")"
|
||||
|
||||
# https://www.duckdns.org/install.jsp
|
||||
|
||||
thisdir="$( dirname "$(readlink -e -- "${BASH_SOURCE[0]}")")"
|
||||
|
||||
croncmd="$thisdir/update.sh"
|
||||
cronjob="*/30 * * * * $croncmd" # every 30 min
|
||||
( crontab -l | grep -v -F "$croncmd" ; echo "$cronjob" ) | crontab -
|
||||
cp -f "$thisdir/.env.example" "$thisdir/.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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user