/azure-ddns

Azure Dynamic DNS from https://github.com/FrodeHus/azure-dyndns work

Primary LanguagePythonMIT LicenseMIT

Packages python-version license

Azure-ddns

Azure Dynamic DNS from FrodeHus (repo) work.

The package is available here to run directly from CLI

Requirement

  • python 3.10
  • poetry
  • Azure application id and secret with contribute permission on the DNS zone targeted

Setup local

Create virtual environment:

git clone https://github.com/tle06/azure-ddns.git
cd azure-ddns/azure_ddns
poetry shell
poetry install

Execute locally

poetry run python azure_ddns/cli.py

Build package

poetry build
pip install dist/azure_ddns-0.0.1-py3-none-any.whl --force-reinstall

Install the package build

If needed replace the version number

pip install dist/azure_ddns-*-py3-none-any.whl --force-reinstall

Publish package

export PYPI_USERNAME=__token__
export PYPI_PASSWORD=pypi_token_to_be_replace_by_yours
poetry publish --build --username $PYPI_USERNAME --password $PYPI_PASSWORD

Install package from Pypi.org

pip install azure-ddns

Cron task on your linux

If you need a cron generator check here

crontab -e
*/30 * * * * azure-ddns -config /home/user/azure-dyndns.json > dyndns.txt