mirror of
https://github.com/EV21/dynb.git
synced 2025-12-26 16:39:32 +01:00
Compare commits
8 Commits
0.3.0
...
75715cb0a8
| Author | SHA1 | Date | |
|---|---|---|---|
|
75715cb0a8
|
|||
|
6313ee4347
|
|||
|
f37230401f
|
|||
|
d6c98c04ad
|
|||
|
64a5a76b6d
|
|||
|
05120c25e4
|
|||
|
dcb3d7436b
|
|||
|
fa60312c0d
|
160
CHANGELOG.md
160
CHANGELOG.md
@@ -1,127 +1,145 @@
|
||||
# Changelog
|
||||
|
||||
|
||||
## 0.3.3 (2022-06-07)
|
||||
|
||||
### Fix
|
||||
|
||||
* Wrong parameter name for DuckDNS. [Eduard Veit]
|
||||
|
||||
### Documentation
|
||||
|
||||
* 📝 add comments to docker-compose.yml example. [Eduard Veit]
|
||||
|
||||
|
||||
## 0.3.2 (2022-05-26)
|
||||
|
||||
### Features
|
||||
|
||||
* ✨ add tzdata to Dockerfile for timezone config. [Eduard Veit]
|
||||
|
||||
You can now set your timezone with the environment variable
|
||||
`TZ="Europe/Berlin"`
|
||||
|
||||
|
||||
## 0.3.1 (2022-05-26)
|
||||
|
||||
### Fix
|
||||
|
||||
* 🐛 curl/libcurl doesn't support dns-server option. [Eduard Veit]
|
||||
|
||||
the latest alpine we are using for the docker image
|
||||
does also drops the support for that option like debian/ubuntu/etc
|
||||
|
||||
|
||||
## 0.3.0 (2022-05-26)
|
||||
|
||||
### Features
|
||||
|
||||
* ✨ validate ip address respons from ip check web service. [Eduard Veit]
|
||||
|
||||
* ✨ check internet connection for selected ip versions. [Eduard Veit]
|
||||
|
||||
* 🎨 colorful info, debug and error messages. [Eduard Veit]
|
||||
|
||||
### Fix
|
||||
|
||||
* Abort on all dig errors. [Eduard Veit]
|
||||
|
||||
### Documentation
|
||||
|
||||
* 📝 add labels to Dockerfile. [Eduard Veit]
|
||||
|
||||
|
||||
## 0.2.0 (2021-09-24)
|
||||
|
||||
### New
|
||||
### Features
|
||||
|
||||
* :sparkles: enable parameter extensions for `docker run --interactive` [Eduard Veit]
|
||||
* ✨ enable parameter extensions for `docker run --interactive` [Eduard Veit]
|
||||
|
||||
* :sparkles: add pre-commit hooks for markdown. [Eduard Veit]
|
||||
### Changed
|
||||
|
||||
* :sparkles: change git hooks and add shfmt. [Eduard Veit]
|
||||
|
||||
* :sparkles: add pre-commit git hook for shellcheck. [Eduard Veit]
|
||||
|
||||
### Changes
|
||||
|
||||
* :wrench: remove md-toc from pre-commit. [Eduard Veit]
|
||||
|
||||
* :wrench: handle dns server selection. [Eduard Veit]
|
||||
* Handle dns server selection. [Eduard Veit]
|
||||
|
||||
### Documentation
|
||||
|
||||
* :memo: update CHANGELOG.md. [Eduard Veit]
|
||||
* 📝 update CHANGELOG.md. [Eduard Veit]
|
||||
|
||||
* :memo: document docker parameters. [Eduard Veit]
|
||||
* 📝 document docker parameters. [Eduard Veit]
|
||||
|
||||
* :memo: change default dns server setting. [Eduard Veit]
|
||||
* 📝 change default dns server setting. [Eduard Veit]
|
||||
|
||||
* :memo: update CHANGELOG. [Eduard Veit]
|
||||
* 📝 update CHANGELOG. [Eduard Veit]
|
||||
|
||||
* :memo: update README.md. [Eduard Veit]
|
||||
|
||||
### Other
|
||||
|
||||
* :art: lint README.md. [Eduard Veit]
|
||||
|
||||
* :art: add shfmt params to pre-commit check. [Eduard Veit]
|
||||
|
||||
* :art: fix shell style. [Eduard Veit]
|
||||
|
||||
* :recycle: seperate parsing logic. [Eduard Veit]
|
||||
|
||||
* :recycle: normalizing pre-commit configuration to a top-level map. [Eduard Veit]
|
||||
|
||||
* :recycle: refactorings. [Eduard Veit]
|
||||
|
||||
* Refactor: :recycle: remove unused help message. [Eduard Veit]
|
||||
* 📝 update README.md. [Eduard Veit]
|
||||
|
||||
|
||||
## 0.1.2 (2021-04-23)
|
||||
|
||||
### Documentation
|
||||
|
||||
* :memo: document environment variables. [Eduard Veit]
|
||||
|
||||
### Other
|
||||
|
||||
* :recycle: refactor: method extractions and other beautifications. [Eduard Veit]
|
||||
* 📝 document environment variables. [Eduard Veit]
|
||||
|
||||
|
||||
## 0.1.1 (2021-04-23)
|
||||
|
||||
### Fix
|
||||
|
||||
* :bug: fix loop and error handling in case of connection issues. [Eduard Veit]
|
||||
* 🐛 fix loop and error handling in case of connection issues. [Eduard Veit]
|
||||
|
||||
|
||||
## 0.1.0 (2021-04-22)
|
||||
|
||||
### New
|
||||
### Features
|
||||
|
||||
* :sparkles: add Dockerfile. [Eduard Veit]
|
||||
* ✨ add Dockerfile. [Eduard Veit]
|
||||
|
||||
* :sparkles: add loop mode. [Eduard Veit]
|
||||
* ✨ add loop mode. [Eduard Veit]
|
||||
|
||||
* :sparkles: add support for Duck DNS as DynDNS2 provider. [Eduard Veit]
|
||||
* ✨ add support for Duck DNS as DynDNS2 provider. [Eduard Veit]
|
||||
|
||||
* :sparkles: add support for deSEC as DynDNS2 provider. [Eduard Veit]
|
||||
* ✨ add support for deSEC as DynDNS2 provider. [Eduard Veit]
|
||||
|
||||
* :sparkles: add completion. [Eduard Veit]
|
||||
* ✨ add completion. [Eduard Veit]
|
||||
|
||||
:sparkles: add man page
|
||||
✨ add man page
|
||||
|
||||
* :sparkles: replace getopt with argbash. [Eduard Veit]
|
||||
* 🔃 replace getopt with argbash. [Eduard Veit]
|
||||
|
||||
* :sparkles: add interpretaton of status codes and act accordingly. [Eduard Veit]
|
||||
* ✨ add interpretaton of status codes and act accordingly. [Eduard Veit]
|
||||
|
||||
* :sparkles: make network interface configurable. [Eduard Veit]
|
||||
* ✨ make network interface configurable. [Eduard Veit]
|
||||
|
||||
* :sparkles: add DynDNS2 support for dynv6.com. [Eduard Veit]
|
||||
* ✨ add DynDNS2 support for dynv6.com. [Eduard Veit]
|
||||
|
||||
* :sparkles: add .gitchangelog.rc. [Eduard Veit]
|
||||
### Added
|
||||
|
||||
* :sparkles: add dynb.sh. [Eduard Veit]
|
||||
* 📝 README.md. [Eduard Veit]
|
||||
|
||||
* ✨ dynb.sh. [Eduard Veit]
|
||||
|
||||
### Changed
|
||||
|
||||
* 🔃 rename environment variables. [Eduard Veit]
|
||||
|
||||
### Fix
|
||||
|
||||
* :bug: fix sourcing of config file. [Eduard Veit]
|
||||
* 🐛 fix error handling. [Eduard Veit]
|
||||
|
||||
:recycle: do some shellcheck fixes
|
||||
* 🐛 fix sourcing of config file. [Eduard Veit]
|
||||
|
||||
♻️ do some shellcheck fixes
|
||||
|
||||
### Documentation
|
||||
|
||||
* :memo: document example of an docker-compose.yml file. [Eduard Veit]
|
||||
* 📝 document example of an docker-compose.yml file. [Eduard Veit]
|
||||
|
||||
* :memo: document loop mode and dig as requirement. [Eduard Veit]
|
||||
* 📝 document `loop mode` and mention `dig` as requirement. [Eduard Veit]
|
||||
|
||||
* :memo: update example of .env in README.md. [Eduard Veit]
|
||||
* 📝 update example of .env in README.md. [Eduard Veit]
|
||||
|
||||
* :memo: add CHANGELOG.md. [Eduard Veit]
|
||||
* 📝 CHANGELOG.md. [Eduard Veit]
|
||||
|
||||
* :memo: add example.env. [Eduard Veit]
|
||||
|
||||
* :memo: write README.md. [Eduard Veit]
|
||||
|
||||
### Other
|
||||
|
||||
* :recycle: refactor: rename environment variables. [Eduard Veit]
|
||||
|
||||
* :recycle: refactor, fix and debug error handling. [Eduard Veit]
|
||||
|
||||
* :recycle: refactor main code. [Eduard Veit]
|
||||
|
||||
* Initial commit. [EV21]
|
||||
* 📝 add example.env. [Eduard Veit]
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,8 @@ apk add \
|
||||
bash \
|
||||
curl \
|
||||
jq \
|
||||
bind-tools
|
||||
bind-tools \
|
||||
tzdata
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
|
||||
20
README.md
20
README.md
@@ -79,7 +79,7 @@ DYNB_SERVICE_PROVIDER=inwx
|
||||
## update method options: domrobot, dyndns
|
||||
DYNB_UPDATE_METHOD=domrobot
|
||||
|
||||
## ip mode could be either: 4, 6 or dual for dualstack
|
||||
## ip mode could be either: 4, 6 or 64 for dualstack
|
||||
DYNB_IP_MODE=64
|
||||
|
||||
## If you are using the DomRobot RPC-API enter your credentials for the web interface login here
|
||||
@@ -155,17 +155,25 @@ services:
|
||||
image: ev21/dynb
|
||||
container_name: dynb
|
||||
network_mode: host
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./Dockerfile
|
||||
stdin_open: true
|
||||
tty: true
|
||||
environment:
|
||||
- DYNB_DYN_DOMAIN=dyndns.example.com
|
||||
- DYNB_SERVICE_PROVIDER=inwx
|
||||
# Providers: deSec, duckDNS, dynv6, inwx
|
||||
- DYNB_SERVICE_PROVIDER=desec
|
||||
# Possible update methods are: dyndns, domrobot
|
||||
- DYNB_UPDATE_METHOD=dyndns
|
||||
# IP modes: 4 (IPv4 only), 6 (IPv6 only), 64 both
|
||||
- DYNB_IP_MODE=64
|
||||
# If your provider uses tokens use DYNB_TOKEN instead of DYNB_USERNAME and DYNB_PASSWORD
|
||||
- DYNB_USERNAME=User42
|
||||
- DYNB_PASSWORD=SuperSecretPassword
|
||||
- DYNB_INTERVAL=60
|
||||
# The interval in seconds is the time the script waits before executing it again
|
||||
- DYNB_INTERVAL=300
|
||||
# TZ: Timezone setting for correct log time
|
||||
- TZ=Europe/Berlin
|
||||
# TERM: For colorful console output (attached mode)
|
||||
- TERM=xterm-256color
|
||||
```
|
||||
|
||||
## environment variables
|
||||
|
||||
20
dynb.sh
20
dynb.sh
@@ -66,7 +66,7 @@ _response=
|
||||
_statusHostname=
|
||||
_statusUsername=
|
||||
_statusPassword=
|
||||
_version=0.3.0
|
||||
_version=0.3.3
|
||||
_userAgent="DynB/$_version github.com/EV21/dynb"
|
||||
_configFile=$HOME/.local/share/dynb/.env
|
||||
_statusFile=/tmp/dynb.status
|
||||
@@ -209,17 +209,12 @@ function getRemoteIP
|
||||
{
|
||||
local ip_version=$1
|
||||
local ip_check_server=$2
|
||||
if [[ -n $_DNS_checkServer ]]
|
||||
then
|
||||
curl --silent "$_interface_str" --user-agent "$_userAgent" \
|
||||
--ipv"${ip_version}" --dns-servers "$_DNS_checkServer" --location "${ip_check_server}"
|
||||
else
|
||||
curl --silent "$_interface_str" --user-agent "$_userAgent" \
|
||||
--ipv"${ip_version}" --location "${ip_check_server}"
|
||||
fi
|
||||
curl --silent "$_interface_str" --user-agent "$_userAgent" \
|
||||
--ipv"${ip_version}" --location "${ip_check_server}"
|
||||
local curls_status_code=$?
|
||||
# shellcheck disable=2181
|
||||
if [[ $? -gt 0 ]]; then
|
||||
errorMessage "IPCheck (getRemoteIP ${1}) request failed"
|
||||
if [[ $curls_status_code -gt 0 ]]; then
|
||||
errorMessage "IPCheck (getRemoteIP $ip_version) request failed"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
@@ -289,7 +284,7 @@ function dynupdate
|
||||
;;
|
||||
DuckDNS* | duckdns*)
|
||||
dyndns_update_url="${DUCKDNS_DYNDNS_UPDATE_URL}"
|
||||
myip_str=ipv4
|
||||
myip_str=ip
|
||||
myipv6_str=ipv6
|
||||
;;
|
||||
*)
|
||||
@@ -817,6 +812,7 @@ function main
|
||||
while :
|
||||
do
|
||||
doUpdates
|
||||
debugMessage "wait $DYNB_INTERVAL seconds until next check"
|
||||
sleep $DYNB_INTERVAL
|
||||
done
|
||||
else doUpdates
|
||||
|
||||
Reference in New Issue
Block a user