1
0
mirror of https://github.com/EV21/dynb.git synced 2026-06-24 08:31:01 +02:00

6 Commits

Author SHA1 Message Date
EV21 9efc3df858 minor: 📝 update CHANGELOG 2023-02-26 18:55:04 +01:00
EV21 715e548dfb minor: increase version 2023-02-26 18:51:53 +01:00
EV21 1624691612 fix: set constant alpine version as latest couses issues 2023-02-26 18:51:03 +01:00
EV21 7d66155cc1 minor: 📝 update CHANGELOG 2023-02-26 18:00:39 +01:00
EV21 fdd4d03e74 fix: incorrect dns ip handling via domrobot 2023-02-26 17:57:42 +01:00
EV21 e743532664 minor: 📝 update README 2022-11-24 22:15:47 +01:00
4 changed files with 34 additions and 20 deletions
+14
View File
@@ -1,6 +1,20 @@
# Changelog
## 0.5.3 (2023-02-26)
### Fix
* Set constant alpine version as latest couses issues. [Eduard Veit]
## 0.5.2 (2023-02-26)
### Fix
* Incorrect dns ip handling via domrobot. [Eduard Veit]
## 0.5.1 (2022-11-21)
### Features
+1 -1
View File
@@ -1,4 +1,4 @@
FROM alpine:latest
FROM alpine:3.16.4
RUN \
apk update \
+10 -10
View File
@@ -23,16 +23,16 @@ IPv4 (A) and IPv6 (AAAA) record updates are supported.
The following update methods are currently implemented:
| Provider | API | TTL in seconds | Credentials | own domain via NS record | free (sub-) domain |
|---------------------|-----------------------|----------------|----------------------------------------------------------------------------------------------|--------------------------|------------------------------------------------|
| INWX.com | Domrobot JSON-RPC-API | 300 | customer login `username` & `password`. Mobile TAN (OTP) is currently not supported by DynB. | ✔️ | ⛔ choose one of your owned domains |
| INWX.com | DynDNS2 | 60 | specific dyndns `username` & `password` | ✔️ | ⛔ choose one of your owned domains per account |
| deSEC.io (dedyn.io) | DynDNS2 | 60 | `token` | ✔️ | ✔️ |
| DuckDNS.org | DynDNS2 | 60 | `token` | ⛔ | ✔️ |
| dynv6.com | DynDNS2 | 60 | `token` | ✔️ | ✔️ |
| ddnss.de | DynDNS2 | 10 | `update key` as `token` | ⛔ | ✔️ |
| IPv64.net | DynDNS2 | 60 | `DynDNS Updatehash` as `token` | | ✔️ |
| dynu.com | DynDNS2 | 30 | `username` & `password` | ✔️ | ✔️ |
| Provider | API | TTL in seconds | Credentials | own domain via NS record | free (sub-) domain |
|---------------------|-----------------------|----------------|----------------------------------------------------------------------------------------------|------------------------------------------|--------------------------------------|
| INWX.com | Domrobot JSON-RPC-API | 300 | customer login `username` & `password`. Mobile TAN (OTP) is currently not supported by DynB. | ✔️ 🆓 for your registered domains @ inwx | ⛔ for your registered domains @ inwx |
| INWX.com | DynDNS2 | 60 | specific dyndns `username` & `password` | ✔️ 🆓 for your registered domains @ inwx | ⛔ for your registered domains @ inwx |
| deSEC.io (dedyn.io) | DynDNS2 | 60 | `token` | ✔️ 🆓 | ✔️ |
| DuckDNS.org | DynDNS2 | 60 | `token` | ⛔ | ✔️ |
| dynv6.com | DynDNS2 | 60 | `token` | ✔️ 🆓 | ✔️ |
| ddnss.de | DynDNS2 | 10 | `update key` as `token` | ⛔ | ✔️ |
| IPv64.net | DynDNS2 | 60 | `DynDNS Updatehash` as `token` | ✔️ 💲 | ✔️ |
| dynu.com | DynDNS2 | 30 | `username` & `password` | ✔️ 🆓 | ✔️ |
## 📦 Requirements
+9 -9
View File
@@ -70,7 +70,7 @@ _response=
_statusHostname=
_statusUsername=
_statusPassword=
_version=0.5.1
_version=0.5.3
_userAgent="DynB/$_version github.com/EV21/dynb"
_configFile=$HOME/.local/share/dynb/.env
_statusFile=/tmp/dynb.status
@@ -130,7 +130,7 @@ function is_ip_address
result=$?
;;
esac
return $result
return "$result"
}
function loopMode
@@ -235,11 +235,11 @@ function do_dig_request
{
local dns_server=$1
local record_type=$2
dig_response=$(dig @"$dns_server" in "$record_type" +short "$DYNB_DYN_DOMAIN")
dig_response=$(dig @"$dns_server" in "$record_type" +short "$DYNB_DYN_DOMAIN" 2>&1)
dig_exitcode=$?
if [[ $dig_exitcode -gt 0 ]]
then
errorMessage "DNS request failed with exit code: $dig_exitcode $dig_response"
errorMessage "DNS request for $record_type @ $dns_server failed with exit code: $dig_exitcode $dig_response"
unset _dns_ip
return 1
else
@@ -271,8 +271,8 @@ function getDNSIP() {
local record_type=$1
if [[ $DYNB_UPDATE_METHOD == domrobot ]]
then
echo "$_dns_records" |
jq --raw-output "select(.type == \"${record_type}\") | .content"
_dns_ip=$(echo "$_dns_records" |
jq --raw-output "select(.type == \"${record_type}\") | .content")
else
for current_dns_server in "${provider_dns_servers[@]}"
do
@@ -322,7 +322,7 @@ function getRemoteIP
# shellcheck disable=2181
if [[ $curls_status_code -gt 0 ]]
then
errorMessage "Remote IPv$ip_version request failed with ${current_check_server} curl status code: $curls_status_code"
errorMessage "Remote IPv$ip_version request @ ${current_check_server} failed with curl status code: $curls_status_code"
_has_remote_ip_error=true
return_value=1
else
@@ -354,7 +354,7 @@ function getRemoteIP
fi
;;
esac
return $return_value
return "$return_value"
}
# requires parameter
@@ -1072,7 +1072,7 @@ function main
do
doUpdates
debugMessage "wait $DYNB_INTERVAL seconds until next check"
sleep $DYNB_INTERVAL
sleep "$DYNB_INTERVAL"
done
else doUpdates
fi