I have a home server with a dynamic IP. A subdomain points to this IP.
As it's dynamic, the following API2 (my first such attempt at doing this on cPanel) command is called via SSH as part of some wider (non-CP related) processing:
cpapi2 --user=$USER ZoneEdit edit_zone_record Line=$LINE domain=domain.com name=sub type=A address=$HOMEIP ttl=600 class=IN
The IP updates fine, however the TTL appears to be completely ignored and the server goes with the default (14400). The output from this on CLI is:
cpanelresult:
apiversion: 2
data:
-
result:
newserial: '2017010805'
status: 1
statusmsg: ''
event:
result: 1
func: edit_zone_record
module: ZoneEdit
Any ideas?
As it's dynamic, the following API2 (my first such attempt at doing this on cPanel) command is called via SSH as part of some wider (non-CP related) processing:
cpapi2 --user=$USER ZoneEdit edit_zone_record Line=$LINE domain=domain.com name=sub type=A address=$HOMEIP ttl=600 class=IN
The IP updates fine, however the TTL appears to be completely ignored and the server goes with the default (14400). The output from this on CLI is:
cpanelresult:
apiversion: 2
data:
-
result:
newserial: '2017010805'
status: 1
statusmsg: ''
event:
result: 1
func: edit_zone_record
module: ZoneEdit
Any ideas?