File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ first test the script to make sure it works `sudo ~/IOTstack/duck/duck.sh` then
17
17
Create a cron job by running the following command ` crontab -e `
18
18
19
19
You will be asked to use an editor option 1 for nano should be fine
20
- paste the following in the editor ` */5 * * * * sudo ~/IOTstack/duck/duck.sh >/dev/null 2>&1 ` then ctrl+s and ctrl+x to save
20
+ paste the following in the editor ` */5 * * * * ~/IOTstack/duck/duck.sh ` then ctrl+s and ctrl+x to save
21
21
22
22
Your Public IP should be updated every five minutes
23
23
Original file line number Diff line number Diff line change 3
3
DOMAINS=" YOUR_DOMAINS"
4
4
# Your DuckDNS Token
5
5
DUCKDNS_TOKEN=" YOUR_DUCKDNS_TOKEN"
6
- curl -k -o /var/log/duck.log " https://www.duckdns.org/update?domains=${DOMAINS} &token=${DUCKDNS_TOKEN} &ip="
6
+
7
+ # A random delay to avoid every client contacting the duckdns server at the same moment
8
+ sleep $(( RANDOM % 60 ))
9
+ # Request duckdns to update your domain name with your public IP address
10
+ curl --silent --max-time 10 --output /dev/null " https://www.duckdns.org/update?domains=${DOMAINS} &token=${DUCKDNS_TOKEN} &ip="
You can’t perform that action at this time.
0 commit comments