cfupdater

command module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

README

Cloudflare DNS Records Updater (cfupdater)

DNS updater for Cloudflare API v4.

Config example

Use the symbol "%" if you want to automatically retrieve your public IP every time you run this program. Otherwise, specify a certain IP address here.

{
    "api_key": "cloudflare-api-key",
    "zones": [
        {
            "name": "example.com",
            "records": [
                {
                    "record": "@",
                    "type": "A",
                    "ip": "%"
                }
            ]
        },
        {
            "name": "example.com",
            "records": [
                {
                    "record": "www",
                    "type": "A",
                    "ip": "%"
                }
            ]
        }
    ]
}

Using

Place cfupdater and your config.json file in a directory of your choice.

Add the following line to your crontab:

*/10 * * * *    cd /opt/cfupdater/ && ./cfupdater

This will run cfupdater every 10 minutes.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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