mirror of
https://github.com/fernwerker/ownDynDNS.git
synced 2025-07-10 06:05:13 +02:00
* rewrite the hole script:
** use .env file for config so we can retrieve updates ** add config and payload DTO with validators ** allow registrable domains as DynDNS ** update IPv4/6 only if changed (or really forced) ** remove obsolete failed_logins counter ** save logs with timestamp ** save only the newest 100 log entries for each domain
This commit is contained in:
parent
0c58ee7009
commit
05e326abe6
9 changed files with 528 additions and 149 deletions
25
examples/update-dyndns.sh
Executable file
25
examples/update-dyndns.sh
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# you can run this script from **ix bases device to update (different) Records
|
||||
|
||||
USER="max_mustermann"
|
||||
PASS="s3cr3t"
|
||||
DOMAIN="my-home-nas.de"
|
||||
#DOMAIN="nas.my-home.de"
|
||||
SCRIPT="https://<url of your webspace>/update.php"
|
||||
FORCE=0
|
||||
|
||||
IPV4=$(curl -4 -q ident.me)
|
||||
IPV6=$(curl -6 -q ident.me)
|
||||
|
||||
echo ${IPV4}
|
||||
echo ${IPV6}
|
||||
|
||||
# PAYLOAD_IPV4="force=${FORCE}&user=${USER}&password=${PASS}&ipv4=${IPV4}&domain=${DOMAIN}"
|
||||
# curl -X POST --data "${PAYLOAD_IPV4}" ${SCRIPT}
|
||||
|
||||
# PAYLOAD_IPV6="force=${FORCE}&user=${USER}&password=${PASS}&ipv6=${IPV6}&domain=${DOMAIN}"
|
||||
# curl -X POST --data "${PAYLOAD_IPV6}" ${SCRIPT}
|
||||
|
||||
PAYLOAD_BOTH="force=${FORCE}&user=${USER}&password=${PASS}&ipv4=${IPV4}&ipv6=${IPV6}&domain=${DOMAIN}"
|
||||
curl -X POST --data "${PAYLOAD_BOTH}" ${SCRIPT}
|
Loading…
Add table
Add a link
Reference in a new issue