I've set up the script and am attempting to run it but am getting the output below:
root@router:~/OpenWRT-DDNS# ./oddns.sh
Mon Feb 26 22:42:40 AWST 2024
WAN: 103.106.xx.xx
Valid IP address
Cache is up-to-date. Using cache.
Checking DDNS provider
Failed to parse json data: unexpected character
Provider:
BAD PROVIDER ADDRESS:
Failed to get remote address.
root@router:~/OpenWRT-DDNS#
The content of my provider.conf looks like this:
# =============================================================================
# Porkbun configuration for oddns.sh
# Copy this to provider.conf
# =============================================================================
# Your WAN adapter name
WAN=eth1
# Your keys
APIKEY=pk1_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Secret key
APISEC=sk1_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Your domain
DOMAIN=domain.com
# Leave blank if there's no subdomain
SUBDOMAIN=subdomain
# TTL (Default 600)
TTL=600
# =============================================================================
# Do not edit below this line
# =============================================================================
# Add slash if using a subdomain
if [[ "${#SUBDOMAIN}" -gt 0 ]] ;then
SUBDOMAIN="/$SUBDOMAIN"
fi
# URLs
GETURL="https://porkbun.com/api/json/v3/dns/retrieveByNameType/$DOMAIN/A$SUBDOMAIN"
SETURL="https://porkbun.com/api/json/v3/dns/editByNameType/$DOMAIN/A$SUBDOMAIN"
# Data
GETDATA="{ \"apikey\": \"$APIKEY\", \"secretapikey\": \"$APISEC\" }"
SETDATA="{ \"secretapikey\": \"$APISEC\", \"apikey\": \"$APIKEY\", \"ttl\": \"$TTL\""
Hi,
I've set up the script and am attempting to run it but am getting the output below:
The content of my provider.conf looks like this:
I'm unable to determine exactly what is going wrong. Do you have any suggestions? Thank you.