-
Notifications
You must be signed in to change notification settings - Fork 536
/
Copy pathddnspod.sh
executable file
·40 lines (25 loc) · 1.04 KB
/
ddnspod.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh
cd "$(dirname "$0")"
# Import ardnspod functions
. ardnspod
# Combine your token ID and token together as follows
arToken="12345,7676f344eaeaea9074c123451234512d"
# Web endpoint to be used for querying the public IPv6 address
# Set this to override the default url provided by ardnspod
arIp4QueryUrl="http://ipv4.rehi.org/ip"
arIp6QueryUrl="http://ipv6.rehi.org/ip"
# The temp file to store the last record ip
arLastRecordFile=/tmp/ardnspod_last_record
# Return code when the last record IP is same as current host IP
# Set this to a value other than 0 to distinguish with a successful ddns update
arErrCodeUnchanged=0
# indicates whether a new domain record should be created
# if the record does not already exist. It is set to 1 (true) if a new record should be created
# when the domain record is missing, and 0 (false) otherwise.
arIsCreateRecord=0
# Place each domain you want to check as follows
# you can have multiple arDdnsCheck blocks
# IPv4:
arDdnsCheck "test.org" "subdomain"
# IPv6:
arDdnsCheck "test.org" "subdomain6" 6