Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/j4ng5y/cfupdater
A utility to give CloudFlare a Dynamic DNS Capability
https://github.com/j4ng5y/cfupdater
Last synced: 14 days ago
JSON representation
A utility to give CloudFlare a Dynamic DNS Capability
- Host: GitHub
- URL: https://github.com/j4ng5y/cfupdater
- Owner: j4ng5y
- License: mit
- Created: 2019-10-17T17:39:38.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-08-30T13:53:36.000Z (over 1 year ago)
- Last Synced: 2024-10-22T08:33:13.968Z (2 months ago)
- Language: Go
- Size: 32.2 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# CFUPDATER [![GoDoc](https://godoc.org/github.com/j4ng5y/cfupdater?status.svg)](https://godoc.org/github.com/j4ng5y/cfupdater) [![Go Report Card](https://goreportcard.com/badge/github.com/j4ng5y/cfupdater)](https://goreportcard.com/report/github.com/j4ng5y/cfupdater) ![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability-percentage/j4ng5y/cfupdater) ![GitHub](https://img.shields.io/github/license/j4ng5y/cfupdater)
A fairly simple application that performs Dynamic DNS operations for a CloudFlare Resource Record.
## Installation
* On your linux host, create a user for the service:
`sudo useradd -r -s /sbin/nologin cfupdater`
* Make a few directories:
`sudo mkdir -p /opt/cfupdater/bin /opt/cfupdater/config /opt/cfupdater/services`
* Download the binary and the systemd unit files:
```bash
sudo curl -o /opt/cfupdater/bin/cfupdater_linux_amd64 https://github.com/j4ng5y/cfupdater/releases/download/v0.2.2/cfupdater_linux_amd64sudo curl -o /opt/cfupdater/services/cfupdater.timer https://github.com/j4ng5y/cfupdater/releases/download/v0.2.2/cfupdater.timer
sudo curl -o /opt/cfupdater/services/cfupdater.service https://github.com/j4ng5y/cfupdater/releases/download/v0.2.2/cfupdater.service
```* Run the config-file maker part of the application:
```bash
sudo /opt/cfupdater/bin/cfupdater_linux_amd64 configure \
--cloudflare-api-token \
--cloudflare-dns-zone-id \
--cloudflare-dns-record-name \
--ipinfo-api-token
```This just makes a config.yaml file in the `/opt/cfupdater/config` directory.
* Create/Enable/Start symlinks for the unit files:
```bash
sudo ln -s /opt/cfupdater/services/cfupdater.timer /etc/systemd/system/cfupdater.timer
sudo ln -s /opt/cfupdater/services/cfupdater.service /etc/systemd/system/cfupdater.servicesudo systemctl daemon-reload
sudo systemctl enable cfupdater.timer
```This will simply run the service 5 minutes after a system reboot and also every 24hours thereafter.
__Note__: You can just as easily run the service itself by running a `sudo systemctl start cfupdater.service` command if you feel the need to do so.
* Move all the files from root's ownership, to the cfupdater user's ownership:
`sudo chown -R cfupdater:cfupdater /opt/cfupdater`
## TODO
I do plan to make the installation a little less manual, but it serves my purposes as is for the time being, so more to come?