ovh-dynhost-ip-updater

command module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2022 License: MIT Imports: 6 Imported by: 0

README

ovh-dynhost-ip-updater

Lightweight Go tool to update IP address in OVH DynHost.

Configuration

  1. Configure your domain in OVH DynHost
  2. Create your app keys https://docs.ovh.com/gb/en/api/first-steps-with-ovh-api/#create-your-app-keys
  3. Save app keys. Because we using go-ovh lib you have two options file config or evoiremenets. All information you have here.

Installation and run

Docker
docker run -e ENDPOINT=ovh-eu -e APPLICATION_KEY=... -e APPLICATION_SECRET=... -e CUSTOMER_KEY=... stachjankowski/ovh-dynhost-ip-updater:latest --zone example.com --subdomain abc
Standalone
make
./bin/ovh-dynhost-ip-updater --zone example.com --subdomain abc

The program can be run once or run in a loop (every 60s). To run in a loop, use the switch --loop.

You have two options with IP address transfer.

  • Manual: e.g.: --ip 127.0.0.3
  • Detect public IP using external service, e.g.:
    • --ipurl https://ip.42.pl/raw
    • --ipurl "http://ip-api.com/json/" --jsonpath "\$.query"
Help:
Usage: ovh-dynhost-ip-updater --zone ZONE --subdomain SUBDOMAIN [--ipurl IPURL] [--jsonpath JSONPATH] [--ip IP] [--loop] [--verbose]

Options:
  --zone ZONE            domain
  --subdomain SUBDOMAIN
                         subdomain
  --ipurl IPURL          address to the service that returns your public ip address [default: https://api.ipify.org]
  --jsonpath JSONPATH
  --ip IP                IPv4 address
  --loop, -l             work in an infinite loop
  --verbose, -v          verbosity level
  --help, -h             display this help and exit```

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL