Code Monkey home page Code Monkey logo

dynamic-cloud-dns-client's Introduction

Dynamic Cloud DNS Client

This is a simple client for the Dynamic Cloud DNS project.

Designed to run under Linux systemd, it consists of a small Python script, which uses the ipify API to retrieve the current IP and if the IP address has changed, calls the cloud function configured as per the instructions for Dynamic Cloud DNS.

Prerequisites

Needs Python 3, requests and backoff

pip3 install -r requirements.txt

Setup

  • Copy dynamic_cloud_dns_client.py to /usr/local/bin
  • Copy [email protected] to /etc/systemd/system
  • Copy dynamic_cloud_dns_client_your.host to /etc (replace your.host with your actual hostname)
  • Edit dynamic_cloud_dns_client_your.host and fill in the environment variables
  • Enable and start your service: systemctl enable [email protected]

Run sudo ./install.sh your.host to do the first 3 steps. Run just sudo ./install.sh to do the first two steps.

Testing

Probably a good idea to do this in a virtualenv:

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
pip install -t test-requirements.txt
pytest

License

Copyright (c) 2020, Paul Adams. All rights reserved.

DCDNS Client is licensed under the MIT License.

See LICENSE for more details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.